From 66cf8edca51321e118583235594bbaf9fd6c6147 Mon Sep 17 00:00:00 2001 From: Dale Sande Date: Tue, 22 Jun 2021 12:42:03 -0700 Subject: [PATCH] feat(rules): update indent and magic numbers rules #4 --- .eslintrc.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ae02495..6e147b1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,5 @@ module.exports = { + "ignorePatterns": ["test/*.js", ".eslintrc.js"], "env": { "browser": true, "es6": true @@ -67,7 +68,7 @@ module.exports = { "id-length": "error", "id-match": "error", "implicit-arrow-linebreak": "error", - "indent": ["error", 2, { "SwitchCase": 1 }], + "indent": ["error", 2, { "SwitchCase": 1 }, { "ignoredNodes": ["TemplateLiteral > *"] }], "indent-legacy": "off", "init-declarations": "error", "jsx-quotes": "error", @@ -131,7 +132,13 @@ module.exports = { "no-lone-blocks": "error", "no-lonely-if": "error", "no-loop-func": "error", - "no-magic-numbers": "error", + "no-magic-numbers": [ + "error", + { + "ignore": [0, 1], + "ignoreArrayIndexes": true + } + ], "no-mixed-operators": "error", "no-mixed-requires": "error", "no-multi-assign": "error",