feat(typescript): Rule "no-magic-numbers"

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2020-02-14 00:03:58 +04:00
parent fc524a4609
commit e4814ec7a5
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3
2 changed files with 15 additions and 1 deletions

View File

@ -364,7 +364,7 @@
- [ ] "no-for-in-array"
- [ ] "no-implied-eval"
- [ ] "no-inferrable-types"
- [ ] "no-magic-numbers"
- [X] "no-magic-numbers"
- [ ] "no-misused-new"
- [ ] "no-misused-promises"
- [ ] "no-namespace"

View File

@ -46,6 +46,17 @@
"ignoreRestArgs": false
}
],
"@typescript-eslint/no-magic-numbers": [
"warn",
{
"detectObjects": false,
"enforceConst": true,
"ignoreArrayIndexes": false,
"ignoreEnums": true,
"ignoreNumericLiteralTypes": true,
"ignoreReadonlyClassProperties": true
}
],
"@typescript-eslint/quotes": [
"error",
"double",
@ -75,6 +86,9 @@
"indent": [
"off"
],
"no-magic-numbers": [
"off"
],
"quotes": [
"off"
],