Skip to content

Commit 4f3c690

Browse files
committed
upd config due to new airbnb changes. Forbid some rules.
1 parent 5d4e862 commit 4f3c690

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

index.js

+27
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
'no-debugger': 1,
1414
'max-nested-callbacks': [1, 3],
1515
'no-console': 1,
16+
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
1617
'indent': [2, 4, {'SwitchCase': 1}],
1718
'react/jsx-indent': [2, 4],
1819
'react/jsx-indent-props': [2, 4],
@@ -27,8 +28,34 @@ module.exports = {
2728
'no-param-reassign': 0,
2829
'no-empty-pattern': 0,
2930
"no-duplicate-imports": 0,
31+
3032
"import/no-duplicates": 2,
3133
"import/no-commonjs": 2,
34+
"import/prefer-default-export": 0,
35+
"import/no-extraneous-dependencies": 0,
3236
"import/extensions": 0,
37+
38+
"comma-dangle": ["error", {
39+
"arrays": "only-multiline",
40+
"objects": "only-multiline",
41+
"imports": "only-multiline",
42+
"exports": "only-multiline",
43+
"functions": "ignore"
44+
}],
45+
46+
"no-restricted-syntax": ["error",
47+
{
48+
"selector": "ForInStatement",
49+
"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."
50+
},
51+
{
52+
"selector": "LabeledStatement",
53+
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
54+
},
55+
{
56+
"selector": "WithStatement",
57+
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
58+
}
59+
],
3360
}
3461
};

0 commit comments

Comments
 (0)