1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | module.exports = {
|
9 | root: true,
|
10 | parser: 'babel-eslint',
|
11 |
|
12 | extends: [
|
13 | './rules/import',
|
14 | './rules/jest',
|
15 | './rules/flow',
|
16 | './rules/react',
|
17 | './rules/react-a11y',
|
18 | ].map(require.resolve),
|
19 |
|
20 | env: {
|
21 | browser: true,
|
22 | commonjs: true,
|
23 | es6: true,
|
24 | node: true,
|
25 | },
|
26 |
|
27 | globals: {
|
28 | document: true,
|
29 | window: true,
|
30 | console: true,
|
31 | navigator: true,
|
32 | requestAnimationFrame: true,
|
33 | },
|
34 |
|
35 | parserOptions: {
|
36 | ecmaVersion: 6,
|
37 | sourceType: 'module',
|
38 | ecmaFeatures: {
|
39 | generators: true,
|
40 | experimentalObjectRestSpread: true,
|
41 | },
|
42 | },
|
43 |
|
44 | rules: {
|
45 |
|
46 | 'array-callback-return': 'warn',
|
47 | 'default-case': ['warn', { commentPattern: '^no default$' }],
|
48 | 'dot-location': ['warn', 'property'],
|
49 | eqeqeq: ['warn', 'allow-null'],
|
50 | 'new-parens': 'warn',
|
51 | 'no-array-constructor': 'warn',
|
52 | 'no-caller': 'warn',
|
53 | 'no-cond-assign': ['warn', 'always'],
|
54 | 'no-const-assign': 'warn',
|
55 | 'no-control-regex': 'warn',
|
56 | 'no-delete-var': 'warn',
|
57 | 'no-dupe-args': 'warn',
|
58 | 'no-dupe-class-members': 'warn',
|
59 | 'no-dupe-keys': 'warn',
|
60 | 'no-duplicate-case': 'warn',
|
61 | 'no-empty-character-class': 'warn',
|
62 | 'no-empty-pattern': 'warn',
|
63 | 'no-eval': 'warn',
|
64 | 'no-ex-assign': 'warn',
|
65 | 'no-extend-native': 'warn',
|
66 | 'no-extra-bind': 'warn',
|
67 | 'no-extra-label': 'warn',
|
68 | 'no-fallthrough': 'warn',
|
69 | 'no-func-assign': 'warn',
|
70 | 'no-implied-eval': 'warn',
|
71 | 'no-invalid-regexp': 'warn',
|
72 | 'no-iterator': 'warn',
|
73 | 'no-label-var': 'warn',
|
74 | 'no-labels': ['warn', { allowLoop: true, allowSwitch: false }],
|
75 | 'no-lone-blocks': 'warn',
|
76 | 'no-loop-func': 'warn',
|
77 | 'no-mixed-operators': [
|
78 | 'warn',
|
79 | {
|
80 | groups: [
|
81 | ['&', '|', '^', '~', '<<', '>>', '>>>'],
|
82 | ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
83 | ['&&', '||'],
|
84 | ['in', 'instanceof'],
|
85 | ],
|
86 | allowSamePrecedence: false,
|
87 | },
|
88 | ],
|
89 | 'no-multi-str': 'warn',
|
90 | 'no-native-reassign': 'warn',
|
91 | 'no-negated-in-lhs': 'warn',
|
92 | 'no-new-func': 'warn',
|
93 | 'no-new-object': 'warn',
|
94 | 'no-new-symbol': 'warn',
|
95 | 'no-new-wrappers': 'warn',
|
96 | 'no-obj-calls': 'warn',
|
97 | 'no-octal': 'warn',
|
98 | 'no-octal-escape': 'warn',
|
99 | 'no-redeclare': 'warn',
|
100 | 'no-regex-spaces': 'warn',
|
101 | 'no-restricted-syntax': ['warn', 'WithStatement'],
|
102 | 'no-script-url': 'warn',
|
103 | 'no-self-assign': 'warn',
|
104 | 'no-self-compare': 'warn',
|
105 | 'no-sequences': 'warn',
|
106 | 'no-shadow-restricted-names': 'warn',
|
107 | 'no-sparse-arrays': 'warn',
|
108 | 'no-template-curly-in-string': 'warn',
|
109 | 'no-this-before-super': 'warn',
|
110 | 'no-throw-literal': 'warn',
|
111 | 'no-undef': 'error',
|
112 | 'no-restricted-globals': ['error', 'event'],
|
113 | 'no-unexpected-multiline': 'warn',
|
114 | 'no-unreachable': 'warn',
|
115 | 'no-unused-expressions': [
|
116 | 'warn',
|
117 | {
|
118 | allowShortCircuit: true,
|
119 | allowTernary: true,
|
120 | },
|
121 | ],
|
122 | 'no-unused-labels': 'warn',
|
123 | 'no-unused-vars': [
|
124 | 'warn',
|
125 | {
|
126 | vars: 'local',
|
127 | varsIgnorePattern: '^_',
|
128 | args: 'none',
|
129 | ignoreRestSiblings: true,
|
130 | },
|
131 | ],
|
132 | 'no-use-before-define': ['warn', 'nofunc'],
|
133 | 'no-useless-computed-key': 'warn',
|
134 | 'no-useless-concat': 'warn',
|
135 | 'no-useless-constructor': 'warn',
|
136 | 'no-useless-escape': 'warn',
|
137 | 'no-useless-rename': [
|
138 | 'warn',
|
139 | {
|
140 | ignoreDestructuring: false,
|
141 | ignoreImport: false,
|
142 | ignoreExport: false,
|
143 | },
|
144 | ],
|
145 | 'no-with': 'warn',
|
146 | 'no-whitespace-before-property': 'warn',
|
147 | 'operator-assignment': ['warn', 'always'],
|
148 | radix: 'warn',
|
149 | 'require-yield': 'warn',
|
150 | 'rest-spread-spacing': ['warn', 'never'],
|
151 | strict: ['warn', 'never'],
|
152 | 'unicode-bom': ['warn', 'never'],
|
153 | 'use-isnan': 'warn',
|
154 | 'valid-typeof': 'warn',
|
155 | },
|
156 | }; |
\ | No newline at end of file |