From 9fff64d1119f4df4ddf867b0a3a0fe92e7bb8d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sajn=C3=B3g?= Date: Mon, 26 Jun 2017 23:00:21 +0200 Subject: [PATCH] New rule `order-in-components` (#42) * Add new rule "order-in-components" * Add initial implementation of `order-in-components` rule * Update test scripts * Improve order-in-components rule, add more test scenarios * Update readme * Update order-in-components docs * Update rule logic and fix tests * Fix order logic * Check for arguments existance * Apply order-in-components rule only to exported ObjectExpressions in .vue and .jsx files * Disable recommended setting in `order-in-components` rule --- README.md | 1 + docs/rules/order-in-components.md | 87 ++++++++ lib/recommended-rules.js | 1 + lib/rules/order-in-components.js | 148 +++++++++++++ package-lock.json | 2 +- package.json | 4 +- tests/lib/rules/order-in-components.js | 278 +++++++++++++++++++++++++ 7 files changed, 518 insertions(+), 3 deletions(-) create mode 100644 docs/rules/order-in-components.md create mode 100644 lib/rules/order-in-components.js create mode 100644 tests/lib/rules/order-in-components.js diff --git a/README.md b/README.md index bd50cf3e7..f9fb1eae9 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ The `--fix` option on the command line automatically fixes problems reported by | :white_check_mark: | [no-confusing-v-for-v-if](./docs/rules/no-confusing-v-for-v-if.md) | disallow confusing `v-for` and `v-if` on the same element. | | | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplicate arguments. | | :white_check_mark: | [no-textarea-mustache](./docs/rules/no-textarea-mustache.md) | disallow mustaches in `