-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
118 lines (118 loc) · 3.48 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
jest: true,
},
extends: [
'google',
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:jsdoc/recommended',
'plugin:cypress/recommended',
],
overrides: [{
files: ['*.js', '*.mjs', '*.jsx', '*.ts', '*.tsx'],
}],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: [
'import',
'@typescript-eslint',
],
rules: {
'object-curly-spacing': 'off',
'computed-property-spacing': 'off',
'no-multi-spaces': 'off',
'padded-blocks': 'off',
'import/newline-after-import': ['error', {count: 2}],
'max-len': ['error', 100], // eslint-disable-line no-magic-numbers
'no-irregular-whitespace': ['error'],
'no-trailing-spaces': ['error'],
'prefer-rest-params': 'off',
'quote-props': ['error', 'consistent-as-needed'],
'react/prop-types': 'off',
'semi': ['error', 'never'],
'arrow-spacing': ['error', {before: true, after: true}],
'space-infix-ops': ['error'],
'react/jsx-equals-spacing': [2, 'never'], // eslint-disable-line no-magic-numbers
'curly': ['error', 'all'],
'default-case': 'error',
'default-param-last': ['error'],
'eqeqeq': ['error', 'always'],
'no-empty-function': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-operators': 'error',
'no-magic-numbers': ['error', {
ignore: [-1, 0, 1],
ignoreArrayIndexes: true,
ignoreDefaultValues: true}],
'no-multi-assign': ['error', {ignoreNonDeclaration: true}],
'no-return-assign': 'error',
'no-shadow': 'error',
'no-undef-init': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-return': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
'yoda': 'error',
'arrow-parens': ['error', 'always'],
'block-spacing': 'error',
'brace-style': 'error',
'comma-style': ['error', 'last'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
'react/jsx-closing-bracket-location': 'error',
'react/jsx-tag-spacing': ['error', { beforeSelfClosing: 'never' }],
'react/jsx-closing-tag-location': 'error',
'react/self-closing-comp': 'error',
'valid-jsdoc': 'off',
'jsdoc/newline-after-description': 'error',
'jsdoc/check-types': 'error',
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-param-type': 'off',
'require-await': 'error',
'linebreak-style': ['error', 'unix'],
'no-alert': 'error',
'no-debugger': 'error',
},
ignorePatterns: [
'**/compiled/**',
'**/ifc/ifc4_gen/**',
'/external/**',
'**/ifc_functions.ts',
'**/AP214E3_2010/AP214E3_2010_gen/**',
],
settings: {
react: {
version: '17.0.2',
},
jsdoc: {
tagNamePreference: {
returns: 'return',
},
},
},
reportUnusedDisableDirectives: true,
}