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

Add new vue/require-prop-comment rule #2019

Merged
merged 28 commits into from Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
641a483
require-prop-comment
czb3279338858 Sep 28, 2022
a6892f7
Merge branch 'master' of https://github.com/czb3279338858/eslint-plug…
czb3279338858 Oct 8, 2022
3e8d0e1
add type arg
czb3279338858 Oct 19, 2022
f271f48
add jsdoc type
czb3279338858 Oct 20, 2022
0fbb5f8
Merge branch 'master' of https://github.com/czb3279338858/eslint-plug…
czb3279338858 Oct 20, 2022
07ea38a
edit rule
czb3279338858 Oct 20, 2022
3ec9ba0
npm run update运行结果
czb3279338858 Oct 20, 2022
763fa82
Merge branch 'master' of https://github.com/czb3279338858/eslint-plug…
czb3279338858 Oct 25, 2022
1abad76
npm run update edit
czb3279338858 Oct 25, 2022
4b58d8b
Modify according to the requirements during consolidation
czb3279338858 Oct 25, 2022
a695a74
edit test
czb3279338858 Oct 25, 2022
9545392
delete only one check
czb3279338858 Oct 25, 2022
c4dd9f6
delete template
czb3279338858 Oct 25, 2022
2549e6b
edit md
czb3279338858 Oct 25, 2022
9acb7ab
Merge branch 'master' into master
FloEdelmann Oct 25, 2022
89b4b15
Lint
FloEdelmann Oct 27, 2022
7c08d5d
Improve docs
FloEdelmann Oct 27, 2022
57d9c5f
Only check last preceding comment
FloEdelmann Oct 27, 2022
d304e62
Use message IDs
FloEdelmann Oct 27, 2022
a2d8144
Rename unlimited → any
FloEdelmann Oct 27, 2022
e8070ac
Fix docs
FloEdelmann Oct 27, 2022
4063129
edit rules
czb3279338858 Oct 29, 2022
5a517aa
edit schema type
czb3279338858 Oct 31, 2022
03f33ff
Merge remote-tracking branch 'upstream/master'
czb3279338858 Oct 31, 2022
310fd26
update readme.md
czb3279338858 Oct 31, 2022
b4b7e6a
add rules
czb3279338858 Oct 31, 2022
1c0bd96
add rules
czb3279338858 Oct 31, 2022
0d54c19
Merge branch 'master' of https://github.com/czb3279338858/eslint-plug…
czb3279338858 Nov 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 36 additions & 35 deletions docs/rules/README.md
Expand Up @@ -230,7 +230,7 @@ For example:
| [vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md) | disallow to pass multiple objects into array to class | | :hammer: |
| [vue/no-potential-component-option-typo](./no-potential-component-option-typo.md) | disallow a potential typo in your component property | :bulb: | :hammer: |
| [vue/no-ref-object-destructure](./no-ref-object-destructure.md) | disallow destructuring of ref objects that can lead to loss of reactivity | | :warning: |
| [vue/no-required-prop-with-default](./no-required-prop-with-default.md) | enforce props with default values ​​to be optional | :wrench::bulb: | :warning: |
| [vue/no-required-prop-with-default](./no-required-prop-with-default.md) | enforce props with default values to be optional | :wrench::bulb: | :warning: |
| [vue/no-restricted-block](./no-restricted-block.md) | disallow specific block | | :hammer: |
| [vue/no-restricted-call-after-await](./no-restricted-call-after-await.md) | disallow asynchronously called restricted methods | | :hammer: |
| [vue/no-restricted-class](./no-restricted-class.md) | disallow specific classes in Vue components | | :warning: |
Expand Down Expand Up @@ -260,6 +260,7 @@ For example:
| [vue/require-emit-validator](./require-emit-validator.md) | require type definitions in emits | :bulb: | :hammer: |
| [vue/require-expose](./require-expose.md) | require declare public properties using `expose` | :bulb: | :hammer: |
| [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | | :hammer: |
| [vue/require-prop-comment](./require-prop-comment.md) | require that props have a comment | | :warning: |
| [vue/script-indent](./script-indent.md) | enforce consistent indentation in `<script>` | :wrench: | :lipstick: |
| [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | | :hammer: |
| [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: | :hammer: |
Expand All @@ -276,42 +277,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: |
FloEdelmann marked this conversation as resolved.
Show resolved Hide resolved
| [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