|
| 1 | +module.exports = { |
| 2 | + env: { browser: true }, |
| 3 | + extends: [ |
| 4 | + 'plugin:@typescript-eslint/recommended', |
| 5 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 6 | + 'plugin:react/recommended', |
| 7 | + 'plugin:react-hooks/recommended', |
| 8 | + 'next/core-web-vitals', |
| 9 | + 'prettier' |
| 10 | + ], |
| 11 | + plugins: ['react', 'react-hooks'], |
| 12 | + parser: '@typescript-eslint/parser', |
| 13 | + parserOptions: { |
| 14 | + ecmaFeatures: { jsx: true }, |
| 15 | + project: './tsconfig.json' |
| 16 | + }, |
| 17 | + settings: { |
| 18 | + react: { version: 'detect' } |
| 19 | + }, |
| 20 | + rules: { |
| 21 | + 'import/order': [ |
| 22 | + 'error', |
| 23 | + { |
| 24 | + groups: ['builtin', 'external', 'internal', 'unknown'], |
| 25 | + pathGroups: [ |
| 26 | + { |
| 27 | + pattern: '{@chakra-ui,@storybook}/**', |
| 28 | + group: 'external', |
| 29 | + position: 'after' |
| 30 | + } |
| 31 | + ], |
| 32 | + pathGroupsExcludedImportTypes: ['builtin'], |
| 33 | + 'newlines-between': 'always', |
| 34 | + alphabetize: { order: 'asc', caseInsensitive: true } |
| 35 | + } |
| 36 | + ], |
| 37 | + 'no-console': ['error', { allow: ['info', 'warn', 'error'] }], |
| 38 | + 'react-hooks/rules-of-hooks': 'error', |
| 39 | + 'react-hooks/exhaustive-deps': 'warn' |
| 40 | + }, |
| 41 | + ignorePatterns: ['**/*.js'] |
| 42 | +} |
0 commit comments