Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/eslint-plugin-vue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.5.0
Choose a base ref
...
head repository: vuejs/eslint-plugin-vue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.6.0
Choose a head ref
  • 8 commits
  • 58 files changed
  • 6 contributors

Commits on Feb 22, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    508ea0e View commit details

Commits on Mar 6, 2022

  1. Auto-fix for vue/component-tags-order (#1811)

    * feat: 🎸 finish sort order
    
    * Auto-fix for vue/component-tags-order
    
    * use fix:true and output for test case
    
    Apply suggestions from code review
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * fix lint
    
    Co-authored-by: IWANABETHATGUY <[email protected]>
    Co-authored-by: Yosuke Ota <[email protected]>
    3 people authored Mar 6, 2022

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    8f09420 View commit details

Commits on Mar 19, 2022

  1. Lint docs (#1821)

    * Add rule docs headings checker
    
    * Fix typo in rule docs heading
    
    * Standardize heading order in rule docs
    
    * Add markdownlint
    
    * Use `dash` style for all unordered lists
    
    `ul-style` MarkdownLint rule
    
    * Standardize unordered list indentation
    
    `ul-indent` MarkdownLint rule
    
    * Remove trailing spaces
    
    `no-trailing-spaces` MarkdownLint rule
    
    * Collapse consecutive empty lines
    
    `no-multiple-blanks` MarkdownLint rule
    
    * Add empty line after headings
    
    `blanks-around-headings` MarkdownLint rule
    
    * Add empty lines after code blocks
    
    `blanks-around-fences` MarkdownLint rule
    
    * Add empty lines before lists
    
    `blanks-around-lists` MarkdownLint rule
    
    * Add link title
    
    `no-bare-urls` MarkdownLint rule
    
    * Convert bold paragraph to heading
    
    `no-emphasis-as-heading` MarkdownLint rule
    
    * Fix trailing space in inline code
    
    `no-space-in-code` MarkdownLint rule
    
    * Add language to code blocks
    
    `fenced-code-language` MarkdownLint rule
    
    * Disable `no-inline-html` MarkdownLint rule in one place
    
    * Fix wrong link syntax
    FloEdelmann authored Mar 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0924d62 View commit details

Commits on Mar 23, 2022

  1. Add prefer-prop-type-boolean-first rule (#1822)

    * Add `prefer-prop-type-boolean-first` rule
    
    * fix docs
    
    * update docs
    
    * merge valid test cases
    
    * add more tests
    
    * Add explanation to eslint-disable comment
    
    Co-authored-by: Flo Edelmann <[email protected]>
    g-plane and FloEdelmann authored Mar 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f5f4f97 View commit details
  2. Add new rule: no-restricted-html-elements (#1820)

    * Add new rule: html-forbid-elements
    
    * PR Feedback
    
    * Update lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * Update docs/rules/no-restricted-html-elements.md
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * Update lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update docs/rules/no-restricted-html-elements.md
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update tests/lib/rules/no-restricted-html-elements.js
    
    Co-authored-by: Yosuke Ota <[email protected]>
    
    * Update docs/rules/no-restricted-html-elements.md
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * Update docs/rules/no-restricted-html-elements.md
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * Update docs/rules/no-restricted-html-elements.md
    
    Co-authored-by: Flo Edelmann <[email protected]>
    
    * run npm update
    
    * Remove messages block
    
    * Update docs/rules/no-restricted-html-elements.md
    
    * Update docs/rules/no-restricted-html-elements.md
    
    * Fix demo site
    
    Co-authored-by: Flo Edelmann <[email protected]>
    Co-authored-by: Yosuke Ota <[email protected]>
    3 people authored Mar 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1ce68fa View commit details

Commits on Apr 4, 2022

  1. Fix #1808: Lint slots in attribute-hyphenation (#1826)

    * Fix #1808: Lint slots in attribute-hyphenation
    
    * remove includeSlots option
    
    * remove stray linting
    doug-wade authored Apr 4, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f59de96 View commit details

Commits on Apr 6, 2022

  1. Remove unnecessary JSDoc

    ota-meshi committed Apr 6, 2022
    Copy the full SHA
    4dfbe33 View commit details
  2. 8.6.0

    ota-meshi committed Apr 6, 2022
    Copy the full SHA
    83290b7 View commit details
Showing with 1,115 additions and 152 deletions.
  1. +23 −0 .markdownlint.yml
  2. +1 −0 .markdownlintignore
  3. +4 −3 docs/rules/README.md
  4. +8 −7 docs/rules/component-tags-order.md
  5. +5 −5 docs/rules/custom-event-name-casing.md
  6. +4 −4 docs/rules/html-closing-bracket-newline.md
  7. +6 −6 docs/rules/html-closing-bracket-spacing.md
  8. +11 −12 docs/rules/html-comment-content-newline.md
  9. +7 −8 docs/rules/html-comment-content-spacing.md
  10. +0 −1 docs/rules/max-len.md
  11. +1 −1 docs/rules/new-line-between-multi-line-property.md
  12. +1 −0 docs/rules/next-tick-style.md
  13. +0 −1 docs/rules/no-bare-strings-in-template.md
  14. +7 −1 docs/rules/no-boolean-default.md
  15. +1 −1 docs/rules/no-custom-modifiers-on-v-model.md
  16. +1 −1 docs/rules/no-empty-component-block.md
  17. +0 −1 docs/rules/no-invalid-model-keys.md
  18. +4 −4 docs/rules/no-parsing-error.md
  19. +2 −2 docs/rules/no-potential-component-option-typo.md
  20. +1 −0 docs/rules/no-restricted-class.md
  21. +0 −1 docs/rules/no-restricted-custom-event.md
  22. +99 −0 docs/rules/no-restricted-html-elements.md
  23. +0 −1 docs/rules/no-restricted-syntax.md
  24. +1 −1 docs/rules/no-spaces-around-equal-signs-in-attribute.md
  25. +1 −0 docs/rules/no-textarea-mustache.md
  26. +1 −1 docs/rules/no-this-in-before-route-enter.md
  27. +2 −2 docs/rules/no-unregistered-components.md
  28. +3 −2 docs/rules/no-use-v-if-with-v-for.md
  29. +0 −1 docs/rules/no-v-model-argument.md
  30. +0 −1 docs/rules/order-in-components.md
  31. +0 −1 docs/rules/padding-line-between-blocks.md
  32. +64 −0 docs/rules/prefer-prop-type-boolean-first.md
  33. +7 −2 docs/rules/prefer-true-attribute-shorthand.md
  34. +4 −4 docs/rules/prop-name-casing.md
  35. +0 −2 docs/rules/require-component-is.md
  36. +4 −0 docs/rules/require-default-prop.md
  37. +1 −0 docs/rules/return-in-computed-property.md
  38. +1 −0 docs/rules/script-indent.md
  39. +0 −3 docs/rules/singleline-html-element-content-newline.md
  40. +29 −29 docs/rules/sort-keys.md
  41. +1 −0 docs/rules/this-in-template.md
  42. +1 −0 docs/rules/v-bind-style.md
  43. +1 −0 docs/rules/v-for-delimiter-style.md
  44. +5 −5 docs/rules/v-on-event-hyphenation.md
  45. +1 −0 docs/rules/v-on-style.md
  46. +2 −0 lib/index.js
  47. +5 −1 lib/rules/attribute-hyphenation.js
  48. +31 −20 lib/rules/component-tags-order.js
  49. +68 −0 lib/rules/no-restricted-html-elements.js
  50. +0 −1 lib/rules/no-undef-properties.js
  51. +0 −1 lib/rules/no-unregistered-components.js
  52. +115 −0 lib/rules/prefer-prop-type-boolean-first.js
  53. +4 −3 package.json
  54. +36 −0 tests/lib/rules/attribute-hyphenation.js
  55. +110 −12 tests/lib/rules/component-tags-order.js
  56. +75 −0 tests/lib/rules/no-restricted-html-elements.js
  57. +317 −0 tests/lib/rules/prefer-prop-type-boolean-first.js
  58. +39 −0 tools/update-docs.js
23 changes: 23 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
line-length: false
single-title: false
no-inline-html:
allowed_elements:
- badge
- eslint-code-block
- sup

# enforce consistency
code-block-style:
style: fenced
code-fence-style:
style: backtick
emphasis-style:
style: asterisk
heading-style:
style: atx
hr-style:
style: ---
strong-style:
style: asterisk
ul-style:
style: dash
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 4 additions & 3 deletions docs/rules/README.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ sidebarDepth: 0
:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
:::


## Base Rules (Enabling Correct ESLint Parsing)

Enforce all the rules in this category, as well as all higher priority rules, with:
@@ -167,7 +166,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| Rule ID | Description | |
|:--------|:------------|:---|
| [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/component-tags-order](./component-tags-order.md) | enforce order of component top-level elements | :wrench: |
| [vue/no-lone-template](./no-lone-template.md) | disallow unnecessary `<template>` | |
| [vue/no-multiple-slot-args](./no-multiple-slot-args.md) | disallow to pass multiple arguments to scoped slots | |
| [vue/no-v-html](./no-v-html.md) | disallow use of v-html to prevent XSS attack | |
@@ -283,7 +282,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| Rule ID | Description | |
|:--------|:------------|:---|
| [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/component-tags-order](./component-tags-order.md) | enforce order of component top-level elements | :wrench: |
| [vue/no-lone-template](./no-lone-template.md) | disallow unnecessary `<template>` | |
| [vue/no-multiple-slot-args](./no-multiple-slot-args.md) | disallow to pass multiple arguments to scoped slots | |
| [vue/no-v-html](./no-v-html.md) | disallow use of v-html to prevent XSS attack | |
@@ -335,6 +334,7 @@ For example:
| [vue/no-restricted-class](./no-restricted-class.md) | disallow specific classes in Vue components | |
| [vue/no-restricted-component-options](./no-restricted-component-options.md) | disallow specific component option | |
| [vue/no-restricted-custom-event](./no-restricted-custom-event.md) | disallow specific custom event | :bulb: |
| [vue/no-restricted-html-elements](./no-restricted-html-elements.md) | disallow specific HTML elements | |
| [vue/no-restricted-props](./no-restricted-props.md) | disallow specific props | :bulb: |
| [vue/no-restricted-static-attribute](./no-restricted-static-attribute.md) | disallow specific attribute | |
| [vue/no-restricted-v-bind](./no-restricted-v-bind.md) | disallow specific argument in `v-bind` | |
@@ -353,6 +353,7 @@ For example:
| [vue/no-v-text](./no-v-text.md) | disallow use of v-text | |
| [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: |
| [vue/prefer-import-from-vue](./prefer-import-from-vue.md) | enforce import from 'vue' instead of import from '@vue/*' | :wrench: |
| [vue/prefer-prop-type-boolean-first](./prefer-prop-type-boolean-first.md) | enforce `Boolean` comes first in component prop types | :bulb: |
| [vue/prefer-separate-static-class](./prefer-separate-static-class.md) | require static class names in template to be in a separate `class` attribute | :wrench: |
| [vue/prefer-true-attribute-shorthand](./prefer-true-attribute-shorthand.md) | require shorthand form attribute when `v-bind` value is `true` | :bulb: |
| [vue/require-direct-export](./require-direct-export.md) | require the component to be directly exported | |
15 changes: 8 additions & 7 deletions docs/rules/component-tags-order.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ since: v6.1.0
> enforce order of component top-level elements
- :gear: This rule is included in `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details

@@ -29,7 +30,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

### `{ "order": [ [ "script", "template" ], "style" ] }` (default)

<eslint-code-block :rules="{'vue/component-tags-order': ['error']}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error']}">

```vue
<!-- ✓ GOOD -->
@@ -40,7 +41,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

</eslint-code-block>

<eslint-code-block :rules="{'vue/component-tags-order': ['error']}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error']}">

```vue
<!-- ✓ GOOD -->
@@ -51,7 +52,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

</eslint-code-block>

<eslint-code-block :rules="{'vue/component-tags-order': ['error']}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error']}">

```vue
<!-- ✗ BAD -->
@@ -64,7 +65,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

### `{ "order": ["template", "script", "style"] }`

<eslint-code-block :rules="{'vue/component-tags-order': ['error', { 'order': ['template', 'script', 'style'] }]}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error', { 'order': ['template', 'script', 'style'] }]}">

```vue
<!-- ✓ GOOD -->
@@ -75,7 +76,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

</eslint-code-block>

<eslint-code-block :rules="{'vue/component-tags-order': ['error', { 'order': ['template', 'script', 'style'] }]}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error', { 'order': ['template', 'script', 'style'] }]}">

```vue
<!-- ✗ BAD -->
@@ -88,7 +89,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

### `{ "order": ["docs", "template", "script", "style"] }`

<eslint-code-block :rules="{'vue/component-tags-order': ['error', { 'order': ['docs', 'template', 'script', 'style'] }]}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error', { 'order': ['docs', 'template', 'script', 'style'] }]}">

```vue
<!-- ✓ GOOD -->
@@ -100,7 +101,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

</eslint-code-block>

<eslint-code-block :rules="{'vue/component-tags-order': ['error', { 'order': ['docs', 'template', 'script', 'style'] }]}">
<eslint-code-block fix :rules="{'vue/component-tags-order': ['error', { 'order': ['docs', 'template', 'script', 'style'] }]}">

```vue
<!-- ✗ BAD -->
10 changes: 5 additions & 5 deletions docs/rules/custom-event-name-casing.md
Original file line number Diff line number Diff line change
@@ -163,6 +163,11 @@ export default {

</eslint-code-block>

## :couple: Related Rules

- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md)
- [vue/prop-name-casing](./prop-name-casing.md)

## :books: Further Reading

- [Guide - Custom Events]
@@ -171,11 +176,6 @@ export default {
[Guide - Custom Events]: https://vuejs.org/guide/components/events.html
[Guide (for v2) - Custom Events]: https://v2.vuejs.org/v2/guide/components-custom-events.html

## :couple: Related Rules

- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md)
- [vue/prop-name-casing](./prop-name-casing.md)

## :rocket: Version

This rule was introduced in eslint-plugin-vue v7.0.0
8 changes: 4 additions & 4 deletions docs/rules/html-closing-bracket-newline.md
Original file line number Diff line number Diff line change
@@ -66,11 +66,11 @@ This rule aims to warn the right angle brackets which are at the location other
```

- `singleline` ... the configuration for single-line elements. It's a single-line element if the element does not have attributes or the last attribute is on the same line as the opening bracket.
- `"never"` (default) ... disallow line breaks before the closing bracket.
- `"always"` ... require one line break before the closing bracket.
- `"never"` (default) ... disallow line breaks before the closing bracket.
- `"always"` ... require one line break before the closing bracket.
- `multiline` ... the configuration for multiline elements. It's a multiline element if the last attribute is not on the same line of the opening bracket.
- `"never"` ... disallow line breaks before the closing bracket.
- `"always"` (default) ... require one line break before the closing bracket.
- `"never"` ... disallow line breaks before the closing bracket.
- `"always"` (default) ... require one line break before the closing bracket.

Plus, you can use [`vue/html-indent`](./html-indent.md) rule to enforce indent-level of the closing brackets.

12 changes: 6 additions & 6 deletions docs/rules/html-closing-bracket-spacing.md
Original file line number Diff line number Diff line change
@@ -55,14 +55,14 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o
```

- `startTag` (`"always" | "never"`) ... Setting for the `>` of start tags (e.g. `<div>`). Default is `"never"`.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.
- `endTag` (`"always" | "never"`) ... Setting for the `>` of end tags (e.g. `</div>`). Default is `"never"`.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.
- `selfClosingTag` (`"always" | "never"`) ... Setting for the `/>` of self-closing tags (e.g. `<div/>`). Default is `"always"`.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.
- `"always"` ... requires one or more spaces.
- `"never"` ... disallows spaces.

### `"startTag": "always", "endTag": "always", "selfClosingTag": "always"`

23 changes: 11 additions & 12 deletions docs/rules/html-comment-content-newline.md
Original file line number Diff line number Diff line change
@@ -56,21 +56,21 @@ This rule will enforce consistency of line break after the `<!--` and before the
```

- The first option is either an object with `"singleline"` and `"multiline"` keys.
- `singleline` ... the configuration for single-line comments.
- `"never"` (default) ... disallow line breaks after the `<!--` and before the `-->`.
- `"always"` ... require one line break after the `<!--` and before the `-->`.
- `multiline` ... the configuration for multiline comments.
- `"never"` ... disallow line breaks after the `<!--` and before the `-->`.
- `"always"` (default) ... require one line break after the `<!--` and before the `-->`.
- `singleline` ... the configuration for single-line comments.
- `"never"` (default) ... disallow line breaks after the `<!--` and before the `-->`.
- `"always"` ... require one line break after the `<!--` and before the `-->`.
- `multiline` ... the configuration for multiline comments.
- `"never"` ... disallow line breaks after the `<!--` and before the `-->`.
- `"always"` (default) ... require one line break after the `<!--` and before the `-->`.

You can also set the same value for both `singleline` and `multiline` by specifies a string.
You can also set the same value for both `singleline` and `multiline` by specifies a string.

- This rule can also take a 2nd option, an object with the following key: `"exceptions"`.
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.

```json
"vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }]
```
```json
"vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }]
```

### `"always"`

@@ -162,7 +162,6 @@ This rule will enforce consistency of line break after the `<!--` and before the

</eslint-code-block>


### `{"singleline": "ignore", "multiline": "always"}`

<eslint-code-block fix :rules="{'vue/html-comment-content-newline': ['error', { 'singleline': 'ignore', 'multiline': 'always' }]}">
15 changes: 7 additions & 8 deletions docs/rules/html-comment-content-spacing.md
Original file line number Diff line number Diff line change
@@ -48,17 +48,16 @@ Whitespace after the `<!--` and before the `-->` makes it easier to read text in
```

- The first is a string which be either `"always"` or `"never"`. The default is `"always"`.
- `"always"` (default) ... there must be at least one whitespace at after the `<!--` and before the `-->`.
- `"never"` ... there should be no whitespace at after the `<!--` and before the `-->`.

- `"always"` (default) ... there must be at least one whitespace at after the `<!--` and before the `-->`.
- `"never"` ... there should be no whitespace at after the `<!--` and before the `-->`.

- This rule can also take a 2nd option, an object with the following key: `"exceptions"`.
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
Please note that exceptions are ignored if the first argument is `"never"`.
- The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule.
Please note that exceptions are ignored if the first argument is `"never"`.

```json
"vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }]
```
```json
"vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }]
```

### `"always"`

1 change: 0 additions & 1 deletion docs/rules/max-len.md
Original file line number Diff line number Diff line change
@@ -112,7 +112,6 @@ var foo = ['line', 'length', 'is', '50', '......']

</eslint-code-block>


### `"template": 120`

<eslint-code-block :rules="{'vue/max-len': ['error', {template: 120}]}">
2 changes: 1 addition & 1 deletion docs/rules/new-line-between-multi-line-property.md
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ export default {

</eslint-code-block>

## :wrench: Option
## :wrench: Options

```json
{
1 change: 1 addition & 0 deletions docs/rules/next-tick-style.md
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ export default {
</eslint-code-block>

## :wrench: Options

Default is set to `promise`.

```json
1 change: 0 additions & 1 deletion docs/rules/no-bare-strings-in-template.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ In order to be able to internationalize your application, you will need to avoid

This rule was inspired by [no-bare-strings rule in ember-template-lint](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-bare-strings.md).


<eslint-code-block :rules="{'vue/no-bare-strings-in-template': ['error']}">

```vue
8 changes: 7 additions & 1 deletion docs/rules/no-boolean-default.md
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ since: v7.0.0

The rule prevents Boolean props from having a default value.


## :book: Rule Details

The rule is to enforce the HTML standard of always defaulting boolean attributes to false.

<eslint-code-block fix :rules="{'vue/no-boolean-default': ['error']}">
@@ -38,13 +38,19 @@ export default {
</eslint-code-block>

## :wrench: Options

- `'no-default'` (default) allows a prop definition object, but enforces that the `default` property not be defined.
- `'default-false'` enforces that the default can be set but must be set to `false`.

```json
"vue/no-boolean-default": ["error", "no-default|default-false"]
```

## :couple: Related Rules

- [vue/prefer-true-attribute-shorthand](./prefer-true-attribute-shorthand.md)
- [vue/require-default-prop](./require-default-prop.md)

## :rocket: Version

This rule was introduced in eslint-plugin-vue v7.0.0
2 changes: 1 addition & 1 deletion docs/rules/no-custom-modifiers-on-v-model.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ since: v7.0.0
- :gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.

This rule checks whether `v-model `used on the component do not have custom modifiers.
This rule checks whether `v-model` used on the component do not have custom modifiers.

## :book: Rule Details

2 changes: 1 addition & 1 deletion docs/rules/no-empty-component-block.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ since: v7.0.0
This rule disallows the `<template>` `<script>` `<style>` block to be empty.

This rule also checks block what has attribute `src`.
See: https://vue-loader.vuejs.org/spec.html#src-imports
See [Vue Single-File Component (SFC) Spec](https://vue-loader.vuejs.org/spec.html#src-imports).

<eslint-code-block :rules="{'vue/no-empty-component-block': ['error']}">

1 change: 0 additions & 1 deletion docs/rules/no-invalid-model-keys.md
Original file line number Diff line number Diff line change
@@ -108,7 +108,6 @@ export default {

</eslint-code-block>


## :rocket: Version

This rule was introduced in eslint-plugin-vue v7.9.0
8 changes: 4 additions & 4 deletions docs/rules/no-parsing-error.md
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ This rule reports syntax errors in `<template>`. For example:
- Syntax errors of scripts in directives.
- Syntax errors of scripts in mustaches.
- Syntax errors of HTML.
- Invalid end tags.
- Attributes in end tags.
- ...
- See also: [WHATWG HTML spec](https://html.spec.whatwg.org/multipage/parsing.html#parse-errors)
- Invalid end tags.
- Attributes in end tags.
- ...
- See also: [WHATWG HTML spec](https://html.spec.whatwg.org/multipage/parsing.html#parse-errors)

## :book: Rule Details

4 changes: 2 additions & 2 deletions docs/rules/no-potential-component-option-typo.md
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ since: v7.0.0

This rule disallow a potential typo in your component options

**Here is the config**
### Here is the config

```json
{
@@ -59,7 +59,7 @@ export default {

> we use edit distance to compare two string similarity, threshold is an option to control upper bound of edit distance to report
**Here is the another example about config option `threshold`**
### Here is the another example about config option `threshold`

```json
{
1 change: 1 addition & 0 deletions docs/rules/no-restricted-class.md
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ export default {
}
</script>
```

:::

## :rocket: Version
Loading