From 70896a5ca4f8d28ae8971fc2e2a734344f3fc6bf Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 29 Mar 2020 00:40:31 +0900 Subject: [PATCH 1/2] New: add `vue/no-template-no-target-blank` rule --- docs/rules/README.md | 1 + docs/rules/no-template-target-blank.md | 99 +++++++++++++++++ lib/index.js | 1 + lib/rules/no-template-target-blank.js | 111 ++++++++++++++++++++ tests/lib/rules/no-template-target-blank.js | 68 ++++++++++++ 5 files changed, 280 insertions(+) create mode 100644 docs/rules/no-template-target-blank.md create mode 100644 lib/rules/no-template-target-blank.js create mode 100644 tests/lib/rules/no-template-target-blank.js diff --git a/docs/rules/README.md b/docs/rules/README.md index e184873e5..ad720cb3f 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -272,6 +272,7 @@ For example: | [vue/no-reserved-component-names](./no-reserved-component-names.md) | disallow the use of reserved names in component definitions | | | [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax | | | [vue/no-static-inline-styles](./no-static-inline-styles.md) | disallow static inline `style` attributes | | +| [vue/no-template-target-blank](./no-template-target-blank.md) | disallow target="_blank" attribute without rel="noopener noreferrer" | | | [vue/no-unsupported-features](./no-unsupported-features.md) | disallow unsupported Vue.js syntax on the specified version | :wrench: | | [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces | :wrench: | | [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: | diff --git a/docs/rules/no-template-target-blank.md b/docs/rules/no-template-target-blank.md new file mode 100644 index 000000000..ecf9c85af --- /dev/null +++ b/docs/rules/no-template-target-blank.md @@ -0,0 +1,99 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/no-template-target-blank +description: disallow target="_blank" attribute without rel="noopener noreferrer" +--- +# vue/no-template-target-blank +> disallow target="_blank" attribute without rel="noopener noreferrer" + +## :book: Rule Details + +This rule disallows target="_blank" attribute without rel="noopener noreferrer". + + + +```vue +