-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·124 lines (124 loc) · 3.15 KB
/
index.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
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
119
120
121
122
123
124
module.exports = {
extends: ['airbnb', 'xo', 'xo-react', 'prettier', 'plugin:react/recommended'],
plugins: ['prettier', 'prefer-arrow', 'unused-imports'],
rules: {
'prettier/prettier': [
'error',
{
semi: false,
trailingComma: 'all',
singleQuote: true,
useTabs: true,
},
],
'react/jsx-uses-vars': 'error',
'no-console': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-for': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'no-constant-condition': 'off',
'no-await-in-loop': 'off',
'global-require': 'off',
'no-useless-constructor': 'error',
'no-underscore-dangle': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'test/**',
'tests/**',
'spec/**',
'**/__tests__/**',
'**/__mocks__/**',
'test.{js,jsx}',
'test-*.{js,jsx}',
'**/*{.,_}{test,spec}.{js,jsx}',
'**/*.config.js',
'**/*.config.*.js',
'**/wallaby.js',
'**/gulpfile.js',
'**/gulpfile.*.js',
'**/Gruntfile{,.js}',
'**/protractor.conf.js',
'**/protractor.conf.*.js',
],
optionalDependencies: false,
},
],
'no-empty-function': [
'error',
{
allow: ['constructors', 'arrowFunctions'],
},
],
'no-restricted-syntax': [
'error',
{
selector: 'ForInStatement',
message:
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
},
{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message:
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
'react/jsx-one-expression-per-line': 'off',
'react/destructuring-assignment': 'off',
'no-inner-declarations': 'off',
'no-cond-assign': ['error', 'except-parens'],
curly: ['error', 'all'],
'react/jsx-indent': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'no-param-reassign': 'off',
'import/no-cycle': 'off',
'react/self-closing-comp': 'error',
'jsx-a11y/media-has-caption': 'off',
'react/display-name': 'off',
'arrow-body-style': ['error', 'as-needed'],
'prefer-arrow/prefer-arrow-functions': 'off',
'react/jsx-props-no-spreading': ['off'],
'react/jsx-filename-extension': [
'error',
{ allow: 'as-needed', extensions: ['.jsx', '.tsx'] },
],
'import/extensions': ['off'],
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'react/no-unknown-property': 'off',
},
env: {
node: true,
browser: true,
jest: true,
},
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
}