aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ROADMAP.md2
-rw-r--r--src/rules/typescript/default.json14
2 files changed, 15 insertions, 1 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index ba1bcfb..f13631f 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -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"
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"
],