From 15ecc0626e88be39a114ea63abaf772528469a47 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Wed, 15 Jul 2020 11:29:16 +0900 Subject: [PATCH] Add `vue/no-sparse-arrays` rule --- docs/rules/README.md | 1 + docs/rules/no-sparse-arrays.md | 23 ++++++++++++ lib/index.js | 1 + lib/rules/no-sparse-arrays.js | 9 +++++ tests/lib/rules/no-sparse-arrays.js | 55 +++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 docs/rules/no-sparse-arrays.md create mode 100644 lib/rules/no-sparse-arrays.js create mode 100644 tests/lib/rules/no-sparse-arrays.js diff --git a/docs/rules/README.md b/docs/rules/README.md index 3dc1c2550..33285ae25 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -338,6 +338,7 @@ The following rules extend the rules provided by ESLint itself and apply them to | [vue/no-extra-parens](./no-extra-parens.md) | disallow unnecessary parentheses | :wrench: | | [vue/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace | | | [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax | | +| [vue/no-sparse-arrays](./no-sparse-arrays.md) | disallow sparse arrays | | | [vue/no-useless-concat](./no-useless-concat.md) | disallow unnecessary concatenation of literals or template literals | | | [vue/object-curly-newline](./object-curly-newline.md) | enforce consistent line breaks inside braces | :wrench: | | [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces | :wrench: | diff --git a/docs/rules/no-sparse-arrays.md b/docs/rules/no-sparse-arrays.md new file mode 100644 index 000000000..ea0678c16 --- /dev/null +++ b/docs/rules/no-sparse-arrays.md @@ -0,0 +1,23 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/no-sparse-arrays +description: disallow sparse arrays +--- +# vue/no-sparse-arrays +> disallow sparse arrays + +This rule is the same rule as core [no-sparse-arrays] rule but it applies to the expressions in `