|
| 1 | +import js from '@eslint/js'; |
| 2 | +import tseslint from 'typescript-eslint'; |
| 3 | +import simpleImportSort from 'eslint-plugin-simple-import-sort'; |
| 4 | +import unusedImports from 'eslint-plugin-unused-imports'; |
| 5 | +import prettierConfig from 'eslint-config-prettier'; |
| 6 | +import globals from 'globals'; |
| 7 | + |
| 8 | +export default [ |
| 9 | + { |
| 10 | + ignores: ['**/dist/**', '**/node_modules/**'] |
| 11 | + }, |
| 12 | + js.configs.recommended, |
| 13 | + ...tseslint.configs.recommended, |
| 14 | + { |
| 15 | + files: ['**/*.ts'], |
| 16 | + languageOptions: { |
| 17 | + parser: tseslint.parser, |
| 18 | + parserOptions: { |
| 19 | + ecmaVersion: 'latest', |
| 20 | + sourceType: 'module' |
| 21 | + }, |
| 22 | + globals: { |
| 23 | + ...globals.node, |
| 24 | + ...globals.jest |
| 25 | + } |
| 26 | + }, |
| 27 | + plugins: { |
| 28 | + 'simple-import-sort': simpleImportSort, |
| 29 | + 'unused-imports': unusedImports |
| 30 | + }, |
| 31 | + rules: { |
| 32 | + indent: ['error', 2], |
| 33 | + quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }], |
| 34 | + 'quote-props': ['error', 'as-needed'], |
| 35 | + semi: ['error', 'always'], |
| 36 | + 'comma-dangle': ['error', 'never'], |
| 37 | + 'simple-import-sort/imports': 1, |
| 38 | + 'simple-import-sort/exports': 1, |
| 39 | + 'unused-imports/no-unused-imports': 1, |
| 40 | + '@typescript-eslint/no-unused-vars': [1, { argsIgnorePattern: 'React|res|next|^_' }], |
| 41 | + '@typescript-eslint/no-explicit-any': 0, |
| 42 | + '@typescript-eslint/no-var-requires': 0, |
| 43 | + 'no-console': 0, |
| 44 | + '@typescript-eslint/ban-ts-comment': 0, |
| 45 | + 'prefer-const': 0, |
| 46 | + 'prefer-spread': 0, |
| 47 | + 'no-case-declarations': 0, |
| 48 | + 'no-implicit-globals': 0, |
| 49 | + '@typescript-eslint/no-unsafe-declaration-merging': 0 |
| 50 | + } |
| 51 | + }, |
| 52 | + prettierConfig |
| 53 | +]; |
0 commit comments