Skip to content

Commit 32d1fb7

Browse files
authored
Improve documentation (#1768)
* Improve wording in `vue/no-expose-after-await` docs * Improve descriptions of core extension rules * Improve example data in docs
1 parent 9c2c15f commit 32d1fb7

40 files changed

+115
-108
lines changed

docs/rules/README.md

+34-34
Original file line numberDiff line numberDiff line change
@@ -369,40 +369,40 @@ The following rules extend the rules provided by ESLint itself and apply them to
369369

370370
| Rule ID | Description | |
371371
|:--------|:------------|:---|
372-
| [vue/array-bracket-newline](./array-bracket-newline.md) | enforce linebreaks after opening and before closing array brackets | :wrench: |
373-
| [vue/array-bracket-spacing](./array-bracket-spacing.md) | enforce consistent spacing inside array brackets | :wrench: |
374-
| [vue/arrow-spacing](./arrow-spacing.md) | enforce consistent spacing before and after the arrow in arrow functions | :wrench: |
375-
| [vue/block-spacing](./block-spacing.md) | disallow or enforce spaces inside of blocks after opening block and before closing block | :wrench: |
376-
| [vue/brace-style](./brace-style.md) | enforce consistent brace style for blocks | :wrench: |
377-
| [vue/camelcase](./camelcase.md) | enforce camelcase naming convention | |
378-
| [vue/comma-dangle](./comma-dangle.md) | require or disallow trailing commas | :wrench: |
379-
| [vue/comma-spacing](./comma-spacing.md) | enforce consistent spacing before and after commas | :wrench: |
380-
| [vue/comma-style](./comma-style.md) | enforce consistent comma style | :wrench: |
381-
| [vue/dot-location](./dot-location.md) | enforce consistent newlines before and after dots | :wrench: |
382-
| [vue/dot-notation](./dot-notation.md) | enforce dot notation whenever possible | :wrench: |
383-
| [vue/eqeqeq](./eqeqeq.md) | require the use of `===` and `!==` | :wrench: |
384-
| [vue/func-call-spacing](./func-call-spacing.md) | require or disallow spacing between function identifiers and their invocations | :wrench: |
385-
| [vue/key-spacing](./key-spacing.md) | enforce consistent spacing between keys and values in object literal properties | :wrench: |
386-
| [vue/keyword-spacing](./keyword-spacing.md) | enforce consistent spacing before and after keywords | :wrench: |
387-
| [vue/max-len](./max-len.md) | enforce a maximum line length | |
388-
| [vue/no-constant-condition](./no-constant-condition.md) | disallow constant expressions in conditions | |
389-
| [vue/no-empty-pattern](./no-empty-pattern.md) | disallow empty destructuring patterns | |
390-
| [vue/no-extra-parens](./no-extra-parens.md) | disallow unnecessary parentheses | :wrench: |
391-
| [vue/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace | |
392-
| [vue/no-loss-of-precision](./no-loss-of-precision.md) | disallow literal numbers that lose precision | |
393-
| [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax | |
394-
| [vue/no-sparse-arrays](./no-sparse-arrays.md) | disallow sparse arrays | |
395-
| [vue/no-useless-concat](./no-useless-concat.md) | disallow unnecessary concatenation of literals or template literals | |
396-
| [vue/object-curly-newline](./object-curly-newline.md) | enforce consistent line breaks after opening and before closing braces | :wrench: |
397-
| [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces | :wrench: |
398-
| [vue/object-property-newline](./object-property-newline.md) | enforce placing object properties on separate lines | :wrench: |
399-
| [vue/object-shorthand](./object-shorthand.md) | require or disallow method and property shorthand syntax for object literals | :wrench: |
400-
| [vue/operator-linebreak](./operator-linebreak.md) | enforce consistent linebreak style for operators | :wrench: |
401-
| [vue/prefer-template](./prefer-template.md) | require template literals instead of string concatenation | :wrench: |
402-
| [vue/space-in-parens](./space-in-parens.md) | enforce consistent spacing inside parentheses | :wrench: |
403-
| [vue/space-infix-ops](./space-infix-ops.md) | require spacing around infix operators | :wrench: |
404-
| [vue/space-unary-ops](./space-unary-ops.md) | enforce consistent spacing before or after unary operators | :wrench: |
405-
| [vue/template-curly-spacing](./template-curly-spacing.md) | require or disallow spacing around embedded expressions of template strings | :wrench: |
372+
| [vue/array-bracket-newline](./array-bracket-newline.md) | enforce linebreaks after opening and before closing array brackets in `<template>` | :wrench: |
373+
| [vue/array-bracket-spacing](./array-bracket-spacing.md) | enforce consistent spacing inside array brackets in `<template>` | :wrench: |
374+
| [vue/arrow-spacing](./arrow-spacing.md) | enforce consistent spacing before and after the arrow in arrow functions in `<template>` | :wrench: |
375+
| [vue/block-spacing](./block-spacing.md) | disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>` | :wrench: |
376+
| [vue/brace-style](./brace-style.md) | enforce consistent brace style for blocks in `<template>` | :wrench: |
377+
| [vue/camelcase](./camelcase.md) | enforce camelcase naming convention in `<template>` | |
378+
| [vue/comma-dangle](./comma-dangle.md) | require or disallow trailing commas in `<template>` | :wrench: |
379+
| [vue/comma-spacing](./comma-spacing.md) | enforce consistent spacing before and after commas in `<template>` | :wrench: |
380+
| [vue/comma-style](./comma-style.md) | enforce consistent comma style in `<template>` | :wrench: |
381+
| [vue/dot-location](./dot-location.md) | enforce consistent newlines before and after dots in `<template>` | :wrench: |
382+
| [vue/dot-notation](./dot-notation.md) | enforce dot notation whenever possible in `<template>` | :wrench: |
383+
| [vue/eqeqeq](./eqeqeq.md) | require the use of `===` and `!==` in `<template>` | :wrench: |
384+
| [vue/func-call-spacing](./func-call-spacing.md) | require or disallow spacing between function identifiers and their invocations in `<template>` | :wrench: |
385+
| [vue/key-spacing](./key-spacing.md) | enforce consistent spacing between keys and values in object literal properties in `<template>` | :wrench: |
386+
| [vue/keyword-spacing](./keyword-spacing.md) | enforce consistent spacing before and after keywords in `<template>` | :wrench: |
387+
| [vue/max-len](./max-len.md) | enforce a maximum line length in `.vue` files | |
388+
| [vue/no-constant-condition](./no-constant-condition.md) | disallow constant expressions in conditions in `<template>` | |
389+
| [vue/no-empty-pattern](./no-empty-pattern.md) | disallow empty destructuring patterns in `<template>` | |
390+
| [vue/no-extra-parens](./no-extra-parens.md) | disallow unnecessary parentheses in `<template>` | :wrench: |
391+
| [vue/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace in `.vue` files | |
392+
| [vue/no-loss-of-precision](./no-loss-of-precision.md) | disallow literal numbers that lose precision in `<template>` | |
393+
| [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax in `<template>` | |
394+
| [vue/no-sparse-arrays](./no-sparse-arrays.md) | disallow sparse arrays in `<template>` | |
395+
| [vue/no-useless-concat](./no-useless-concat.md) | disallow unnecessary concatenation of literals or template literals in `<template>` | |
396+
| [vue/object-curly-newline](./object-curly-newline.md) | enforce consistent line breaks after opening and before closing braces in `<template>` | :wrench: |
397+
| [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces in `<template>` | :wrench: |
398+
| [vue/object-property-newline](./object-property-newline.md) | enforce placing object properties on separate lines in `<template>` | :wrench: |
399+
| [vue/object-shorthand](./object-shorthand.md) | require or disallow method and property shorthand syntax for object literals in `<template>` | :wrench: |
400+
| [vue/operator-linebreak](./operator-linebreak.md) | enforce consistent linebreak style for operators in `<template>` | :wrench: |
401+
| [vue/prefer-template](./prefer-template.md) | require template literals instead of string concatenation in `<template>` | :wrench: |
402+
| [vue/space-in-parens](./space-in-parens.md) | enforce consistent spacing inside parentheses in `<template>` | :wrench: |
403+
| [vue/space-infix-ops](./space-infix-ops.md) | require spacing around infix operators in `<template>` | :wrench: |
404+
| [vue/space-unary-ops](./space-unary-ops.md) | enforce consistent spacing before or after unary operators in `<template>` | :wrench: |
405+
| [vue/template-curly-spacing](./template-curly-spacing.md) | require or disallow spacing around embedded expressions of template strings in `<template>` | :wrench: |
406406

407407
## Deprecated
408408

docs/rules/array-bracket-newline.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/array-bracket-newline
5-
description: enforce linebreaks after opening and before closing array brackets
5+
description: enforce linebreaks after opening and before closing array brackets in `<template>`
66
since: v7.1.0
77
---
88
# vue/array-bracket-newline
99

10-
> enforce linebreaks after opening and before closing array brackets
10+
> enforce linebreaks after opening and before closing array brackets in `<template>`
1111
1212
- :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.
1313

docs/rules/array-bracket-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/array-bracket-spacing
5-
description: enforce consistent spacing inside array brackets
5+
description: enforce consistent spacing inside array brackets in `<template>`
66
since: v5.2.0
77
---
88
# vue/array-bracket-spacing
99

10-
> enforce consistent spacing inside array brackets
10+
> enforce consistent spacing inside array brackets in `<template>`
1111
1212
- :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.
1313

docs/rules/arrow-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/arrow-spacing
5-
description: enforce consistent spacing before and after the arrow in arrow functions
5+
description: enforce consistent spacing before and after the arrow in arrow functions in `<template>`
66
since: v5.2.0
77
---
88
# vue/arrow-spacing
99

10-
> enforce consistent spacing before and after the arrow in arrow functions
10+
> enforce consistent spacing before and after the arrow in arrow functions in `<template>`
1111
1212
- :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.
1313

docs/rules/block-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/block-spacing
5-
description: disallow or enforce spaces inside of blocks after opening block and before closing block
5+
description: disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
66
since: v5.2.0
77
---
88
# vue/block-spacing
99

10-
> disallow or enforce spaces inside of blocks after opening block and before closing block
10+
> disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
1111
1212
- :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.
1313

docs/rules/brace-style.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/brace-style
5-
description: enforce consistent brace style for blocks
5+
description: enforce consistent brace style for blocks in `<template>`
66
since: v5.2.0
77
---
88
# vue/brace-style
99

10-
> enforce consistent brace style for blocks
10+
> enforce consistent brace style for blocks in `<template>`
1111
1212
- :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.
1313

docs/rules/camelcase.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/camelcase
5-
description: enforce camelcase naming convention
5+
description: enforce camelcase naming convention in `<template>`
66
since: v5.2.0
77
---
88
# vue/camelcase
99

10-
> enforce camelcase naming convention
10+
> enforce camelcase naming convention in `<template>`
1111
1212
This rule is the same rule as core [camelcase] rule but it applies to the expressions in `<template>`.
1313

docs/rules/comma-dangle.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/comma-dangle
5-
description: require or disallow trailing commas
5+
description: require or disallow trailing commas in `<template>`
66
since: v5.2.0
77
---
88
# vue/comma-dangle
99

10-
> require or disallow trailing commas
10+
> require or disallow trailing commas in `<template>`
1111
1212
- :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.
1313

docs/rules/comma-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/comma-spacing
5-
description: enforce consistent spacing before and after commas
5+
description: enforce consistent spacing before and after commas in `<template>`
66
since: v7.0.0
77
---
88
# vue/comma-spacing
99

10-
> enforce consistent spacing before and after commas
10+
> enforce consistent spacing before and after commas in `<template>`
1111
1212
- :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.
1313

docs/rules/comma-style.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/comma-style
5-
description: enforce consistent comma style
5+
description: enforce consistent comma style in `<template>`
66
since: v7.0.0
77
---
88
# vue/comma-style
99

10-
> enforce consistent comma style
10+
> enforce consistent comma style in `<template>`
1111
1212
- :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.
1313

docs/rules/component-tags-order.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags
9292

9393
```vue
9494
<!-- ✓ GOOD -->
95-
<docs> documents </docs>
95+
<docs> documentation </docs>
9696
<template>...</template>
9797
<script>/* ... */</script>
9898
<style>/* ... */</style>
@@ -106,7 +106,7 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags
106106
<!-- ✗ BAD -->
107107
<template>...</template>
108108
<script>/* ... */</script>
109-
<docs> documents </docs>
109+
<docs> documentation </docs>
110110
<style>/* ... */</style>
111111
```
112112

docs/rules/dot-location.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/dot-location
5-
description: enforce consistent newlines before and after dots
5+
description: enforce consistent newlines before and after dots in `<template>`
66
since: v6.0.0
77
---
88
# vue/dot-location
99

10-
> enforce consistent newlines before and after dots
10+
> enforce consistent newlines before and after dots in `<template>`
1111
1212
- :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.
1313

docs/rules/dot-notation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/dot-notation
5-
description: enforce dot notation whenever possible
5+
description: enforce dot notation whenever possible in `<template>`
66
since: v7.0.0
77
---
88
# vue/dot-notation
99

10-
> enforce dot notation whenever possible
10+
> enforce dot notation whenever possible in `<template>`
1111
1212
- :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.
1313

docs/rules/eqeqeq.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/eqeqeq
5-
description: require the use of `===` and `!==`
5+
description: require the use of `===` and `!==` in `<template>`
66
since: v5.2.0
77
---
88
# vue/eqeqeq
99

10-
> require the use of `===` and `!==`
10+
> require the use of `===` and `!==` in `<template>`
1111
1212
- :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.
1313

docs/rules/func-call-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/func-call-spacing
5-
description: require or disallow spacing between function identifiers and their invocations
5+
description: require or disallow spacing between function identifiers and their invocations in `<template>`
66
since: v7.0.0
77
---
88
# vue/func-call-spacing
99

10-
> require or disallow spacing between function identifiers and their invocations
10+
> require or disallow spacing between function identifiers and their invocations in `<template>`
1111
1212
- :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.
1313

docs/rules/key-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/key-spacing
5-
description: enforce consistent spacing between keys and values in object literal properties
5+
description: enforce consistent spacing between keys and values in object literal properties in `<template>`
66
since: v5.2.0
77
---
88
# vue/key-spacing
99

10-
> enforce consistent spacing between keys and values in object literal properties
10+
> enforce consistent spacing between keys and values in object literal properties in `<template>`
1111
1212
- :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.
1313

docs/rules/keyword-spacing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/keyword-spacing
5-
description: enforce consistent spacing before and after keywords
5+
description: enforce consistent spacing before and after keywords in `<template>`
66
since: v6.0.0
77
---
88
# vue/keyword-spacing
99

10-
> enforce consistent spacing before and after keywords
10+
> enforce consistent spacing before and after keywords in `<template>`
1111
1212
- :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.
1313

docs/rules/max-len.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/max-len
5-
description: enforce a maximum line length
5+
description: enforce a maximum line length in `.vue` files
66
since: v6.1.0
77
---
88
# vue/max-len
99

10-
> enforce a maximum line length
10+
> enforce a maximum line length in `.vue` files
1111
1212
## :book: Rule Details
1313

docs/rules/no-constant-condition.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/no-constant-condition
5-
description: disallow constant expressions in conditions
5+
description: disallow constant expressions in conditions in `<template>`
66
since: v7.5.0
77
---
88
# vue/no-constant-condition
99

10-
> disallow constant expressions in conditions
10+
> disallow constant expressions in conditions in `<template>`
1111
1212
This rule is the same rule as core [no-constant-condition] rule but it applies to the expressions in `<template>`.
1313

docs/rules/no-empty-pattern.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/no-empty-pattern
5-
description: disallow empty destructuring patterns
5+
description: disallow empty destructuring patterns in `<template>`
66
since: v6.0.0
77
---
88
# vue/no-empty-pattern
99

10-
> disallow empty destructuring patterns
10+
> disallow empty destructuring patterns in `<template>`
1111
1212
This rule is the same rule as core [no-empty-pattern] rule but it applies to the expressions in `<template>`.
1313

docs/rules/no-expose-after-await.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ since: v8.1.0
1111
1212
## :book: Rule Details
1313

14-
This rule reports the `expose()` after `await` expression.
15-
In `setup()` function, `expose()` should be registered synchronously.
14+
This rule reports usages of `expose()` after an `await` expression.
15+
In the `setup()` function, `expose()` should be registered synchronously.
1616

1717
<eslint-code-block :rules="{'vue/no-expose-after-await': ['error']}">
1818

docs/rules/no-extra-parens.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/no-extra-parens
5-
description: disallow unnecessary parentheses
5+
description: disallow unnecessary parentheses in `<template>`
66
since: v7.0.0
77
---
88
# vue/no-extra-parens
99

10-
> disallow unnecessary parentheses
10+
> disallow unnecessary parentheses in `<template>`
1111
1212
- :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.
1313

0 commit comments

Comments
 (0)