diff options
author | Valentin Popov <info@valentineus.link> | 2020-02-14 00:54:49 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-02-14 00:54:49 +0300 |
commit | df848834f582a1cba6e275d4dd408eeb95f5ef26 (patch) | |
tree | fb833c53bee83a10268414519ab9d8701d7883b1 | |
parent | 6feb5456418b15b25cdd6408a43c9af6f8c58fa9 (diff) | |
download | eslint-config-df848834f582a1cba6e275d4dd408eeb95f5ef26.tar.xz eslint-config-df848834f582a1cba6e275d4dd408eeb95f5ef26.zip |
feat(eslint): Rule "prefer-const"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | ROADMAP.md | 2 | ||||
-rw-r--r-- | src/rules/default.json | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -233,7 +233,7 @@ - [ ] "padded-blocks" - [ ] "padding-line-between-statements" - [ ] "prefer-arrow-callback" -- [ ] "prefer-const" +- [X] "prefer-const" - [ ] "prefer-destructuring" - [ ] "prefer-exponentiation-operator" - [ ] "prefer-named-capture-group" diff --git a/src/rules/default.json b/src/rules/default.json index f6d347b..5a92435 100644 --- a/src/rules/default.json +++ b/src/rules/default.json @@ -388,6 +388,13 @@ "error", "never" ], + "prefer-const": [ + "error", + { + "destructuring": "any", + "ignoreReadBeforeAssign": false + } + ], "prefer-reflect": [ "off" ], |