-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy path.eslintrc.js
77 lines (77 loc) · 2.3 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
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'standard-with-typescript',
'airbnb',
'airbnb-typescript',
],
overrides: [
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './api/tsconfig.json'],
ecmaFeatures: {
jsx: true
}
},
plugins: [
'jsx-a11y',
'react',
'react-hooks'
],
rules: {
'react/jsx-no-constructed-context-values': 'warn',
'no-trailing-spaces': 'off',
'react/function-component-definition': 'warn',
"max-len": ["warn", { "code": 170, "ignoreComments": true }],
'react/button-has-type': 'warn',
'import/extensions': 'off',
'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton']
}
],
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': 'off',
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
indent: ['error', 2, {
ignoredNodes: ['TemplateLiteral'],
SwitchCase: 1
}],
'no-unused-vars': 'off',
'multiline-ternary': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/no-unused-vars': 'off',
semi: [2, 'always'],
'@typescript-eslint/semi': [2, 'always'],
'@typescript-eslint/triple-slash-reference': 'off',
'react/jsx-indent-props': [2, 'first'],
'react/jsx-max-props-per-line': [2, { when: 'multiline' }],
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
"object-curly-newline": ["error", {
"multiline": true,
"minProperties": 5,
}]
}
};