-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.cjs
39 lines (39 loc) · 1.27 KB
/
.eslintrc.cjs
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
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['plugin:prettier/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', 'plugin:@typescript-eslint/recommended'],
plugins: ['eslint-plugin-simple-import-sort', 'cypress'],
rules: {
// we use jsx-runtime automatic
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/no-unknown-property": ['error', { ignore: ['css'] }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
"@typescript-eslint/no-explicit-any": "off",
'prefer-const': ['error', { destructuring: 'all' }],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
curly: ['error', 'multi-line', 'consistent'],
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, varsIgnorePattern: 'jsx|^_', argsIgnorePattern: '^_' },
],
'no-console': ['error', { allow: ['warn', 'error'] }],
},
settings: {
react: {
version: 'detect',
}
},
overrides: [
{
files: '**/*.{stories,spec,test}.{ts,tsx}',
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'react/prop-types': 'off',
},
env: {
'cypress/globals': true,
}
},
],
};