Skip to content

Docs: improve document's header #142

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

Merged
merged 6 commits into from
Sep 18, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"editor.tabSize": 2
"editor.tabSize": 2,
"eslint.options": {
"rulePaths": ["eslint-internal-rules"]
}
}
120 changes: 60 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,68 +92,68 @@ The `--fix` option on the command line automatically fixes problems reported by

| | Rule ID | Description |
|:---|:--------|:------------|
| | [no-dupe-keys](./docs/rules/no-dupe-keys.md) | Prevents duplication of field names. |
| :white_check_mark: | [no-parsing-error](./docs/rules/no-parsing-error.md) | disallow parsing errors in `<template>`. |
| | [no-reserved-keys](./docs/rules/no-reserved-keys.md) | Prevent overwrite reserved keys. |
| | [no-shared-component-data](./docs/rules/no-shared-component-data.md) | Enforces component's data property to be a function. |
| | [no-template-key](./docs/rules/no-template-key.md) | disallow `key` attribute on `<template>`. |
| | [require-render-return](./docs/rules/require-render-return.md) | Enforces render function to always return value. |
| | [require-valid-default-prop](./docs/rules/require-valid-default-prop.md) | Enforces props default values to be valid. |
| | [return-in-computed-property](./docs/rules/return-in-computed-property.md) | Enforces that a return statement is present in computed property. |
| :white_check_mark: | [valid-template-root](./docs/rules/valid-template-root.md) | enforce valid template root. |
| :white_check_mark: | [valid-v-bind](./docs/rules/valid-v-bind.md) | enforce valid `v-bind` directives. |
| :white_check_mark: | [valid-v-cloak](./docs/rules/valid-v-cloak.md) | enforce valid `v-cloak` directives. |
| :white_check_mark: | [valid-v-else-if](./docs/rules/valid-v-else-if.md) | enforce valid `v-else-if` directives. |
| :white_check_mark: | [valid-v-else](./docs/rules/valid-v-else.md) | enforce valid `v-else` directives. |
| :white_check_mark: | [valid-v-for](./docs/rules/valid-v-for.md) | enforce valid `v-for` directives. |
| :white_check_mark: | [valid-v-html](./docs/rules/valid-v-html.md) | enforce valid `v-html` directives. |
| :white_check_mark: | [valid-v-if](./docs/rules/valid-v-if.md) | enforce valid `v-if` directives. |
| :white_check_mark: | [valid-v-model](./docs/rules/valid-v-model.md) | enforce valid `v-model` directives. |
| :white_check_mark: | [valid-v-on](./docs/rules/valid-v-on.md) | enforce valid `v-on` directives. |
| :white_check_mark: | [valid-v-once](./docs/rules/valid-v-once.md) | enforce valid `v-once` directives. |
| :white_check_mark: | [valid-v-pre](./docs/rules/valid-v-pre.md) | enforce valid `v-pre` directives. |
| :white_check_mark: | [valid-v-show](./docs/rules/valid-v-show.md) | enforce valid `v-show` directives. |
| :white_check_mark: | [valid-v-text](./docs/rules/valid-v-text.md) | enforce valid `v-text` directives. |
| | [no-dupe-keys](./docs/rules/no-dupe-keys.md) | disallow duplication of field names |
| :white_check_mark: | [no-parsing-error](./docs/rules/no-parsing-error.md) | disallow parsing errors in `<template>` |
| | [no-reserved-keys](./docs/rules/no-reserved-keys.md) | disallow overwriting reserved keys |
| | [no-shared-component-data](./docs/rules/no-shared-component-data.md) | enforce component's data property to be a function |
| | [no-template-key](./docs/rules/no-template-key.md) | disallow `key` attribute on `<template>` |
| | [require-render-return](./docs/rules/require-render-return.md) | enforce render function to always return value |
| | [require-valid-default-prop](./docs/rules/require-valid-default-prop.md) | enforce props default values to be valid |
| | [return-in-computed-property](./docs/rules/return-in-computed-property.md) | enforce that a return statement is present in computed property |
| :white_check_mark: | [valid-template-root](./docs/rules/valid-template-root.md) | enforce valid template root |
| :white_check_mark: | [valid-v-bind](./docs/rules/valid-v-bind.md) | enforce valid `v-bind` directives |
| :white_check_mark: | [valid-v-cloak](./docs/rules/valid-v-cloak.md) | enforce valid `v-cloak` directives |
| :white_check_mark: | [valid-v-else-if](./docs/rules/valid-v-else-if.md) | enforce valid `v-else-if` directives |
| :white_check_mark: | [valid-v-else](./docs/rules/valid-v-else.md) | enforce valid `v-else` directives |
| :white_check_mark: | [valid-v-for](./docs/rules/valid-v-for.md) | enforce valid `v-for` directives |
| :white_check_mark: | [valid-v-html](./docs/rules/valid-v-html.md) | enforce valid `v-html` directives |
| :white_check_mark: | [valid-v-if](./docs/rules/valid-v-if.md) | enforce valid `v-if` directives |
| :white_check_mark: | [valid-v-model](./docs/rules/valid-v-model.md) | enforce valid `v-model` directives |
| :white_check_mark: | [valid-v-on](./docs/rules/valid-v-on.md) | enforce valid `v-on` directives |
| :white_check_mark: | [valid-v-once](./docs/rules/valid-v-once.md) | enforce valid `v-once` directives |
| :white_check_mark: | [valid-v-pre](./docs/rules/valid-v-pre.md) | enforce valid `v-pre` directives |
| :white_check_mark: | [valid-v-show](./docs/rules/valid-v-show.md) | enforce valid `v-show` directives |
| :white_check_mark: | [valid-v-text](./docs/rules/valid-v-text.md) | enforce valid `v-text` directives |


