Merge pull request #8202 from Snuffleupagus/eslint-basic-es6-rules
Add a couple of basic ES6 rules to the ESLint config
This commit is contained in:
commit
07f7c97b2b
27
.eslintrc
27
.eslintrc
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 6,
|
"ecmaVersion": 6,
|
||||||
"sourceType": "module"
|
"sourceType": "module",
|
||||||
},
|
},
|
||||||
|
|
||||||
"env": {
|
"env": {
|
||||||
@ -86,6 +86,7 @@
|
|||||||
"no-delete-var": "error",
|
"no-delete-var": "error",
|
||||||
"no-label-var": "error",
|
"no-label-var": "error",
|
||||||
"no-shadow-restricted-names": "error",
|
"no-shadow-restricted-names": "error",
|
||||||
|
"no-shadow": "off",
|
||||||
"no-undef-init": "error",
|
"no-undef-init": "error",
|
||||||
"no-undef": ["error", { "typeof": true, }],
|
"no-undef": ["error", { "typeof": true, }],
|
||||||
"no-unused-vars": ["error", {
|
"no-unused-vars": ["error", {
|
||||||
@ -135,5 +136,29 @@
|
|||||||
}],
|
}],
|
||||||
|
|
||||||
// ECMAScript 6
|
// ECMAScript 6
|
||||||
|
"arrow-body-style": ["error", "as-needed"],
|
||||||
|
"arrow-parens": ["error", "always"],
|
||||||
|
"arrow-spacing": ["error", {
|
||||||
|
"before": true,
|
||||||
|
"after": true,
|
||||||
|
}],
|
||||||
|
"constructor-super": "error",
|
||||||
|
"no-class-assign": "error",
|
||||||
|
"no-confusing-arrow": "error",
|
||||||
|
"no-const-assign": "error",
|
||||||
|
"no-dupe-class-members": "error",
|
||||||
|
"no-duplicate-imports": "error",
|
||||||
|
"no-this-before-super": "error",
|
||||||
|
"no-useless-computed-key": "error",
|
||||||
|
"no-useless-constructor": "error",
|
||||||
|
"no-useless-rename": "error",
|
||||||
|
"object-shorthand": ["off", "always", {
|
||||||
|
"avoidQuotes": true,
|
||||||
|
}],
|
||||||
|
"rest-spread-spacing": ["error", "never"],
|
||||||
|
"sort-imports": ["error", {
|
||||||
|
"ignoreCase": true,
|
||||||
|
}],
|
||||||
|
"template-curly-spacing": ["error", "never"],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user