|
| 1 | +import eslinter from 'eslint-config-love' |
| 2 | +import { includeIgnoreFile } from '@eslint/compat' |
| 3 | +import { fileURLToPath } from 'url' |
| 4 | +import path from 'path' |
| 5 | + |
| 6 | +const ignore = includeIgnoreFile( |
| 7 | + path.join(path.dirname(fileURLToPath(import.meta.url)), '.gitignore') |
| 8 | +) |
| 9 | + |
| 10 | +const tempDisabledRules = { |
| 11 | + '@typescript-eslint/await-thenable': 'off', |
| 12 | + '@typescript-eslint/class-methods-use-this': 'off', |
| 13 | + '@typescript-eslint/consistent-type-assertions': 'off', |
| 14 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 15 | + '@typescript-eslint/init-declarations': 'off', |
| 16 | + '@typescript-eslint/no-base-to-string': 'off', |
| 17 | + '@typescript-eslint/no-dynamic-delete': 'off', |
| 18 | + '@typescript-eslint/no-floating-promises': 'off', |
| 19 | + '@typescript-eslint/no-floating-promises': 'off', |
| 20 | + '@typescript-eslint/no-magic-numbers': 'off', |
| 21 | + '@typescript-eslint/no-misused-promises': 'off', |
| 22 | + '@typescript-eslint/no-misused-promises': 'off', |
| 23 | + '@typescript-eslint/no-unnecessary-condition': 'off', |
| 24 | + '@typescript-eslint/no-unnecessary-type-conversion': 'off', |
| 25 | + '@typescript-eslint/no-unnecessary-type-parameters': 'off', |
| 26 | + '@typescript-eslint/no-unsafe-argument': 'off', |
| 27 | + '@typescript-eslint/no-unsafe-assignment': 'off', |
| 28 | + '@typescript-eslint/no-unsafe-call': 'off', |
| 29 | + '@typescript-eslint/no-unsafe-member-access': 'off', |
| 30 | + '@typescript-eslint/no-unsafe-return': 'off', |
| 31 | + '@typescript-eslint/no-unsafe-type-assertion': 'off', |
| 32 | + '@typescript-eslint/only-throw-error': 'off', |
| 33 | + '@typescript-eslint/prefer-destructuring': 'off', |
| 34 | + '@typescript-eslint/prefer-for-of': 'off', |
| 35 | + '@typescript-eslint/prefer-nullish-coalescing': 'off', |
| 36 | + '@typescript-eslint/prefer-promise-reject-errors': 'off', |
| 37 | + '@typescript-eslint/require-await': 'off', |
| 38 | + '@typescript-eslint/restrict-template-expressions': 'off', |
| 39 | + '@typescript-eslint/return-await': 'off', |
| 40 | + '@typescript-eslint/strict-boolean-expressions': 'off', |
| 41 | + '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', |
| 42 | + 'array-callback-return': 'off', |
| 43 | + 'eslint-comments/require-description': 'off', |
| 44 | + 'import/export': 'off', |
| 45 | + 'import/no-duplicates': 'off', |
| 46 | + 'logical-assignment-operators': 'off', |
| 47 | + 'new-cap': 'off', |
| 48 | + 'promise/avoid-new': 'off', |
| 49 | + 'valid-typeof': 'off', |
| 50 | + complexity: 'off' |
| 51 | +} |
| 52 | + |
| 53 | +export default [ |
| 54 | + { |
| 55 | + ...eslinter, |
| 56 | + files: ['src/**/*.{ts,tsx,html}'], |
| 57 | + rules: { ...tempDisabledRules } |
| 58 | + }, |
| 59 | + { |
| 60 | + files: ['eslint.config.mjs'], |
| 61 | + languageOptions: { |
| 62 | + parserOptions: { |
| 63 | + ecmaVersion: 'latest', |
| 64 | + sourceType: 'module' |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + { |
| 69 | + files: ['**/*.cjs'], |
| 70 | + languageOptions: { |
| 71 | + parserOptions: { |
| 72 | + ecmaVersion: 'latest', |
| 73 | + sourceType: 'script' |
| 74 | + } |
| 75 | + } |
| 76 | + }, |
| 77 | + { ignores: ignore.ignores } |
| 78 | +] |
0 commit comments