aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-19 14:12:58 +0300
committerValentin Popov <info@valentineus.link>2020-02-19 14:12:58 +0300
commit1f204d1b8d29505a0ca6648fcad8be5a15bf114b (patch)
treef48d5f096a38280114e996723e5d62ced619eb18
parentb4225e342471be0ca478f3220d4414184d7cfdb7 (diff)
downloadeslint-config-1f204d1b8d29505a0ca6648fcad8be5a15bf114b.tar.xz
eslint-config-1f204d1b8d29505a0ca6648fcad8be5a15bf114b.zip
feat(vue): sort-keys
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md1
-rw-r--r--src/rules/vue/default.json34
2 files changed, 35 insertions, 0 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index db959fa..1d9da80 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -593,6 +593,7 @@
- [ ] "return-in-computed-property"
- [X] "script-indent"
- [ ] "singleline-html-element-content-newline"
+- [X] "sort-keys"
- [X] "space-infix-ops"
- [ ] "space-unary-ops"
- [ ] "static-class-names-order"
diff --git a/src/rules/vue/default.json b/src/rules/vue/default.json
index d0097a1..762e830 100644
--- a/src/rules/vue/default.json
+++ b/src/rules/vue/default.json
@@ -91,6 +91,40 @@
"switchCase": 1
}
],
+ "vue/sort-keys": [
+ "warn",
+ "asc",
+ {
+ "caseSensitive": true,
+ "ignoreChildrenOf": [
+ "model"
+ ],
+ "ignoreGrandchildrenOf": [
+ "activated",
+ "beforeCreate",
+ "beforeDestroy",
+ "beforeMount",
+ "beforeUpdate",
+ "components",
+ "computed",
+ "created",
+ "data",
+ "deactivated",
+ "destroyed",
+ "directives",
+ "errorCaptured",
+ "filters",
+ "methods",
+ "mounted",
+ "name",
+ "props",
+ "updated",
+ "watch"
+ ],
+ "minKeys": 2,
+ "natural": true
+ }
+ ],
"vue/space-infix-ops": [
"error",
{