From df848834f582a1cba6e275d4dd408eeb95f5ef26 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 14 Feb 2020 01:54:49 +0400 Subject: feat(eslint): Rule "prefer-const" Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/default.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index c28c3f2..c6e9031 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -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" ], -- cgit v1.2.3