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