diff --git a/.eslintignore b/.eslintignore index d6a07c69..2b5875ab 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,5 +2,6 @@ dist .vscode .vercel +.eslintrc.cjs src/db/migrations src/env.d.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 172fb33a..1c24fcb2 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,6 +7,7 @@ module.exports = { ], overrides: [ { + extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'], files: ['*.astro'], parser: 'astro-eslint-parser', parserOptions: { @@ -14,10 +15,40 @@ module.exports = { extraFileExtensions: ['.astro'], }, rules: { + '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/no-throw-literal': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', 'deprecation/deprecation': 'off', }, }, + { + files: ['*.ts', '*.tsx'], + extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'], + rules: { + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/require-await': 'off', + }, + }, + { + files: ['*.json', '*.jsonc'], + excludedFiles: ['package.json'], + parser: 'jsonc-eslint-parser', + extends: ['plugin:jsonc/recommended-with-json'], + }, { extends: ['plugin:markdown/recommended'], files: ['**/*.md', '**/*.md/*.{js,jsx,ts,tsx}'], @@ -45,13 +76,8 @@ module.exports = { 'simple-import-sort/exports': 'error', 'deprecation/deprecation': 'error', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-floating-promises': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/padding-line-between-statements': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-non-null-assertion': 'off', @@ -61,7 +87,9 @@ module.exports = { // Stylistic concerns that don't interfere with Prettier 'no-mixed-spaces-and-tabs': 'off', + 'jsx-a11y/no-autofocus': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', 'padding-line-between-statements': 'off', - '@typescript-eslint/padding-line-between-statements': 'off', + 'typescript-sort-keys/interface': 'off', }, };