### Best Practices

| | Rule ID | Description |
|:---|:--------|:------------|
| :wrench: | [html-end-tags](./docs/rules/html-end-tags.md) | enforce end tag style. |
| | [no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md) | Check if there are no asynchronous actions inside computed properties. |
| :white_check_mark: | [no-confusing-v-for-v-if](./docs/rules/no-confusing-v-for-v-if.md) | disallow confusing `v-for` and `v-if` on the same element. |
| | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplicate attributes. |
| | [no-side-effects-in-computed-properties](./docs/rules/no-side-effects-in-computed-properties.md) | Don't introduce side effects in computed properties |
| :white_check_mark: | [no-textarea-mustache](./docs/rules/no-textarea-mustache.md) | disallow mustaches in `<textarea>`. |
| | [order-in-components](./docs/rules/order-in-components.md) | Keep order of properties in components |
| :white_check_mark: | [require-component-is](./docs/rules/require-component-is.md) | require `v-bind:is` of `<component>` elements. |
| | [require-default-prop](./docs/rules/require-default-prop.md) | Require default value for props |
| | [require-prop-types](./docs/rules/require-prop-types.md) | Prop definitions should be detailed |
| :white_check_mark: | [require-v-for-key](./docs/rules/require-v-for-key.md) | require `v-bind:key` with `v-for` directives. |
| | [this-in-template](./docs/rules/this-in-template.md) | enforce usage of `this` in template. |
| :wrench: | [html-end-tags](./docs/rules/html-end-tags.md) | enforce end tag style |
| | [no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties |
| :white_check_mark: | [no-confusing-v-for-v-if](./docs/rules/no-confusing-v-for-v-if.md) | disallow confusing `v-for` and `v-if` on the same element |
| | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplication of attributes |
| | [no-side-effects-in-computed-properties](./docs/rules/no-side-effects-in-computed-properties.md) | disallow side effects in computed properties |
| :white_check_mark: | [no-textarea-mustache](./docs/rules/no-textarea-mustache.md) | disallow mustaches in `<textarea>` |
| | [order-in-components](./docs/rules/order-in-components.md) | enforce order of properties in components |
| :white_check_mark: | [require-component-is](./docs/rules/require-component-is.md) | require `v-bind:is` of `<component>` elements |
| | [require-default-prop](./docs/rules/require-default-prop.md) | require default value for props |
| | [require-prop-types](./docs/rules/require-prop-types.md) | require type definitions in props |
| :white_check_mark: | [require-v-for-key](./docs/rules/require-v-for-key.md) | require `v-bind:key` with `v-for` directives |
| | [this-in-template](./docs/rules/this-in-template.md) | enforce usage of `this` in template |


### Stylistic Issues

| | Rule ID | Description |
|:---|:--------|:------------|
| :wrench: | [attribute-hyphenation](./docs/rules/attribute-hyphenation.md) | Define a style for the props casing in templates. |
| | [html-quotes](./docs/rules/html-quotes.md) | enforce quotes style of HTML attributes. |
| :wrench: | [html-self-closing](./docs/rules/html-self-closing.md) | enforce self-closing style. |
| | [max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | Define the number of attributes allows per line |
| :wrench: | [mustache-interpolation-spacing](./docs/rules/mustache-interpolation-spacing.md) | enforce unified spacing in mustache interpolations. |
| :wrench: | [name-property-casing](./docs/rules/name-property-casing.md) | Requires specific casing for the name property in Vue components |
| :wrench: | [no-multi-spaces](./docs/rules/no-multi-spaces.md) | This rule warns about the usage of extra whitespaces between attributes |
| :wrench: | [v-bind-style](./docs/rules/v-bind-style.md) | enforce `v-bind` directive style. |
| :wrench: | [v-on-style](./docs/rules/v-on-style.md) | enforce `v-on` directive style. |
| :wrench: | [attribute-hyphenation](./docs/rules/attribute-hyphenation.md) | enforce attribute naming style in template |
| | [html-quotes](./docs/rules/html-quotes.md) | enforce quotes style of HTML attributes |
| :wrench: | [html-self-closing](./docs/rules/html-self-closing.md) | enforce self-closing style |
| | [max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | enforce the maximum number of attributes per line |
| :wrench: | [mustache-interpolation-spacing](./docs/rules/mustache-interpolation-spacing.md) | enforce unified spacing in mustache interpolations |
| :wrench: | [name-property-casing](./docs/rules/name-property-casing.md) | enforce specific casing for the name property in Vue components |
| :wrench: | [no-multi-spaces](./docs/rules/no-multi-spaces.md) | disallow multiple spaces |
| :wrench: | [v-bind-style](./docs/rules/v-bind-style.md) | enforce `v-bind` directive style |
| :wrench: | [v-on-style](./docs/rules/v-on-style.md) | enforce `v-on` directive style |


### Variables

| | Rule ID | Description |
|:---|:--------|:------------|
| :white_check_mark: | [jsx-uses-vars](./docs/rules/jsx-uses-vars.md) | Prevent variables used in JSX to be marked as unused |
| :white_check_mark: | [jsx-uses-vars](./docs/rules/jsx-uses-vars.md) | prevent variables used in JSX to be marked as unused |

### Deprecated

Expand All @@ -162,22 +162,22 @@ The `--fix` option on the command line automatically fixes problems reported by

| Rule ID | Replaced by |
|:--------|:------------|
| [html-no-self-closing](./rules/html-no-self-closing.md) | [html-self-closing-style](./rules/html-self-closing-style.md) |
| [no-invalid-template-root](./rules/no-invalid-template-root.md) | [valid-template-root](./rules/valid-template-root.md) |
| [no-invalid-v-bind](./rules/no-invalid-v-bind.md) | [valid-v-bind](./rules/valid-v-bind.md) |
| [no-invalid-v-cloak](./rules/no-invalid-v-cloak.md) | [valid-v-cloak](./rules/valid-v-cloak.md) |
| [no-invalid-v-else-if](./rules/no-invalid-v-else-if.md) | [valid-v-else-if](./rules/valid-v-else-if.md) |
| [no-invalid-v-else](./rules/no-invalid-v-else.md) | [valid-v-else](./rules/valid-v-else.md) |
| [no-invalid-v-for](./rules/no-invalid-v-for.md) | [valid-v-for](./rules/valid-v-for.md) |
| [no-invalid-v-html](./rules/no-invalid-v-html.md) | [valid-v-html](./rules/valid-v-html.md) |
| [no-invalid-v-if](./rules/no-invalid-v-if.md) | [valid-v-if](./rules/valid-v-if.md) |
| [no-invalid-v-model](./rules/no-invalid-v-model.md) | [valid-v-model](./rules/valid-v-model.md) |
| [no-invalid-v-on](./rules/no-invalid-v-on.md) | [valid-v-on](./rules/valid-v-on.md) |
| [no-invalid-v-once](./rules/no-invalid-v-once.md) | [valid-v-once](./rules/valid-v-once.md) |
| [no-invalid-v-pre](./rules/no-invalid-v-pre.md) | [valid-v-pre](./rules/valid-v-pre.md) |
| [no-invalid-v-show](./rules/no-invalid-v-show.md) | [valid-v-show](./rules/valid-v-show.md) |
| [no-invalid-v-text](./rules/no-invalid-v-text.md) | [valid-v-text](./rules/valid-v-text.md) |
| [no-reservered-keys](./rules/no-reservered-keys.md) | [no-reserved-keys](./rules/no-reserved-keys.md) |
| [html-no-self-closing](./docs/rules/html-no-self-closing.md) | [html-self-closing](./docs/rules/html-self-closing.md) |
| [no-invalid-template-root](./docs/rules/no-invalid-template-root.md) | [valid-template-root](./docs/rules/valid-template-root.md) |
| [no-invalid-v-bind](./docs/rules/no-invalid-v-bind.md) | [valid-v-bind](./docs/rules/valid-v-bind.md) |
| [no-invalid-v-cloak](./docs/rules/no-invalid-v-cloak.md) | [valid-v-cloak](./docs/rules/valid-v-cloak.md) |
| [no-invalid-v-else-if](./docs/rules/no-invalid-v-else-if.md) | [valid-v-else-if](./docs/rules/valid-v-else-if.md) |
| [no-invalid-v-else](./docs/rules/no-invalid-v-else.md) | [valid-v-else](./docs/rules/valid-v-else.md) |
| [no-invalid-v-for](./docs/rules/no-invalid-v-for.md) | [valid-v-for](./docs/rules/valid-v-for.md) |
| [no-invalid-v-html](./docs/rules/no-invalid-v-html.md) | [valid-v-html](./docs/rules/valid-v-html.md) |
| [no-invalid-v-if](./docs/rules/no-invalid-v-if.md) | [valid-v-if](./docs/rules/valid-v-if.md) |
| [no-invalid-v-model](./docs/rules/no-invalid-v-model.md) | [valid-v-model](./docs/rules/valid-v-model.md) |
| [no-invalid-v-on](./docs/rules/no-invalid-v-on.md) | [valid-v-on](./docs/rules/valid-v-on.md) |
| [no-invalid-v-once](./docs/rules/no-invalid-v-once.md) | [valid-v-once](./docs/rules/valid-v-once.md) |
| [no-invalid-v-pre](./docs/rules/no-invalid-v-pre.md) | [valid-v-pre](./docs/rules/valid-v-pre.md) |
| [no-invalid-v-show](./docs/rules/no-invalid-v-show.md) | [valid-v-show](./docs/rules/valid-v-show.md) |
| [no-invalid-v-text](./docs/rules/no-invalid-v-text.md) | [valid-v-text](./docs/rules/valid-v-text.md) |
| [no-reservered-keys](./docs/rules/no-reservered-keys.md) | [no-reserved-keys](./docs/rules/no-reserved-keys.md) |

<!--RULES_TABLE_END-->

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/attribute-hyphenation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Define if attributes on cusom components can be hyphened. (attribute-hyphenation)
# enforce attribute naming style in template (attribute-hyphenation)

- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

## :wrench: Options

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/html-end-tags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce end tag style (html-end-tags)
# enforce end tag style (html-end-tags)

- :wrench: This rule is fixable with `eslint --fix` command.
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

This rule enforce the way of end tags.

Expand Down
5 changes: 3 additions & 2 deletions docs/rules/html-no-self-closing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Disallow self-closing elements (html-no-self-closing)
# disallow self-closing elements (html-no-self-closing)

- :wrench: This rule is fixable with `eslint --fix` command.
- :warning: This rule was **deprecated** and replaced by [html-self-closing](html-self-closing.md) rule.
- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

Self-closing (e.g. `<br/>`) is syntax of XML/XHTML.
HTML ignores it.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-quotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce quotes style of HTML attributes (html-quotes)
# enforce quotes style of HTML attributes (html-quotes)

You can choose quotes of HTML attributes from:

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/html-self-closing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Enforce self-closing style (html-self-closing)
# enforce self-closing style (html-self-closing)

- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

In Vue.js template, we can use either two styles for elements which don't have their content.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/jsx-uses-vars.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Prevent variables used in JSX to be marked as unused (jsx-uses-vars)
# prevent variables used in JSX to be marked as unused (jsx-uses-vars)

- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.

Since 0.17.0 the ESLint `no-unused-vars` rule does not detect variables used in JSX ([see details](http://eslint.org/blog/2015/03/eslint-0.17.0-released#changes-to-jsxreact-handling)).
This rule will find variables used in JSX and mark them as used.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/max-attributes-per-line.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Define the number of attributes allows per line (max-attributes-per-line)
# enforce the maximum number of attributes per line (max-attributes-per-line)

Limits the maximum number of attributes/properties per line to improve readability.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/mustache-interpolation-spacing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# enforce unified spacing in mustache interpolations. (mustache-interpolation-spacing)
# enforce unified spacing in mustache interpolations (mustache-interpolation-spacing)

- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/name-property-casing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Requires specific casing for the name property in Vue components (name-property-casing)
# enforce specific casing for the name property in Vue components (name-property-casing)

- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

Define a style for the `name` property casing for consistency purposes.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-async-in-computed-properties.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Check if there are no asynchronous actions inside computed properties (no-async-in-computed-properties)
# disallow asynchronous actions in computed properties (no-async-in-computed-properties)

Computed properties should be synchronous. Asynchronous actions inside them may not work as expected and can lead to an unexpected behaviour, that's why you should avoid them.
If you need async computed properties you might want to consider using additional plugin [vue-async-computed]
Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-confusing-v-for-v-if.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow confusing `v-for` and `v-if` on the same element (no-confusing-v-for-v-if)
# disallow confusing `v-for` and `v-if` on the same element (no-confusing-v-for-v-if)

- :white_check_mark: The `"extends": "plugin:vue/recommended"` property in a configuration file enables this rule.

> When they exist on the same node, `v-for` has a higher priority than `v-if`. That means the `v-if` will be run on each iteration of the loop separately.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-dupe-keys.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prevents duplication of field names (no-dupe-keys)
# disallow duplication of field names (no-dupe-keys)

This rule prevents to use duplicated names.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-duplicate-attributes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow duplicate arguments (no-duplicate-attributes)
# disallow duplication of attributes (no-duplicate-attributes)

When duplicate arguments exist, only the last one is valid.
It's possibly mistakes.
Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-invalid-template-root.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow invalid template root (no-invalid-root-element)
# disallow invalid template root (no-invalid-template-root)

- :warning: This rule was **deprecated** and replaced by [valid-template-root](valid-template-root.md) rule.

This rule checks whether every template root is valid.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-invalid-v-bind.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow invalid `v-bind` directives (no-invalid-v-bind)
# disallow invalid `v-bind` directives (no-invalid-v-bind)

- :warning: This rule was **deprecated** and replaced by [valid-v-bind](valid-v-bind.md) rule.

This rule checks whether every `v-bind` directive is valid.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-invalid-v-cloak.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow invalid `v-cloak` directives (no-invalid-v-cloak)
# disallow invalid `v-cloak` directives (no-invalid-v-cloak)

- :warning: This rule was **deprecated** and replaced by [valid-v-cloak](valid-v-cloak.md) rule.

This rule checks whether every `v-cloak` directive is valid.

Expand Down
4 changes: 3 additions & 1 deletion docs/rules/no-invalid-v-else-if.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Disallow invalid `v-else-if` directives (no-invalid-v-else-if)
# disallow invalid `v-else-if` directives (no-invalid-v-else-if)

- :warning: This rule was **deprecated** and replaced by [valid-v-else-if](valid-v-else-if.md) rule.

This rule checks whether every `v-else-if` directive is valid.

Expand Down
Loading