From cef7119e7f58c7c5913c44ef36ff025f4ef60511 Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Wed, 9 Aug 2017 17:24:04 +0900 Subject: [PATCH 1/5] Docs: improve document's header --- docs/rules/attribute-hyphenation.md | 4 +++- docs/rules/html-end-tags.md | 4 ++-- docs/rules/html-no-self-closing.md | 5 +++-- docs/rules/html-quotes.md | 2 +- docs/rules/html-self-closing.md | 4 +++- docs/rules/jsx-uses-vars.md | 2 ++ docs/rules/name-property-casing.md | 2 ++ docs/rules/no-async-in-computed-properties.md | 2 +- docs/rules/no-confusing-v-for-v-if.md | 4 +++- docs/rules/no-dupe-keys.md | 2 +- docs/rules/no-duplicate-attributes.md | 2 +- docs/rules/no-invalid-template-root.md | 4 +++- docs/rules/no-invalid-v-bind.md | 4 +++- docs/rules/no-invalid-v-cloak.md | 4 +++- docs/rules/no-invalid-v-else-if.md | 4 +++- docs/rules/no-invalid-v-else.md | 4 +++- docs/rules/no-invalid-v-for.md | 4 +++- docs/rules/no-invalid-v-html.md | 4 +++- docs/rules/no-invalid-v-if.md | 4 +++- docs/rules/no-invalid-v-model.md | 4 +++- docs/rules/no-invalid-v-on.md | 4 +++- docs/rules/no-invalid-v-once.md | 4 +++- docs/rules/no-invalid-v-pre.md | 4 +++- docs/rules/no-invalid-v-show.md | 4 +++- docs/rules/no-invalid-v-text.md | 4 +++- docs/rules/no-parsing-error.md | 4 +++- docs/rules/no-reservered-keys.md | 2 +- docs/rules/no-shared-component-data.md | 2 +- .../no-side-effects-in-computed-properties.md | 2 +- docs/rules/no-template-key.md | 2 +- docs/rules/no-textarea-mustache.md | 4 +++- docs/rules/order-in-components.md | 2 +- docs/rules/require-component-is.md | 4 +++- docs/rules/require-render-return.md | 2 +- docs/rules/require-v-for-key.md | 4 +++- docs/rules/require-valid-default-prop.md | 2 +- docs/rules/return-in-computed-property.md | 2 +- docs/rules/v-bind-style.md | 4 ++-- docs/rules/v-on-style.md | 4 ++-- docs/rules/valid-template-root.md | 4 +++- docs/rules/valid-v-bind.md | 4 +++- docs/rules/valid-v-cloak.md | 4 +++- docs/rules/valid-v-else-if.md | 4 +++- docs/rules/valid-v-else.md | 4 +++- docs/rules/valid-v-for.md | 4 +++- docs/rules/valid-v-html.md | 4 +++- docs/rules/valid-v-if.md | 4 +++- docs/rules/valid-v-model.md | 4 +++- docs/rules/valid-v-on.md | 4 +++- docs/rules/valid-v-once.md | 4 +++- docs/rules/valid-v-pre.md | 4 +++- docs/rules/valid-v-show.md | 4 +++- docs/rules/valid-v-text.md | 4 +++- tools/update-rules.js | 18 ++++++++++++++++++ 54 files changed, 148 insertions(+), 55 deletions(-) diff --git a/docs/rules/attribute-hyphenation.md b/docs/rules/attribute-hyphenation.md index 7d83c9fad..b572e876e 100644 --- a/docs/rules/attribute-hyphenation.md +++ b/docs/rules/attribute-hyphenation.md @@ -1,4 +1,6 @@ -# Define if attributes on cusom components can be hyphened. (attribute-hyphenation) +# Define a style for the props casing in templates. (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 diff --git a/docs/rules/html-end-tags.md b/docs/rules/html-end-tags.md index 75803f768..e71daaa30 100644 --- a/docs/rules/html-end-tags.md +++ b/docs/rules/html-end-tags.md @@ -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. diff --git a/docs/rules/html-no-self-closing.md b/docs/rules/html-no-self-closing.md index 37967e82b..a77f9fd42 100644 --- a/docs/rules/html-no-self-closing.md +++ b/docs/rules/html-no-self-closing.md @@ -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-style](html-self-closing-style.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. `
`) is syntax of XML/XHTML. HTML ignores it. diff --git a/docs/rules/html-quotes.md b/docs/rules/html-quotes.md index 920f5b6be..bed344deb 100644 --- a/docs/rules/html-quotes.md +++ b/docs/rules/html-quotes.md @@ -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: diff --git a/docs/rules/html-self-closing.md b/docs/rules/html-self-closing.md index c7ac3822f..b910ed925 100644 --- a/docs/rules/html-self-closing.md +++ b/docs/rules/html-self-closing.md @@ -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. diff --git a/docs/rules/jsx-uses-vars.md b/docs/rules/jsx-uses-vars.md index 3e0a2068b..3dcd4a290 100644 --- a/docs/rules/jsx-uses-vars.md +++ b/docs/rules/jsx-uses-vars.md @@ -1,5 +1,7 @@ # 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. diff --git a/docs/rules/name-property-casing.md b/docs/rules/name-property-casing.md index 316cda8f3..6f3a93e26 100644 --- a/docs/rules/name-property-casing.md +++ b/docs/rules/name-property-casing.md @@ -1,5 +1,7 @@ # Requires 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. ## :book: Rule Details diff --git a/docs/rules/no-async-in-computed-properties.md b/docs/rules/no-async-in-computed-properties.md index 83c48b59e..738c3d566 100644 --- a/docs/rules/no-async-in-computed-properties.md +++ b/docs/rules/no-async-in-computed-properties.md @@ -1,4 +1,4 @@ -# Check if there are no asynchronous actions inside computed properties (no-async-in-computed-properties) +# Check if there are no asynchronous actions inside 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] diff --git a/docs/rules/no-confusing-v-for-v-if.md b/docs/rules/no-confusing-v-for-v-if.md index 04779f451..24355741b 100644 --- a/docs/rules/no-confusing-v-for-v-if.md +++ b/docs/rules/no-confusing-v-for-v-if.md @@ -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. > diff --git a/docs/rules/no-dupe-keys.md b/docs/rules/no-dupe-keys.md index 990001881..9188d7815 100644 --- a/docs/rules/no-dupe-keys.md +++ b/docs/rules/no-dupe-keys.md @@ -1,4 +1,4 @@ -# Prevents duplication of field names (no-dupe-keys) +# Prevents duplication of field names. (no-dupe-keys) This rule prevents to use duplicated names. diff --git a/docs/rules/no-duplicate-attributes.md b/docs/rules/no-duplicate-attributes.md index 3cf820de6..247da158e 100644 --- a/docs/rules/no-duplicate-attributes.md +++ b/docs/rules/no-duplicate-attributes.md @@ -1,4 +1,4 @@ -# Disallow duplicate arguments (no-duplicate-attributes) +# disallow duplicate attributes. (no-duplicate-attributes) When duplicate arguments exist, only the last one is valid. It's possibly mistakes. diff --git a/docs/rules/no-invalid-template-root.md b/docs/rules/no-invalid-template-root.md index 6c9ca8773..3bbb03e66 100644 --- a/docs/rules/no-invalid-template-root.md +++ b/docs/rules/no-invalid-template-root.md @@ -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. diff --git a/docs/rules/no-invalid-v-bind.md b/docs/rules/no-invalid-v-bind.md index 96914cc3a..f99bbd503 100644 --- a/docs/rules/no-invalid-v-bind.md +++ b/docs/rules/no-invalid-v-bind.md @@ -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. diff --git a/docs/rules/no-invalid-v-cloak.md b/docs/rules/no-invalid-v-cloak.md index 8b717f780..4f4f9b267 100644 --- a/docs/rules/no-invalid-v-cloak.md +++ b/docs/rules/no-invalid-v-cloak.md @@ -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. diff --git a/docs/rules/no-invalid-v-else-if.md b/docs/rules/no-invalid-v-else-if.md index b8125a8a8..c8aec1193 100644 --- a/docs/rules/no-invalid-v-else-if.md +++ b/docs/rules/no-invalid-v-else-if.md @@ -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. diff --git a/docs/rules/no-invalid-v-else.md b/docs/rules/no-invalid-v-else.md index 912dd4893..c277e9bbf 100644 --- a/docs/rules/no-invalid-v-else.md +++ b/docs/rules/no-invalid-v-else.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-else` directives (no-invalid-v-else) +# disallow invalid `v-else` directives. (no-invalid-v-else) + +- :warning: This rule was **deprecated** and replaced by [valid-v-else](valid-v-else.md) rule. This rule checks whether every `v-else` directive is valid. diff --git a/docs/rules/no-invalid-v-for.md b/docs/rules/no-invalid-v-for.md index f1b78848e..26e3e4494 100644 --- a/docs/rules/no-invalid-v-for.md +++ b/docs/rules/no-invalid-v-for.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-for` directives (no-invalid-v-for) +# disallow invalid `v-for` directives. (no-invalid-v-for) + +- :warning: This rule was **deprecated** and replaced by [valid-v-for](valid-v-for.md) rule. This rule checks whether every `v-for` directive is valid. diff --git a/docs/rules/no-invalid-v-html.md b/docs/rules/no-invalid-v-html.md index be377165a..a9b8c05c1 100644 --- a/docs/rules/no-invalid-v-html.md +++ b/docs/rules/no-invalid-v-html.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-html` directives (no-invalid-v-html) +# disallow invalid `v-html` directives. (no-invalid-v-html) + +- :warning: This rule was **deprecated** and replaced by [valid-v-html](valid-v-html.md) rule. This rule checks whether every `v-html` directive is valid. diff --git a/docs/rules/no-invalid-v-if.md b/docs/rules/no-invalid-v-if.md index c76bdd71f..a55c32fee 100644 --- a/docs/rules/no-invalid-v-if.md +++ b/docs/rules/no-invalid-v-if.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-if` directives (no-invalid-v-if) +# disallow invalid `v-if` directives. (no-invalid-v-if) + +- :warning: This rule was **deprecated** and replaced by [valid-v-if](valid-v-if.md) rule. This rule checks whether every `v-if` directive is valid. diff --git a/docs/rules/no-invalid-v-model.md b/docs/rules/no-invalid-v-model.md index 752e312c3..610c731ee 100644 --- a/docs/rules/no-invalid-v-model.md +++ b/docs/rules/no-invalid-v-model.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-model` directives (no-invalid-v-model) +# disallow invalid `v-model` directives. (no-invalid-v-model) + +- :warning: This rule was **deprecated** and replaced by [valid-v-model](valid-v-model.md) rule. This rule checks whether every `v-model` directive is valid. diff --git a/docs/rules/no-invalid-v-on.md b/docs/rules/no-invalid-v-on.md index 9e3a0439c..d05fdf9b8 100644 --- a/docs/rules/no-invalid-v-on.md +++ b/docs/rules/no-invalid-v-on.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-on` directives (no-invalid-v-on) +# disallow invalid `v-on` directives. (no-invalid-v-on) + +- :warning: This rule was **deprecated** and replaced by [valid-v-on](valid-v-on.md) rule. This rule checks whether every `v-on` directive is valid. diff --git a/docs/rules/no-invalid-v-once.md b/docs/rules/no-invalid-v-once.md index bcb976355..8635a0df8 100644 --- a/docs/rules/no-invalid-v-once.md +++ b/docs/rules/no-invalid-v-once.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-once` directives (no-invalid-v-once) +# disallow invalid `v-once` directives. (no-invalid-v-once) + +- :warning: This rule was **deprecated** and replaced by [valid-v-once](valid-v-once.md) rule. This rule checks whether every `v-once` directive is valid. diff --git a/docs/rules/no-invalid-v-pre.md b/docs/rules/no-invalid-v-pre.md index 58fca0e90..74e7ea9b3 100644 --- a/docs/rules/no-invalid-v-pre.md +++ b/docs/rules/no-invalid-v-pre.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-pre` directives (no-invalid-v-pre) +# disallow invalid `v-pre` directives. (no-invalid-v-pre) + +- :warning: This rule was **deprecated** and replaced by [valid-v-pre](valid-v-pre.md) rule. This rule checks whether every `v-pre` directive is valid. diff --git a/docs/rules/no-invalid-v-show.md b/docs/rules/no-invalid-v-show.md index cb63bbefa..f82329c99 100644 --- a/docs/rules/no-invalid-v-show.md +++ b/docs/rules/no-invalid-v-show.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-show` directives (no-invalid-v-show) +# disallow invalid `v-show` directives. (no-invalid-v-show) + +- :warning: This rule was **deprecated** and replaced by [valid-v-show](valid-v-show.md) rule. This rule checks whether every `v-show` directive is valid. diff --git a/docs/rules/no-invalid-v-text.md b/docs/rules/no-invalid-v-text.md index 36c98e015..45446fb8b 100644 --- a/docs/rules/no-invalid-v-text.md +++ b/docs/rules/no-invalid-v-text.md @@ -1,4 +1,6 @@ -# Disallow invalid `v-text` directives (no-invalid-v-text) +# disallow invalid `v-text` directives. (no-invalid-v-text) + +- :warning: This rule was **deprecated** and replaced by [valid-v-text](valid-v-text.md) rule. This rule checks whether every `v-text` directive is valid. diff --git a/docs/rules/no-parsing-error.md b/docs/rules/no-parsing-error.md index ccdb44b3f..d5b44bef2 100644 --- a/docs/rules/no-parsing-error.md +++ b/docs/rules/no-parsing-error.md @@ -1,4 +1,6 @@ -# Disallow parsing errors in `