chore: Make eslint stricter (#23869)

Error for
- Invalid tab style
- No space between unary operations
- Space between blocks

Warn for
- Comma Spacing
- Block Spacing
- Object Key Spacing
- Keyword Spacing
This commit is contained in:
Suraj Shetty 2020-11-09 19:10:43 +05:30 committed by GitHub
parent 30d58cc3d7
commit d038a80c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 9,
"sourceType": "module"
},
"extends": "eslint:recommended",
@ -15,6 +15,14 @@
"tab",
{ "SwitchCase": 1 }
],
"brace-style": [
"error",
"1tbs"
],
"space-unary-ops": [
"error",
{ "words": true }
],
"linebreak-style": [
"error",
"unix"
@ -44,12 +52,10 @@
"no-control-regex": [
"off"
],
"spaced-comment": [
"warn"
],
"no-trailing-spaces": [
"warn"
]
"space-before-blocks": "warn",
"keyword-spacing": "warn",
"comma-spacing": "warn",
"key-spacing": "warn"
},
"root": true,
"globals": {