|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es2020: true, |
| 5 | + node: true, |
| 6 | + jest: true, |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'eslint:recommended', |
| 10 | + 'plugin:react/recommended', |
| 11 | + 'plugin:react/jsx-runtime', |
| 12 | + 'plugin:react-hooks/recommended', |
| 13 | + 'airbnb', |
| 14 | + 'plugin:prettier/recommended', |
| 15 | + ], |
| 16 | + parserOptions: { |
| 17 | + ecmaVersion: 'latest', |
| 18 | + sourceType: 'module', |
| 19 | + ecmaFeatures: { |
| 20 | + jsx: true, |
| 21 | + }, |
| 22 | + }, |
| 23 | + settings: { |
| 24 | + react: { |
| 25 | + version: 'detect', |
| 26 | + }, |
| 27 | + }, |
| 28 | + plugins: [ |
| 29 | + 'react', |
| 30 | + 'react-hooks', |
| 31 | + 'react-refresh', |
| 32 | + 'prettier', |
| 33 | + 'jsx-a11y', |
| 34 | + ], |
| 35 | + rules: { |
| 36 | + camelcase: 0, |
| 37 | + 'react/style-prop-object': 0, |
| 38 | + 'global-require': 0, |
| 39 | + 'import/newline-after-import': 0, |
| 40 | + 'import/no-dynamic-require': 0, |
| 41 | + 'import/no-extraneous-dependencies': 0, |
| 42 | + 'jsx-a11y/anchor-is-valid': ['error'], |
| 43 | + 'no-console': 0, |
| 44 | + 'no-duplicate-imports': 0, |
| 45 | + 'no-unused-vars': [ |
| 46 | + 'error', |
| 47 | + { |
| 48 | + argsIgnorePattern: '^_', // Ignore params starting with underscore |
| 49 | + varsIgnorePattern: '^_', // Ignore variables starting with underscore |
| 50 | + caughtErrorsIgnorePattern: '^_', // Ignore caught errors starting with underscore |
| 51 | + }, |
| 52 | + ], |
| 53 | + 'one-var': 0, |
| 54 | + 'prettier/prettier': ['error'], |
| 55 | + 'react/forbid-prop-types': [0, { checkChildContextTypes: false }], |
| 56 | + 'react/jsx-filename-extension': [1, { extensions: ['.jsx'] }], |
| 57 | + 'react/jsx-props-no-spreading': 0, |
| 58 | + 'react/jsx-sort-props': ['error'], |
| 59 | + 'react/prop-types': 0, |
| 60 | + 'react/sort-comp': ['error'], |
| 61 | + 'object-literal-sort-keys': 0, |
| 62 | + 'react/jsx-no-target-blank': 'off', |
| 63 | + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], |
| 64 | + semi: ['error', 'always'], |
| 65 | + }, |
| 66 | + ignorePatterns: ['**/dist/**', '**/node_modules/**', '**/build/**', '**/coverage/**'], |
| 67 | +}; |
0 commit comments