Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve new-rule tool and templates #2008

Merged
merged 3 commits into from Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/developer-guide/README.md
Expand Up @@ -13,7 +13,7 @@ Please include as much detail as possible to help us properly address your issue
In order to add a new rule or a rule change, you should:

- Create issue on GitHub with description of proposed rule
- Generate a new rule using the `npm run new -- [rule-name]` command
- Generate a new rule using the `npm run new <rule name> <author name>` command
- Write test scenarios & implement logic
- Describe the rule in the generated `docs` file
- Make sure all tests are passing
Expand Down
68 changes: 34 additions & 34 deletions docs/rules/README.md
Expand Up @@ -276,42 +276,42 @@ The following rules extend the rules provided by ESLint itself and apply them to

| Rule ID | Description | | |
|:--------|:------------|:--:|:--:|
| [vue/array-bracket-newline](./array-bracket-newline.md) | Enforce linebreaks after opening and before closing array brackets in `<template>` | :wrench: | :lipstick: |
| [vue/array-bracket-spacing](./array-bracket-spacing.md) | Enforce consistent spacing inside array brackets in `<template>` | :wrench: | :lipstick: |
| [vue/arrow-spacing](./arrow-spacing.md) | Enforce consistent spacing before and after the arrow in arrow functions in `<template>` | :wrench: | :lipstick: |
| [vue/block-spacing](./block-spacing.md) | Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>` | :wrench: | :lipstick: |
| [vue/brace-style](./brace-style.md) | Enforce consistent brace style for blocks in `<template>` | :wrench: | :lipstick: |
| [vue/camelcase](./camelcase.md) | Enforce camelcase naming convention in `<template>` | | :hammer: |
| [vue/comma-dangle](./comma-dangle.md) | Require or disallow trailing commas in `<template>` | :wrench: | :lipstick: |
| [vue/comma-spacing](./comma-spacing.md) | Enforce consistent spacing before and after commas in `<template>` | :wrench: | :lipstick: |
| [vue/comma-style](./comma-style.md) | Enforce consistent comma style in `<template>` | :wrench: | :lipstick: |
| [vue/dot-location](./dot-location.md) | Enforce consistent newlines before and after dots in `<template>` | :wrench: | :lipstick: |
| [vue/dot-notation](./dot-notation.md) | Enforce dot notation whenever possible in `<template>` | :wrench: | :hammer: |
| [vue/eqeqeq](./eqeqeq.md) | Require the use of `===` and `!==` in `<template>` | :wrench: | :hammer: |
| [vue/func-call-spacing](./func-call-spacing.md) | Require or disallow spacing between function identifiers and their invocations in `<template>` | :wrench: | :lipstick: |
| [vue/key-spacing](./key-spacing.md) | Enforce consistent spacing between keys and values in object literal properties in `<template>` | :wrench: | :lipstick: |
| [vue/keyword-spacing](./keyword-spacing.md) | Enforce consistent spacing before and after keywords in `<template>` | :wrench: | :lipstick: |
| [vue/array-bracket-newline](./array-bracket-newline.md) | enforce linebreaks after opening and before closing array brackets in `<template>` | :wrench: | :lipstick: |
| [vue/array-bracket-spacing](./array-bracket-spacing.md) | enforce consistent spacing inside array brackets in `<template>` | :wrench: | :lipstick: |
| [vue/arrow-spacing](./arrow-spacing.md) | enforce consistent spacing before and after the arrow in arrow functions in `<template>` | :wrench: | :lipstick: |
| [vue/block-spacing](./block-spacing.md) | disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>` | :wrench: | :lipstick: |
| [vue/brace-style](./brace-style.md) | enforce consistent brace style for blocks in `<template>` | :wrench: | :lipstick: |
| [vue/camelcase](./camelcase.md) | enforce camelcase naming convention in `<template>` | | :hammer: |
| [vue/comma-dangle](./comma-dangle.md) | require or disallow trailing commas in `<template>` | :wrench: | :lipstick: |
| [vue/comma-spacing](./comma-spacing.md) | enforce consistent spacing before and after commas in `<template>` | :wrench: | :lipstick: |
| [vue/comma-style](./comma-style.md) | enforce consistent comma style in `<template>` | :wrench: | :lipstick: |
| [vue/dot-location](./dot-location.md) | enforce consistent newlines before and after dots in `<template>` | :wrench: | :lipstick: |
| [vue/dot-notation](./dot-notation.md) | enforce dot notation whenever possible in `<template>` | :wrench: | :hammer: |
| [vue/eqeqeq](./eqeqeq.md) | require the use of `===` and `!==` in `<template>` | :wrench: | :hammer: |
| [vue/func-call-spacing](./func-call-spacing.md) | require or disallow spacing between function identifiers and their invocations in `<template>` | :wrench: | :lipstick: |
| [vue/key-spacing](./key-spacing.md) | enforce consistent spacing between keys and values in object literal properties in `<template>` | :wrench: | :lipstick: |
| [vue/keyword-spacing](./keyword-spacing.md) | enforce consistent spacing before and after keywords in `<template>` | :wrench: | :lipstick: |
| [vue/max-len](./max-len.md) | enforce a maximum line length in `.vue` files | | :lipstick: |
| [vue/multiline-ternary](./multiline-ternary.md) | Enforce newlines between operands of ternary expressions in `<template>` | :wrench: | :lipstick: |
| [vue/no-constant-condition](./no-constant-condition.md) | Disallow constant expressions in conditions in `<template>` | | :warning: |
| [vue/no-empty-pattern](./no-empty-pattern.md) | Disallow empty destructuring patterns in `<template>` | | :warning: |
| [vue/no-extra-parens](./no-extra-parens.md) | Disallow unnecessary parentheses in `<template>` | :wrench: | :lipstick: |
| [vue/multiline-ternary](./multiline-ternary.md) | enforce newlines between operands of ternary expressions in `<template>` | :wrench: | :lipstick: |
| [vue/no-constant-condition](./no-constant-condition.md) | disallow constant expressions in conditions in `<template>` | | :warning: |
| [vue/no-empty-pattern](./no-empty-pattern.md) | disallow empty destructuring patterns in `<template>` | | :warning: |
| [vue/no-extra-parens](./no-extra-parens.md) | disallow unnecessary parentheses in `<template>` | :wrench: | :lipstick: |
| [vue/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace in `.vue` files | | :warning: |
| [vue/no-loss-of-precision](./no-loss-of-precision.md) | Disallow literal numbers that lose precision in `<template>` | | :warning: |
| [vue/no-restricted-syntax](./no-restricted-syntax.md) | Disallow specified syntax in `<template>` | | :hammer: |
| [vue/no-sparse-arrays](./no-sparse-arrays.md) | Disallow sparse arrays in `<template>` | | :warning: |
| [vue/no-useless-concat](./no-useless-concat.md) | Disallow unnecessary concatenation of literals or template literals in `<template>` | | :hammer: |
| [vue/object-curly-newline](./object-curly-newline.md) | Enforce consistent line breaks after opening and before closing braces in `<template>` | :wrench: | :lipstick: |
| [vue/object-curly-spacing](./object-curly-spacing.md) | Enforce consistent spacing inside braces in `<template>` | :wrench: | :lipstick: |
| [vue/object-property-newline](./object-property-newline.md) | Enforce placing object properties on separate lines in `<template>` | :wrench: | :lipstick: |
| [vue/object-shorthand](./object-shorthand.md) | Require or disallow method and property shorthand syntax for object literals in `<template>` | :wrench: | :hammer: |
| [vue/operator-linebreak](./operator-linebreak.md) | Enforce consistent linebreak style for operators in `<template>` | :wrench: | :lipstick: |
| [vue/prefer-template](./prefer-template.md) | Require template literals instead of string concatenation in `<template>` | :wrench: | :hammer: |
| [vue/quote-props](./quote-props.md) | Require quotes around object literal property names in `<template>` | :wrench: | :hammer: |
| [vue/space-in-parens](./space-in-parens.md) | Enforce consistent spacing inside parentheses in `<template>` | :wrench: | :lipstick: |
| [vue/space-infix-ops](./space-infix-ops.md) | Require spacing around infix operators in `<template>` | :wrench: | :lipstick: |
| [vue/space-unary-ops](./space-unary-ops.md) | Enforce consistent spacing before or after unary operators in `<template>` | :wrench: | :lipstick: |
| [vue/template-curly-spacing](./template-curly-spacing.md) | Require or disallow spacing around embedded expressions of template strings in `<template>` | :wrench: | :lipstick: |
| [vue/no-loss-of-precision](./no-loss-of-precision.md) | disallow literal numbers that lose precision in `<template>` | | :warning: |
| [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax in `<template>` | | :hammer: |
| [vue/no-sparse-arrays](./no-sparse-arrays.md) | disallow sparse arrays in `<template>` | | :warning: |
| [vue/no-useless-concat](./no-useless-concat.md) | disallow unnecessary concatenation of literals or template literals in `<template>` | | :hammer: |
| [vue/object-curly-newline](./object-curly-newline.md) | enforce consistent line breaks after opening and before closing braces in `<template>` | :wrench: | :lipstick: |
| [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces in `<template>` | :wrench: | :lipstick: |
| [vue/object-property-newline](./object-property-newline.md) | enforce placing object properties on separate lines in `<template>` | :wrench: | :lipstick: |
| [vue/object-shorthand](./object-shorthand.md) | require or disallow method and property shorthand syntax for object literals in `<template>` | :wrench: | :hammer: |
| [vue/operator-linebreak](./operator-linebreak.md) | enforce consistent linebreak style for operators in `<template>` | :wrench: | :lipstick: |
| [vue/prefer-template](./prefer-template.md) | require template literals instead of string concatenation in `<template>` | :wrench: | :hammer: |
| [vue/quote-props](./quote-props.md) | require quotes around object literal property names in `<template>` | :wrench: | :hammer: |
| [vue/space-in-parens](./space-in-parens.md) | enforce consistent spacing inside parentheses in `<template>` | :wrench: | :lipstick: |
| [vue/space-infix-ops](./space-infix-ops.md) | require spacing around infix operators in `<template>` | :wrench: | :lipstick: |
| [vue/space-unary-ops](./space-unary-ops.md) | enforce consistent spacing before or after unary operators in `<template>` | :wrench: | :lipstick: |
| [vue/template-curly-spacing](./template-curly-spacing.md) | require or disallow spacing around embedded expressions of template strings in `<template>` | :wrench: | :lipstick: |

</rules-table>

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/array-bracket-newline.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/array-bracket-newline
description: Enforce linebreaks after opening and before closing array brackets in `<template>`
description: enforce linebreaks after opening and before closing array brackets in `<template>`
since: v7.1.0
---
# vue/array-bracket-newline

> Enforce linebreaks after opening and before closing array brackets in `<template>`
> enforce linebreaks after opening and before closing array brackets in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/array-bracket-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/array-bracket-spacing
description: Enforce consistent spacing inside array brackets in `<template>`
description: enforce consistent spacing inside array brackets in `<template>`
since: v5.2.0
---
# vue/array-bracket-spacing

> Enforce consistent spacing inside array brackets in `<template>`
> enforce consistent spacing inside array brackets in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/arrow-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/arrow-spacing
description: Enforce consistent spacing before and after the arrow in arrow functions in `<template>`
description: enforce consistent spacing before and after the arrow in arrow functions in `<template>`
since: v5.2.0
---
# vue/arrow-spacing

> Enforce consistent spacing before and after the arrow in arrow functions in `<template>`
> enforce consistent spacing before and after the arrow in arrow functions in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/block-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/block-spacing
description: Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
description: disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
since: v5.2.0
---
# vue/block-spacing

> Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
> disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/brace-style.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/brace-style
description: Enforce consistent brace style for blocks in `<template>`
description: enforce consistent brace style for blocks in `<template>`
since: v5.2.0
---
# vue/brace-style

> Enforce consistent brace style for blocks in `<template>`
> enforce consistent brace style for blocks in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/camelcase.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/camelcase
description: Enforce camelcase naming convention in `<template>`
description: enforce camelcase naming convention in `<template>`
since: v5.2.0
---
# vue/camelcase

> Enforce camelcase naming convention in `<template>`
> enforce camelcase naming convention in `<template>`

This rule is the same rule as core [camelcase] rule but it applies to the expressions in `<template>`.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/comma-dangle.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/comma-dangle
description: Require or disallow trailing commas in `<template>`
description: require or disallow trailing commas in `<template>`
since: v5.2.0
---
# vue/comma-dangle

> Require or disallow trailing commas in `<template>`
> require or disallow trailing commas in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/comma-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/comma-spacing
description: Enforce consistent spacing before and after commas in `<template>`
description: enforce consistent spacing before and after commas in `<template>`
since: v7.0.0
---
# vue/comma-spacing

> Enforce consistent spacing before and after commas in `<template>`
> enforce consistent spacing before and after commas in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/comma-style.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/comma-style
description: Enforce consistent comma style in `<template>`
description: enforce consistent comma style in `<template>`
since: v7.0.0
---
# vue/comma-style

> Enforce consistent comma style in `<template>`
> enforce consistent comma style in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/dot-location.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/dot-location
description: Enforce consistent newlines before and after dots in `<template>`
description: enforce consistent newlines before and after dots in `<template>`
since: v6.0.0
---
# vue/dot-location

> Enforce consistent newlines before and after dots in `<template>`
> enforce consistent newlines before and after dots in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/dot-notation.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/dot-notation
description: Enforce dot notation whenever possible in `<template>`
description: enforce dot notation whenever possible in `<template>`
since: v7.0.0
---
# vue/dot-notation

> Enforce dot notation whenever possible in `<template>`
> enforce dot notation whenever possible in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/eqeqeq.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/eqeqeq
description: Require the use of `===` and `!==` in `<template>`
description: require the use of `===` and `!==` in `<template>`
since: v5.2.0
---
# vue/eqeqeq

> Require the use of `===` and `!==` in `<template>`
> require the use of `===` and `!==` in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/func-call-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/func-call-spacing
description: Require or disallow spacing between function identifiers and their invocations in `<template>`
description: require or disallow spacing between function identifiers and their invocations in `<template>`
since: v7.0.0
---
# vue/func-call-spacing

> Require or disallow spacing between function identifiers and their invocations in `<template>`
> require or disallow spacing between function identifiers and their invocations in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/key-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/key-spacing
description: Enforce consistent spacing between keys and values in object literal properties in `<template>`
description: enforce consistent spacing between keys and values in object literal properties in `<template>`
since: v5.2.0
---
# vue/key-spacing

> Enforce consistent spacing between keys and values in object literal properties in `<template>`
> enforce consistent spacing between keys and values in object literal properties in `<template>`

- :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.

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/keyword-spacing.md
Expand Up @@ -2,12 +2,12 @@
pageClass: rule-details
sidebarDepth: 0
title: vue/keyword-spacing
description: Enforce consistent spacing before and after keywords in `<template>`
description: enforce consistent spacing before and after keywords in `<template>`
since: v6.0.0
---
# vue/keyword-spacing

> Enforce consistent spacing before and after keywords in `<template>`
> enforce consistent spacing before and after keywords in `<template>`

- :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.

Expand Down