-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
93 lines (93 loc) · 2.27 KB
/
.eslintrc.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = {
extends: [
'airbnb',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
'plugin:mdx/recommended',
'plugin:@typescript-eslint/recommended',
],
root: true,
plugins: ['jest', 'prettier', '@typescript-eslint', 'react-hooks'],
env: {
browser: true,
node: true,
'jest/globals': true,
},
overrides: [
{
files: ['*.test.tsx', '*.stories.tsx'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
{
files: ['*.stories.mdx'],
rules: {
'import/prefer-default-export': 'off',
'react/jsx-fragments': 'off',
},
},
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
tsconfigRootDir: __dirname,
},
rules: {
'no-console': 'error',
'prettier/prettier': ['error'],
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/default-props-match-prop-types': 'off',
'react/jsx-wrap-multilines': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-unused-vars': 'off',
'no-restricted-exports': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
},
],
'react/jsx-filename-extension': [
1,
{
extensions: ['.ts', '.tsx', '.mdx'],
},
],
'react/jsx-props-no-spreading': 'off',
semi: ['error', 'never'],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'no-use-before-define': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-type-imports': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.mdx'],
},
},
},
}