From 9a9461a12dffc22ca236e8507706bde0c3a4ff26 Mon Sep 17 00:00:00 2001 From: Jonathan Santerre Date: Thu, 4 Feb 2021 19:18:09 -0500 Subject: [PATCH] New: vue/html-button-has-type rule (#1001) * New: vue/html-button-has-type rule (fixes #894) * more precise error location * revert npm run update deleted script indent doc ref * fix: eslint-plugin-import when running lint * fix lint errors * update readme and docs * Support bind type attribute --- docs/rules/README.md | 1 + docs/rules/html-button-has-type.md | 64 +++++++++ lib/configs/recommended.js | 1 + lib/index.js | 1 + lib/rules/html-button-has-type.js | 102 ++++++++++++++ tests/lib/rules/html-button-has-type.js | 170 ++++++++++++++++++++++++ 6 files changed, 339 insertions(+) create mode 100644 docs/rules/html-button-has-type.md create mode 100644 lib/rules/html-button-has-type.js create mode 100644 tests/lib/rules/html-button-has-type.js diff --git a/docs/rules/README.md b/docs/rules/README.md index 0fd8e2fa1..6b9680a97 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -263,6 +263,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi |:--------|:------------|:---| | [vue/attributes-order](./attributes-order.md) | enforce order of attributes | :wrench: | | [vue/component-tags-order](./component-tags-order.md) | enforce order of component top-level elements | | +| [vue/html-button-has-type](./html-button-has-type.md) | disallow usage of button without an explicit type attribute | | | [vue/no-lone-template](./no-lone-template.md) | disallow unnecessary `