Remove ESLint (#154)
This commit is contained in:
parent
94f8196a4c
commit
f478ee4972
8 changed files with 527 additions and 5007 deletions
|
|
@ -1,92 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json",
|
||||
"extraFileExtensions": [".astro"]
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"typescript": { "project": "./tsconfig.eslint.json" }
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.astro"],
|
||||
"extends": ["plugin:@typescript-eslint/recommended"],
|
||||
"rules": {
|
||||
// Create empty interface only when it extends other interface.
|
||||
"@typescript-eslint/no-empty-interface": [2, { "allowSingleExtends": true }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"extends": [
|
||||
"airbnb",
|
||||
"airbnb-typescript",
|
||||
"airbnb/hooks",
|
||||
"plugin:react/jsx-runtime",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"rules": {
|
||||
// Write all components as arrow functions.
|
||||
"react/function-component-definition": [
|
||||
2,
|
||||
{ "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }
|
||||
],
|
||||
|
||||
// We use props spreading to pass props to the html elements under custom components.
|
||||
"react/jsx-props-no-spreading": 0,
|
||||
|
||||
// Define values for optional props as by providing default arguments.
|
||||
"react/require-default-props": [2, { "functions": "defaultArguments" }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.astro"],
|
||||
"globals": {
|
||||
"astroHTML": true
|
||||
},
|
||||
"extends": [
|
||||
"airbnb/base",
|
||||
"airbnb-typescript/base",
|
||||
"plugin:astro/recommended",
|
||||
"plugin:astro/jsx-a11y-recommended"
|
||||
],
|
||||
"parser": "astro-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser"
|
||||
},
|
||||
"rules": {
|
||||
"astro/jsx-a11y/alt-text": [2, { "img": ["Image", "Picture"] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.cjs"],
|
||||
"extends": ["airbnb/base"]
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.astro", "*.cjs"],
|
||||
"plugins": ["file-progress", "simple-import-sort"],
|
||||
"extends": ["plugin:eslint-comments/recommended", "prettier"],
|
||||
"rules": {
|
||||
// Shows information about currently processing file in the console.
|
||||
"file-progress/activate": 1,
|
||||
|
||||
// Removes eslint-disable comments when they are not needed.
|
||||
"eslint-comments/no-unused-disable": 2,
|
||||
|
||||
// Ensure each eslint-disable has a description comment.
|
||||
"eslint-comments/require-description": [2, { "ignore": ["eslint-enable"] }],
|
||||
|
||||
// Allow devDependencies in some files.
|
||||
"import/no-extraneous-dependencies": [2, { "devDependencies": ["astro.config.ts", "tailwind.config.cjs"] }],
|
||||
|
||||
// Imports and exports order.
|
||||
"simple-import-sort/imports": 2,
|
||||
"simple-import-sort/exports": 2,
|
||||
"import/order": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
14
.github/workflows/check-code-quality.yml
vendored
14
.github/workflows/check-code-quality.yml
vendored
|
|
@ -7,20 +7,6 @@ on:
|
|||
branches: [main]
|
||||
|
||||
jobs:
|
||||
eslint:
|
||||
name: Run ESlint check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run ESLint
|
||||
run: npm run eslint:check
|
||||
|
||||
prettier:
|
||||
name: Run Prettier check
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ endOfLine: 'auto'
|
|||
pluginSearchDirs: false
|
||||
plugins:
|
||||
- 'prettier-plugin-astro'
|
||||
- 'prettier-plugin-svelte'
|
||||
- 'prettier-plugin-tailwindcss'
|
||||
|
|
|
|||
6
.vscode/extensions.json
vendored
6
.vscode/extensions.json
vendored
|
|
@ -3,7 +3,9 @@
|
|||
"astro-build.astro-vscode",
|
||||
"mgmcdermott.vscode-language-babel",
|
||||
"EditorConfig.EditorConfig",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
"esbenp.prettier-vscode",
|
||||
"svelte.svelte-vscode",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"redhat.vscode-yaml"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [120],
|
||||
"emmet.includeLanguages": { "javascript": "javascriptreact", "astro": "javascriptreact" },
|
||||
"eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"],
|
||||
"files.eol": "\n",
|
||||
"prettier.documentSelectors": ["**/*.astro"],
|
||||
"svelte.enable-ts-plugin": true,
|
||||
|
|
@ -15,12 +14,5 @@
|
|||
"svelte": "javascriptreact"
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"[astro]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||
"[ignore]": { "editor.defaultFormatter": "foxundermoon.shell-format" },
|
||||
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||
"[svelte]": { "editor.defaultFormatter": "svelte.svelte-vscode" },
|
||||
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||
"[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
}
|
||||
|
|
|
|||
5377
package-lock.json
generated
5377
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28
package.json
28
package.json
|
|
@ -13,49 +13,33 @@
|
|||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"eslint:check": "eslint . --ext .cjs,.ts,.tsx,.astro --ignore-path .gitignore",
|
||||
"eslint:write": "npm run eslint:check -- --fix",
|
||||
"prettier:check": "prettier --check --ignore-path .gitignore .",
|
||||
"prettier:write": "prettier --write --ignore-path .gitignore .",
|
||||
"ts:check": "tsc --jsx preserve --skipLibCheck",
|
||||
"check": "concurrently npm:*:check"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/image": "0.12.1",
|
||||
"@astrojs/svelte": "1.0.2",
|
||||
"@floating-ui/dom": "1.1.0",
|
||||
"iconify-icon": "1.0.2",
|
||||
"rollup-plugin-visualizer": "5.9.0",
|
||||
"svelte": "3.55.1"
|
||||
"iconify-icon": "1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/image": "0.12.1",
|
||||
"@astrojs/react": "1.2.2",
|
||||
"@astrojs/svelte": "1.0.2",
|
||||
"@astrojs/tailwind": "2.1.3",
|
||||
"@types/react": "18.0.26",
|
||||
"@types/react-dom": "18.0.10",
|
||||
"@typescript-eslint/eslint-plugin": "5.48.1",
|
||||
"@typescript-eslint/parser": "5.48.1",
|
||||
"astro": "1.9.2",
|
||||
"concurrently": "7.6.0",
|
||||
"eslint": "8.31.0",
|
||||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-config-airbnb-typescript": "17.0.0",
|
||||
"eslint-config-prettier": "8.6.0",
|
||||
"eslint-import-resolver-typescript": "3.5.3",
|
||||
"eslint-plugin-astro": "0.21.1",
|
||||
"eslint-plugin-eslint-comments": "3.2.0",
|
||||
"eslint-plugin-file-progress": "1.3.0",
|
||||
"eslint-plugin-import": "2.27.4",
|
||||
"eslint-plugin-jsx-a11y": "6.7.1",
|
||||
"eslint-plugin-react": "7.32.0",
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
"eslint-plugin-simple-import-sort": "8.0.0",
|
||||
"iconify-icon-names": "1.1.0",
|
||||
"locales-ts": "1.0.0",
|
||||
"postcss": "8.4.21",
|
||||
"prettier": "2.8.2",
|
||||
"prettier-plugin-astro": "0.7.2",
|
||||
"prettier-plugin-svelte": "2.9.0",
|
||||
"prettier-plugin-tailwindcss": "0.2.1",
|
||||
"rollup-plugin-visualizer": "5.9.0",
|
||||
"svelte": "3.55.1",
|
||||
"tailwindcss": "3.2.4",
|
||||
"typescript": "4.9.4"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</script>
|
||||
|
||||
<div
|
||||
class="w-fit h-fit flex justify-center items-center"
|
||||
class="flex h-fit w-fit items-center justify-center"
|
||||
bind:this={button}
|
||||
on:mouseenter={showTooltip}
|
||||
on:mouseleave={hideTooltip}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<div
|
||||
bind:this={tooltip}
|
||||
role="tooltip"
|
||||
class="hidden max-w-sm absolute top-0 left-0 rounded-lg bg-gray-700 px-3 py-1 text-white dark:bg-gray-100 dark:text-gray-800 sm:max-w-xs"
|
||||
class="absolute top-0 left-0 hidden max-w-sm rounded-lg bg-gray-700 px-3 py-1 text-white dark:bg-gray-100 dark:text-gray-800 sm:max-w-xs"
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue