aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-13 21:39:15 +0300
committerValentin Popov <info@valentineus.link>2020-02-13 21:39:15 +0300
commit7ecc10853dac4302e2fffb29df4c24d095075343 (patch)
tree7fe9c3469cc2bfd18dec7651ec30897850f81170
parent7a65b14bef98916dd729136e3b25649e8d57e6ac (diff)
downloadeslint-config-7ecc10853dac4302e2fffb29df4c24d095075343.tar.xz
eslint-config-7ecc10853dac4302e2fffb29df4c24d095075343.zip
feat(eslint): Rule "new-cap"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md2
-rw-r--r--src/rules/default.json8
2 files changed, 9 insertions, 1 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index 19b0e54..95e798a 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -72,7 +72,7 @@
- [ ] "max-statements-per-line"
- [ ] "multiline-comment-style"
- [ ] "multiline-ternary"
-- [ ] "new-cap"
+- [X] "new-cap"
- [ ] "new-parens"
- [X] "newline-after-var"
- [X] "newline-before-return"
diff --git a/src/rules/default.json b/src/rules/default.json
index f8b704d..ee9a2f6 100644
--- a/src/rules/default.json
+++ b/src/rules/default.json
@@ -89,6 +89,14 @@
"lines-around-directive": [
"off"
],
+ "new-cap": [
+ "error",
+ {
+ "capIsNew": true,
+ "newIsCap": true,
+ "properties": false
+ }
+ ],
"newline-after-var": [
"off"
],