diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 000000000..cb76e21d5 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,23 @@ +line-length: false +single-title: false +no-inline-html: + allowed_elements: + - badge + - eslint-code-block + - sup + +# enforce consistency +code-block-style: + style: fenced +code-fence-style: + style: backtick +emphasis-style: + style: asterisk +heading-style: + style: atx +hr-style: + style: --- +strong-style: + style: asterisk +ul-style: + style: dash diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +node_modules diff --git a/docs/rules/README.md b/docs/rules/README.md index 3d4a9b2e3..6e879b2f6 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -12,7 +12,6 @@ sidebarDepth: 0 :bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions). ::: - ## Base Rules (Enabling Correct ESLint Parsing) Enforce all the rules in this category, as well as all higher priority rules, with: diff --git a/docs/rules/custom-event-name-casing.md b/docs/rules/custom-event-name-casing.md index ecc130fbe..a2c4d3644 100644 --- a/docs/rules/custom-event-name-casing.md +++ b/docs/rules/custom-event-name-casing.md @@ -163,6 +163,11 @@ export default { +## :couple: Related Rules + +- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) +- [vue/prop-name-casing](./prop-name-casing.md) + ## :books: Further Reading - [Guide - Custom Events] @@ -171,11 +176,6 @@ export default { [Guide - Custom Events]: https://vuejs.org/guide/components/events.html [Guide (for v2) - Custom Events]: https://v2.vuejs.org/v2/guide/components-custom-events.html -## :couple: Related Rules - -- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) -- [vue/prop-name-casing](./prop-name-casing.md) - ## :rocket: Version This rule was introduced in eslint-plugin-vue v7.0.0 diff --git a/docs/rules/html-closing-bracket-newline.md b/docs/rules/html-closing-bracket-newline.md index df3a8ac3c..ac6c505d8 100644 --- a/docs/rules/html-closing-bracket-newline.md +++ b/docs/rules/html-closing-bracket-newline.md @@ -66,11 +66,11 @@ This rule aims to warn the right angle brackets which are at the location other ``` - `singleline` ... the configuration for single-line elements. It's a single-line element if the element does not have attributes or the last attribute is on the same line as the opening bracket. - - `"never"` (default) ... disallow line breaks before the closing bracket. - - `"always"` ... require one line break before the closing bracket. + - `"never"` (default) ... disallow line breaks before the closing bracket. + - `"always"` ... require one line break before the closing bracket. - `multiline` ... the configuration for multiline elements. It's a multiline element if the last attribute is not on the same line of the opening bracket. - - `"never"` ... disallow line breaks before the closing bracket. - - `"always"` (default) ... require one line break before the closing bracket. + - `"never"` ... disallow line breaks before the closing bracket. + - `"always"` (default) ... require one line break before the closing bracket. Plus, you can use [`vue/html-indent`](./html-indent.md) rule to enforce indent-level of the closing brackets. diff --git a/docs/rules/html-closing-bracket-spacing.md b/docs/rules/html-closing-bracket-spacing.md index ee2a608d2..6bbbff216 100644 --- a/docs/rules/html-closing-bracket-spacing.md +++ b/docs/rules/html-closing-bracket-spacing.md @@ -55,14 +55,14 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o ``` - `startTag` (`"always" | "never"`) ... Setting for the `>` of start tags (e.g. `
`). Default is `"never"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. - `endTag` (`"always" | "never"`) ... Setting for the `>` of end tags (e.g. `
`). Default is `"never"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. - `selfClosingTag` (`"always" | "never"`) ... Setting for the `/>` of self-closing tags (e.g. `
`). Default is `"always"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. ### `"startTag": "always", "endTag": "always", "selfClosingTag": "always"` diff --git a/docs/rules/html-comment-content-newline.md b/docs/rules/html-comment-content-newline.md index eb543a753..807ecb5db 100644 --- a/docs/rules/html-comment-content-newline.md +++ b/docs/rules/html-comment-content-newline.md @@ -56,21 +56,21 @@ This rule will enforce consistency of line break after the ``. - - `"always"` ... require one line break after the ``. - - `multiline` ... the configuration for multiline comments. - - `"never"` ... disallow line breaks after the ``. - - `"always"` (default) ... require one line break after the ``. + - `singleline` ... the configuration for single-line comments. + - `"never"` (default) ... disallow line breaks after the ``. + - `"always"` ... require one line break after the ``. + - `multiline` ... the configuration for multiline comments. + - `"never"` ... disallow line breaks after the ``. + - `"always"` (default) ... require one line break after the ``. - You can also set the same value for both `singleline` and `multiline` by specifies a string. + You can also set the same value for both `singleline` and `multiline` by specifies a string. - This rule can also take a 2nd option, an object with the following key: `"exceptions"`. - - The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. + - The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. - ```json - "vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }] - ``` + ```json + "vue/html-comment-content-newline": ["error", { ... }, { "exceptions": ["*"] }] + ``` ### `"always"` @@ -162,7 +162,6 @@ This rule will enforce consistency of line break after the `` makes it easier to read text in ``` - The first is a string which be either `"always"` or `"never"`. The default is `"always"`. - - `"always"` (default) ... there must be at least one whitespace at after the ``. - - `"never"` ... there should be no whitespace at after the ``. - + - `"always"` (default) ... there must be at least one whitespace at after the ``. + - `"never"` ... there should be no whitespace at after the ``. - This rule can also take a 2nd option, an object with the following key: `"exceptions"`. - - The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. - Please note that exceptions are ignored if the first argument is `"never"`. + - The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. + Please note that exceptions are ignored if the first argument is `"never"`. - ```json - "vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }] - ``` + ```json + "vue/html-comment-content-spacing": ["error", "always", { "exceptions": ["*"] }] + ``` ### `"always"` diff --git a/docs/rules/max-len.md b/docs/rules/max-len.md index 19663f167..deca2e721 100644 --- a/docs/rules/max-len.md +++ b/docs/rules/max-len.md @@ -112,7 +112,6 @@ var foo = ['line', 'length', 'is', '50', '......'] - ### `"template": 120` diff --git a/docs/rules/new-line-between-multi-line-property.md b/docs/rules/new-line-between-multi-line-property.md index 4af4e59c3..c8cee19ee 100644 --- a/docs/rules/new-line-between-multi-line-property.md +++ b/docs/rules/new-line-between-multi-line-property.md @@ -75,7 +75,7 @@ export default { -## :wrench: Option +## :wrench: Options ```json { diff --git a/docs/rules/next-tick-style.md b/docs/rules/next-tick-style.md index 683d5d921..077699e82 100644 --- a/docs/rules/next-tick-style.md +++ b/docs/rules/next-tick-style.md @@ -46,6 +46,7 @@ export default { ## :wrench: Options + Default is set to `promise`. ```json diff --git a/docs/rules/no-bare-strings-in-template.md b/docs/rules/no-bare-strings-in-template.md index f462ca21a..adf12bffd 100644 --- a/docs/rules/no-bare-strings-in-template.md +++ b/docs/rules/no-bare-strings-in-template.md @@ -16,7 +16,6 @@ In order to be able to internationalize your application, you will need to avoid This rule was inspired by [no-bare-strings rule in ember-template-lint](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-bare-strings.md). - ```vue diff --git a/docs/rules/no-boolean-default.md b/docs/rules/no-boolean-default.md index f9571df84..d0782c60e 100644 --- a/docs/rules/no-boolean-default.md +++ b/docs/rules/no-boolean-default.md @@ -13,8 +13,8 @@ since: v7.0.0 The rule prevents Boolean props from having a default value. - ## :book: Rule Details + The rule is to enforce the HTML standard of always defaulting boolean attributes to false. @@ -38,6 +38,7 @@ export default { ## :wrench: Options + - `'no-default'` (default) allows a prop definition object, but enforces that the `default` property not be defined. - `'default-false'` enforces that the default can be set but must be set to `false`. diff --git a/docs/rules/no-custom-modifiers-on-v-model.md b/docs/rules/no-custom-modifiers-on-v-model.md index 092ee325c..673565cad 100644 --- a/docs/rules/no-custom-modifiers-on-v-model.md +++ b/docs/rules/no-custom-modifiers-on-v-model.md @@ -11,7 +11,7 @@ since: v7.0.0 - :gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`. -This rule checks whether `v-model `used on the component do not have custom modifiers. +This rule checks whether `v-model` used on the component do not have custom modifiers. ## :book: Rule Details diff --git a/docs/rules/no-empty-component-block.md b/docs/rules/no-empty-component-block.md index 5a15b6d7d..7e6104aea 100644 --- a/docs/rules/no-empty-component-block.md +++ b/docs/rules/no-empty-component-block.md @@ -14,7 +14,7 @@ since: v7.0.0 This rule disallows the `