aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-13 23:03:58 +0300
committerValentin Popov <info@valentineus.link>2020-02-13 23:03:58 +0300
commite4814ec7a54eb944bad99650bed770c40a00ddee (patch)
treef3e322df77bc5a8a280c90916622306bb5bda0e7 /src
parentfc524a46098d1cfb4ca3991f41ea0b2f8334e404 (diff)
downloadeslint-config-e4814ec7a54eb944bad99650bed770c40a00ddee.tar.xz
eslint-config-e4814ec7a54eb944bad99650bed770c40a00ddee.zip
feat(typescript): Rule "no-magic-numbers"
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'src')
-rw-r--r--src/rules/typescript/default.json14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json
index 67d519e..283cdb8 100644
--- a/src/rules/typescript/default.json
+++ b/src/rules/typescript/default.json
@@ -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"
],