From 6d8a2fbba082842da98168573ca2ed05e5dd842b Mon Sep 17 00:00:00 2001 From: inker Date: Sun, 19 Apr 2020 03:17:11 +0100 Subject: [PATCH] New: Add `vue/require-shorthand-boolean-prop` rule --- docs/rules/README.md | 1 + docs/rules/require-shorthand-boolean-prop.md | 66 ++++++++ lib/index.js | 1 + lib/rules/require-shorthand-boolean-prop.js | 73 ++++++++ .../rules/require-shorthand-boolean-prop.js | 157 ++++++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 docs/rules/require-shorthand-boolean-prop.md create mode 100644 lib/rules/require-shorthand-boolean-prop.js create mode 100644 tests/lib/rules/require-shorthand-boolean-prop.js diff --git a/docs/rules/README.md b/docs/rules/README.md index cc2a97313..d7b9d4a45 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -277,6 +277,7 @@ For example: | [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: | | [vue/require-direct-export](./require-direct-export.md) | require the component to be directly exported | | | [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | | +| [vue/require-shorthand-boolean-prop](./require-shorthand-boolean-prop.md) | enforce or forbid passing `true` value to a prop | | | [vue/script-indent](./script-indent.md) | enforce consistent indentation in `