From 9a38fb07fd7ebb167034c0f462aa429ce8ce8e65 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 2 Aug 2017 03:19:34 +0200 Subject: [PATCH 1/2] Add support for deprecated state in update-rules --- tools/update-rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/update-rules.js b/tools/update-rules.js index 2cf537c78..937948692 100644 --- a/tools/update-rules.js +++ b/tools/update-rules.js @@ -24,6 +24,7 @@ const readmeContent = fs.readFileSync(readmeFile, 'utf8') const STAR = ':white_check_mark:' const PEN = ':wrench:' +const WARN = ':warning:' const rules = fs.readdirSync(root) .filter(file => path.extname(file) === '.js') @@ -53,9 +54,9 @@ ${ .map(entry => { const name = entry[0] const meta = entry[1].meta - const mark = `${meta.docs.recommended ? STAR : ''}${meta.fixable ? PEN : ''}` + const mark = `${meta.docs.recommended ? STAR : ''}${meta.fixable ? PEN : ''}${meta.deprecated ? WARN : ''}` const link = `[${name}](./docs/rules/${name}.md)` - const description = meta.docs.description || '(no description)' + const description = (meta.docs.description || '(no description)') + (meta.deprecated ? ' - (deprecated)' : '') return `| ${mark} | ${link} | ${description} |` }) .join('\n') From 10558579606fa32ac54d7e4259412162668929b5 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 2 Aug 2017 11:30:56 +0200 Subject: [PATCH 2/2] Update README --- README.md | 7 ++++++- lib/recommended-rules.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c7ec51426..d0e9f0bb5 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,8 @@ No rules are enabled by `plugin:vue/base` config. The `plugin:vue/recommended` c The `--fix` option on the command line automatically fixes problems reported by rules which have a wrench :wrench: below. +Deprecated rules witch should be used with caution and only enabled when you know what you are doing have a warning :warning: icon. + ### Best Practices @@ -65,7 +67,7 @@ The `--fix` option on the command line automatically fixes problems reported by | | Rule ID | Description | |:---|:--------|:------------| | :wrench: | [html-end-tags](./docs/rules/html-end-tags.md) | enforce end tag style. | -| :wrench: | [html-no-self-closing](./docs/rules/html-no-self-closing.md) | disallow self-closing elements. | +| :wrench::warning: | [html-no-self-closing](./docs/rules/html-no-self-closing.md) | disallow self-closing elements. - (deprecated) | | | [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. | @@ -73,6 +75,7 @@ The `--fix` option on the command line automatically fixes problems reported by | :white_check_mark: | [no-textarea-mustache](./docs/rules/no-textarea-mustache.md) | disallow mustaches in `