From e488c5f1d5a01b5cff346a461ce889c245a2b3db Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sun, 10 May 2020 09:09:01 +0900 Subject: [PATCH] update --- docs/rules/html-comment-content-newline.md | 2 +- docs/rules/html-comment-content-spacing.md | 4 ++-- lib/rules/html-comment-content-newline.js | 2 +- lib/rules/html-comment-content-spacing.js | 2 +- lib/rules/html-comment-indent.js | 2 +- tests/lib/rules/html-comment-content-newline.js | 2 +- tests/lib/rules/html-comment-content-spacing.js | 2 +- tests/lib/rules/html-comment-indent.js | 2 +- tests/lib/utils/html-comments.js | 1 + 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/rules/html-comment-content-newline.md b/docs/rules/html-comment-content-newline.md index 523e32336..4a94ff7e3 100644 --- a/docs/rules/html-comment-content-newline.md +++ b/docs/rules/html-comment-content-newline.md @@ -66,7 +66,7 @@ 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"` ... there must be at least one 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 ``. @@ -54,7 +54,7 @@ Whitespace after the `` makes it easier to read text in - 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": ["*"] }] ``` diff --git a/lib/rules/html-comment-content-newline.js b/lib/rules/html-comment-content-newline.js index 68c9b8286..a4ce4f06f 100644 --- a/lib/rules/html-comment-content-newline.js +++ b/lib/rules/html-comment-content-newline.js @@ -37,7 +37,7 @@ module.exports = { docs: { description: 'enforce unified line brake in HTML comments', - category: undefined, + categories: undefined, url: 'https://eslint.vuejs.org/rules/html-comment-content-newline.html' }, fixable: 'whitespace', diff --git a/lib/rules/html-comment-content-spacing.js b/lib/rules/html-comment-content-spacing.js index 956b8fcc8..f55c9fecb 100644 --- a/lib/rules/html-comment-content-spacing.js +++ b/lib/rules/html-comment-content-spacing.js @@ -20,7 +20,7 @@ module.exports = { docs: { description: 'enforce unified spacing in HTML comments', - category: undefined, + categories: undefined, url: 'https://eslint.vuejs.org/rules/html-comment-content-spacing.html' }, fixable: 'whitespace', diff --git a/lib/rules/html-comment-indent.js b/lib/rules/html-comment-indent.js index 7a6cae38f..f41a6dc95 100644 --- a/lib/rules/html-comment-indent.js +++ b/lib/rules/html-comment-indent.js @@ -70,7 +70,7 @@ module.exports = { docs: { description: 'enforce consistent indentation in HTML comments', - category: undefined, + categories: undefined, url: 'https://eslint.vuejs.org/rules/html-comment-indent.html' }, fixable: 'whitespace', diff --git a/tests/lib/rules/html-comment-content-newline.js b/tests/lib/rules/html-comment-content-newline.js index 568b1f65b..8fa008e05 100644 --- a/tests/lib/rules/html-comment-content-newline.js +++ b/tests/lib/rules/html-comment-content-newline.js @@ -9,7 +9,7 @@ const rule = require('../../../lib/rules/html-comment-content-newline') const RuleTester = require('eslint').RuleTester const tester = new RuleTester({ - parser: 'vue-eslint-parser', + parser: require.resolve('vue-eslint-parser'), parserOptions: { ecmaVersion: 2015 } diff --git a/tests/lib/rules/html-comment-content-spacing.js b/tests/lib/rules/html-comment-content-spacing.js index 03bf0fbbd..699d4d1ea 100644 --- a/tests/lib/rules/html-comment-content-spacing.js +++ b/tests/lib/rules/html-comment-content-spacing.js @@ -9,7 +9,7 @@ const rule = require('../../../lib/rules/html-comment-content-spacing') const RuleTester = require('eslint').RuleTester const tester = new RuleTester({ - parser: 'vue-eslint-parser', + parser: require.resolve('vue-eslint-parser'), parserOptions: { ecmaVersion: 2015 } diff --git a/tests/lib/rules/html-comment-indent.js b/tests/lib/rules/html-comment-indent.js index e6224ef09..0415b13f9 100644 --- a/tests/lib/rules/html-comment-indent.js +++ b/tests/lib/rules/html-comment-indent.js @@ -9,7 +9,7 @@ const rule = require('../../../lib/rules/html-comment-indent') const RuleTester = require('eslint').RuleTester const tester = new RuleTester({ - parser: 'vue-eslint-parser', + parser: require.resolve('vue-eslint-parser'), parserOptions: { ecmaVersion: 2015 } diff --git a/tests/lib/utils/html-comments.js b/tests/lib/utils/html-comments.js index 93b9eb794..dcda24754 100644 --- a/tests/lib/utils/html-comments.js +++ b/tests/lib/utils/html-comments.js @@ -36,6 +36,7 @@ function tokenize (code, option) { result.push(commentTokens) }) ) + linter.defineParser('vue-eslint-parser', require('vue-eslint-parser')) linter.verify( code, {