-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
78 lines (78 loc) · 2.18 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
root: true,
extends: ['airbnb', 'airbnb/hooks'],
env: {
browser: true
},
ignorePatterns: [
'**/dist/**'
],
rules: {
'comma-dangle': 'off',
'max-len': ['warn', {
code: 100,
ignoreComments: true,
ignoreStrings: true
}],
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-first-prop-new-line': 'off',
'react/jsx-max-props-per-line': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-closing-tag-location': 'off',
'react/destructuring-assignment': 'off',
'react/require-default-props': 'off',
'react/jsx-no-bind': 'off',
'react/prop-types': 'off',
'operator-linebreak': 'off',
'object-curly-newline': 'off',
'no-restricted-globals': 'off',
'function-paren-newline': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-return-assign': 'off',
'no-undef': 'off',
// This rule doesn't work with generic components
'react/jsx-props-no-multi-spaces': 'off',
'jsx-a11y/aria-role': ['error', {
ignoreNonDOM: true
}],
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true
}],
// I don't agree with Airbnb's reason for blocking for loops: https://github.com/airbnb/javascript/issues/1271
'no-restricted-syntax': 'off',
'no-continue': 'off',
'import/no-extraneous-dependencies': 'off',
'no-empty': ['error', {
allowEmptyCatch: true
}],
'lines-between-class-members': ['error', {
enforce: [{
blankLine: 'always',
prev: '*',
next: '*'
}, {
blankLine: 'never',
prev: 'field',
next: 'field'
}]
}]
},
plugins: [
'@typescript-eslint'
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
tsconfigRootDir: __dirname
}
};