-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
49 lines (48 loc) · 1.19 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
export default [
{
files: ['**/*.{js,jsx,ts,tsx}'],
ignores: [
'dist/**',
'prettier.config.cjs',
'lint-staged.config.cjs',
'commitlint.config.cjs'
],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true
},
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: '.',
project: ['./tsconfig.json']
}
},
plugins: {
'@typescript-eslint': tsPlugin,
'react-hooks': reactHooksPlugin
},
rules: {
'linebreak-style': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
'{}': false
}
}
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'object-shorthand': 'error',
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }]
}
}
];