summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-14 01:16:26 +0300
committerValentin Popov <info@valentineus.link>2020-02-14 01:16:26 +0300
commit46abf32d58915ba5da1374ac1f0a114174db41d0 (patch)
tree4bbb05c897f515de603e6cb5a0fae055eab02fce
parentccea0635e4431dcc8bc68207db187c891158f837 (diff)
downloadeslint-config-46abf32d58915ba5da1374ac1f0a114174db41d0.tar.xz
eslint-config-46abf32d58915ba5da1374ac1f0a114174db41d0.zip
feat(eslint): Rule "object-shorthand"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md2
-rw-r--r--src/rules/default.json4
2 files changed, 5 insertions, 1 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index a997aaa..be063ab 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -225,7 +225,7 @@
- [X] "object-curly-newline"
- [X] "object-curly-spacing"
- [X] "object-property-newline"
-- [ ] "object-shorthand"
+- [X] "object-shorthand"
- [X] "one-var"
- [ ] "one-var-declaration-per-line"
- [ ] "operator-assignment"
diff --git a/src/rules/default.json b/src/rules/default.json
index a2f5c79..905aa50 100644
--- a/src/rules/default.json
+++ b/src/rules/default.json
@@ -384,6 +384,10 @@
"allowAllPropertiesOnSameLine": false
}
],
+ "object-shorthand": [
+ "error",
+ "consistent-as-needed"
+ ],
"one-var": [
"error",
"never"