-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.eslintrc.cjs
63 lines (63 loc) · 1.55 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
module.exports = {
env: {
browser: true,
es2021: true,
jest: true,
},
extends: ['airbnb', 'prettier', 'plugin:react/recommended', 'plugin:react/jsx-runtime'],
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'no-unused-vars': 'off', // covered by TypeScript
'arrow-body-style': ['off'],
'react/require-render-return': ['warn'],
'react/require-default-props': [
1,
{
forbidDefaultForRequired: true,
classes: 'defaultProps',
functions: 'ignore', // ignoring for now as buggy
},
],
'prettier/prettier': ['warn'],
'import/extensions': [
'warn',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
quotes: [1, 'single', { avoidEscape: true }],
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'no-plusplus': [2, { allowForLoopAfterthoughts: true }],
},
ignorePatterns: ['**/*.js'],
};