|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + }, |
| 5 | + extends: ['airbnb', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], |
| 6 | + ignorePatterns: ['dist/*', 'plugins/*', 'tests/*', '/*.cjs', '/*.js', '/*.ts', '/**/*.test.ts', 'test/*'], |
| 7 | + parser: '@typescript-eslint/parser', |
| 8 | + parserOptions: { |
| 9 | + project: './tsconfig.json', |
| 10 | + tsconfigRootDir: './', |
| 11 | + }, |
| 12 | + settings: { |
| 13 | + 'import/resolver': { |
| 14 | + typescript: { |
| 15 | + project: './tsconfig.json', |
| 16 | + }, |
| 17 | + }, |
| 18 | + }, |
| 19 | + plugins: ['@typescript-eslint', 'import', 'prettier'], |
| 20 | + rules: { |
| 21 | + 'react/jsx-uses-react': 'off', |
| 22 | + 'react/react-in-jsx-scope': 'off', |
| 23 | + 'react/require-default-props': 'off', |
| 24 | + 'react/destructuring-assignment': 'off', |
| 25 | + 'no-underscore-dangle': 'off', |
| 26 | + '@typescript-eslint/no-explicit-any': 'off', |
| 27 | + 'no-console': 'off', |
| 28 | + '@typescript-eslint/no-this-alias': 'off', |
| 29 | + 'import/prefer-default-export': 'off', |
| 30 | + '@typescript-eslint/no-empty-function': 'off', |
| 31 | + 'no-shadow': 'off', |
| 32 | + '@typescript-eslint/no-shadow': ['error'], |
| 33 | + 'no-restricted-syntax': 'off', |
| 34 | + 'import/no-unresolved': ['error', { ignore: ['^virtual:'] }], |
| 35 | + 'consistent-return': 'off', |
| 36 | + 'no-continue': 'off', |
| 37 | + 'no-eval': 'off', |
| 38 | + 'no-await-in-loop': 'off', |
| 39 | + 'no-nested-ternary': 'off', |
| 40 | + 'no-param-reassign': ['error', { props: false }], |
| 41 | + 'prefer-destructuring': 'off', |
| 42 | + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], |
| 43 | + 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx', '.jsx'] }], |
| 44 | + 'import/extensions': [ |
| 45 | + 'error', |
| 46 | + 'ignorePackages', |
| 47 | + { |
| 48 | + ts: 'never', |
| 49 | + tsx: 'never', |
| 50 | + }, |
| 51 | + ], |
| 52 | + 'import/order': [ |
| 53 | + 'error', |
| 54 | + { |
| 55 | + groups: ['builtin', 'external', 'internal', ['sibling', 'parent'], 'index', 'unknown'], |
| 56 | + 'newlines-between': 'always', |
| 57 | + alphabetize: { |
| 58 | + order: 'asc', |
| 59 | + caseInsensitive: true, |
| 60 | + }, |
| 61 | + }, |
| 62 | + ], |
| 63 | + 'sort-imports': [ |
| 64 | + 'error', |
| 65 | + { |
| 66 | + ignoreCase: false, |
| 67 | + ignoreDeclarationSort: true, |
| 68 | + ignoreMemberSort: false, |
| 69 | + memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], |
| 70 | + allowSeparatedGroups: true, |
| 71 | + }, |
| 72 | + ], |
| 73 | + }, |
| 74 | +}; |
0 commit comments