From af561b3dc5fbba78a2d9e5c2d79a48765df7f010 Mon Sep 17 00:00:00 2001 From: ota Date: Wed, 5 Dec 2018 12:51:45 +0900 Subject: [PATCH 1/2] Update attribute-hyphenation.md --- docs/rules/attribute-hyphenation.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/rules/attribute-hyphenation.md b/docs/rules/attribute-hyphenation.md index 53feb9c8a..803baab0a 100644 --- a/docs/rules/attribute-hyphenation.md +++ b/docs/rules/attribute-hyphenation.md @@ -15,7 +15,8 @@ description: enforce attribute naming style on custom components in template This rule enforces using hyphenated attribute names on custom components in Vue templates. -``` + +```vue ``` + ## :wrench: Options @@ -46,7 +48,8 @@ Default casing is set to `always` with `['data-', 'aria-', 'slot-scope']` set to It errors on upper case letters. -``` + +```vue ``` + ### `"never"` It errors on hyphens except `data-`, `aria-` and `slot-scope`. -``` + +```vue ``` + ### `"never", { "ignore": ["custom-prop"] }` Don't use hyphenated name but allow custom attributes -``` + +```vue ``` + ## :mag: Implementation From f1fd532c2b68c74953d06b28340f6bca3633e668 Mon Sep 17 00:00:00 2001 From: ota Date: Wed, 5 Dec 2018 14:21:02 +0900 Subject: [PATCH 2/2] Add `adjustCodeBlocks()` process to `update-docs.js` --- docs/rules/attributes-order.md | 12 +++++++--- docs/rules/comment-directive.md | 2 ++ .../component-name-in-template-casing.md | 12 +++++++--- docs/rules/html-closing-bracket-newline.md | 8 +++++-- docs/rules/html-closing-bracket-spacing.md | 8 +++++-- docs/rules/html-end-tags.md | 4 +++- docs/rules/html-indent.md | 24 ++++++++++++++----- docs/rules/html-quotes.md | 8 +++++-- docs/rules/html-self-closing.md | 8 +++++-- docs/rules/max-attributes-per-line.md | 16 +++++++++---- .../multiline-html-element-content-newline.md | 4 ++++ docs/rules/mustache-interpolation-spacing.md | 8 +++++-- docs/rules/name-property-casing.md | 16 +++++++++---- docs/rules/no-async-in-computed-properties.md | 4 +++- docs/rules/no-confusing-v-for-v-if.md | 4 +++- docs/rules/no-dupe-keys.md | 8 +++++-- docs/rules/no-duplicate-attributes.md | 8 +++++-- docs/rules/no-multi-spaces.md | 6 ++++- docs/rules/no-parsing-error.md | 4 +++- docs/rules/no-reserved-keys.md | 8 +++++-- docs/rules/no-shared-component-data.md | 8 +++++-- .../no-side-effects-in-computed-properties.md | 8 +++++-- ...-spaces-around-equal-signs-in-attribute.md | 4 +++- docs/rules/no-template-key.md | 4 +++- docs/rules/no-template-shadow.md | 2 ++ docs/rules/no-textarea-mustache.md | 4 +++- docs/rules/no-unused-components.md | 8 +++++++ docs/rules/no-unused-vars.md | 4 +++- docs/rules/no-use-v-if-with-v-for.md | 8 +++++-- docs/rules/no-v-html.md | 4 +++- docs/rules/order-in-components.md | 8 +++++-- docs/rules/prop-name-casing.md | 8 +++++-- docs/rules/require-component-is.md | 2 ++ docs/rules/require-default-prop.md | 4 +++- docs/rules/require-prop-type-constructor.md | 2 ++ docs/rules/require-prop-types.md | 2 ++ docs/rules/require-render-return.md | 4 ++++ docs/rules/require-v-for-key.md | 2 ++ docs/rules/require-valid-default-prop.md | 2 ++ docs/rules/return-in-computed-property.md | 4 ++++ docs/rules/script-indent.md | 4 ++++ ...singleline-html-element-content-newline.md | 6 +++++ docs/rules/this-in-template.md | 4 ++++ docs/rules/use-v-on-exact.md | 2 ++ docs/rules/v-bind-style.md | 4 ++++ docs/rules/v-on-style.md | 4 ++++ docs/rules/valid-template-root.md | 10 ++++++++ docs/rules/valid-v-bind.md | 2 ++ docs/rules/valid-v-cloak.md | 2 ++ docs/rules/valid-v-else-if.md | 2 ++ docs/rules/valid-v-else.md | 2 ++ docs/rules/valid-v-for.md | 2 ++ docs/rules/valid-v-html.md | 2 ++ docs/rules/valid-v-if.md | 2 ++ docs/rules/valid-v-model.md | 2 ++ docs/rules/valid-v-on.md | 4 ++++ docs/rules/valid-v-once.md | 2 ++ docs/rules/valid-v-pre.md | 2 ++ docs/rules/valid-v-show.md | 2 ++ docs/rules/valid-v-text.md | 2 ++ tools/update-docs.js | 14 +++++++++++ 61 files changed, 283 insertions(+), 57 deletions(-) diff --git a/docs/rules/attributes-order.md b/docs/rules/attributes-order.md index d703d7f58..cbd38eee0 100644 --- a/docs/rules/attributes-order.md +++ b/docs/rules/attributes-order.md @@ -40,7 +40,8 @@ This rule aims to enforce ordering of component attributes. The default order is ### the default order -``` + +```vue ``` + ## :wrench: Options @@ -113,7 +115,8 @@ This rule aims to enforce ordering of component attributes. The default order is #### `['LIST_RENDERING', 'CONDITIONALS', 'RENDER_MODIFIERS', 'GLOBAL', 'UNIQUE', 'TWO_WAY_BINDING', 'DEFINITION', 'OTHER_DIRECTIVES', 'OTHER_ATTR', 'EVENTS', 'CONTENT']` -``` + +```vue ``` + #### `[['LIST_RENDERING', 'CONDITIONALS', 'RENDER_MODIFIERS'], ['DEFINITION', 'GLOBAL', 'UNIQUE'], 'TWO_WAY_BINDING', 'OTHER_DIRECTIVES', 'OTHER_ATTR', 'EVENTS', 'CONTENT']` -``` + +```vue ``` + ## :books: Further reading diff --git a/docs/rules/comment-directive.md b/docs/rules/comment-directive.md index 7be264cec..9db00825f 100644 --- a/docs/rules/comment-directive.md +++ b/docs/rules/comment-directive.md @@ -30,6 +30,7 @@ ESLint doesn't provide any API to enhance `eslint-disable` functionality and ESL This rule sends all `eslint-disable`-like comments as errors to the post-process of the `.vue` file processor, then the post-process removes all `vue/comment-directive` errors and the reported errors in disabled areas. + ```vue ``` + ## :books: Further reading diff --git a/docs/rules/component-name-in-template-casing.md b/docs/rules/component-name-in-template-casing.md index c7ea7ea84..c2bd52900 100644 --- a/docs/rules/component-name-in-template-casing.md +++ b/docs/rules/component-name-in-template-casing.md @@ -33,7 +33,8 @@ This rule aims to warn the tag names other than the configured casing in Vue.js ### `"PascalCase"` -``` + +```vue ``` + ### `"kebab-case"` -``` + +```vue ``` + ### `"PascalCase", { ignores: ["custom-element"] }` -``` + +```vue ``` + ## :books: Further reading diff --git a/docs/rules/html-closing-bracket-newline.md b/docs/rules/html-closing-bracket-newline.md index 056905fea..d91987052 100644 --- a/docs/rules/html-closing-bracket-newline.md +++ b/docs/rules/html-closing-bracket-newline.md @@ -31,7 +31,8 @@ This rule enforces a line break (or no line break) before tag's closing brackets This rule aims to warn the right angle brackets which are at the location other than the configured location. -``` + +```vue ``` + ## :wrench: Options @@ -73,7 +75,8 @@ Plus, you can use [`vue/html-indent`](./html-indent.md) rule to enforce indent-l ### `"multiline": "never"` -``` + +```vue ``` + ## :mag: Implementation diff --git a/docs/rules/html-closing-bracket-spacing.md b/docs/rules/html-closing-bracket-spacing.md index 20292810c..e77b9d7ec 100644 --- a/docs/rules/html-closing-bracket-spacing.md +++ b/docs/rules/html-closing-bracket-spacing.md @@ -15,7 +15,8 @@ description: require or disallow a space before tag's closing brackets This rule aims to enforce consistent spacing style before closing brackets `>` of tags. -``` + +```vue ``` + ## :wrench: Options @@ -63,7 +65,8 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o ### `"startTag": "always", "endTag": "always", "selfClosingTag": "always"` -``` + +```vue ``` + ## :couple: Related rules diff --git a/docs/rules/html-end-tags.md b/docs/rules/html-end-tags.md index fe8b704bb..9cf5c1105 100644 --- a/docs/rules/html-end-tags.md +++ b/docs/rules/html-end-tags.md @@ -15,7 +15,8 @@ description: enforce end tag style This rule aims to disallow lacking end tags. -``` + +```vue ``` + ## :wrench: Options diff --git a/docs/rules/html-indent.md b/docs/rules/html-indent.md index fb5aab263..4c366451c 100644 --- a/docs/rules/html-indent.md +++ b/docs/rules/html-indent.md @@ -18,7 +18,8 @@ This rule enforces a consistent indentation style in `