From 166853d9c59db493f0b1bb68a67ad868662a4205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Sat, 5 Jan 2019 04:34:18 +0800 Subject: [PATCH] Upgrade: eslint-plugin-eslint-plugin@2.0.1 (#11220) * Upgrade: eslint-plugin-eslint-plugin@2.0.1 * Update no-invalid-meta.js --- .eslintrc.js | 1 + lib/rules/block-spacing.js | 4 ++-- lib/rules/capitalized-comments.js | 4 ++-- lib/rules/func-name-matching.js | 8 ++++---- lib/rules/max-classes-per-file.js | 2 +- lib/rules/prefer-object-spread.js | 4 ++-- package.json | 2 +- tools/internal-rules/consistent-docs-description.js | 2 +- tools/internal-rules/consistent-docs-url.js | 2 +- tools/internal-rules/consistent-meta-messages.js | 3 ++- tools/internal-rules/no-invalid-meta.js | 2 +- 11 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 22332c38998..780368769f6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,6 +21,7 @@ module.exports = { "eslint-plugin/prefer-output-null": "error", "eslint-plugin/prefer-placeholders": "error", "eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"], + "eslint-plugin/require-meta-type": "error", "eslint-plugin/test-case-property-ordering": "error", "eslint-plugin/test-case-shorthand-strings": "error", "rulesdir/multiline-comment-style": "error" diff --git a/lib/rules/block-spacing.js b/lib/rules/block-spacing.js index 6496f8596d3..864bfc0c5c0 100644 --- a/lib/rules/block-spacing.js +++ b/lib/rules/block-spacing.js @@ -29,8 +29,8 @@ module.exports = { ], messages: { - missing: "Requires a space {{location}} '{{token}}'", - extra: "Unexpected space(s) {{location}} '{{token}}'" + missing: "Requires a space {{location}} '{{token}}'.", + extra: "Unexpected space(s) {{location}} '{{token}}'." } }, diff --git a/lib/rules/capitalized-comments.js b/lib/rules/capitalized-comments.js index 86427ba7acc..7947833b270 100644 --- a/lib/rules/capitalized-comments.js +++ b/lib/rules/capitalized-comments.js @@ -137,8 +137,8 @@ module.exports = { ], messages: { - unexpectedLowercaseComment: "Comments should not begin with a lowercase character", - unexpectedUppercaseComment: "Comments should not begin with an uppercase character" + unexpectedLowercaseComment: "Comments should not begin with a lowercase character.", + unexpectedUppercaseComment: "Comments should not begin with an uppercase character." } }, diff --git a/lib/rules/func-name-matching.js b/lib/rules/func-name-matching.js index f14c998dc7f..5560c692083 100644 --- a/lib/rules/func-name-matching.js +++ b/lib/rules/func-name-matching.js @@ -92,10 +92,10 @@ module.exports = { }, messages: { - matchProperty: "Function name `{{funcName}}` should match property name `{{name}}`", - matchVariable: "Function name `{{funcName}}` should match variable name `{{name}}`", - notMatchProperty: "Function name `{{funcName}}` should not match property name `{{name}}`", - notMatchVariable: "Function name `{{funcName}}` should not match variable name `{{name}}`" + matchProperty: "Function name `{{funcName}}` should match property name `{{name}}`.", + matchVariable: "Function name `{{funcName}}` should match variable name `{{name}}`.", + notMatchProperty: "Function name `{{funcName}}` should not match property name `{{name}}`.", + notMatchVariable: "Function name `{{funcName}}` should not match variable name `{{name}}`." } }, diff --git a/lib/rules/max-classes-per-file.js b/lib/rules/max-classes-per-file.js index 3193a731c94..ae7be904f90 100644 --- a/lib/rules/max-classes-per-file.js +++ b/lib/rules/max-classes-per-file.js @@ -32,7 +32,7 @@ module.exports = { ], messages: { - maximumExceeded: "Number of classes per file must not exceed {{ max }}" + maximumExceeded: "Number of classes per file must not exceed {{ max }}." } }, create(context) { diff --git a/lib/rules/prefer-object-spread.js b/lib/rules/prefer-object-spread.js index a8dac696be0..4d724339db0 100644 --- a/lib/rules/prefer-object-spread.js +++ b/lib/rules/prefer-object-spread.js @@ -226,8 +226,8 @@ module.exports = { fixable: "code", messages: { - useSpreadMessage: "Use an object spread instead of `Object.assign` eg: `{ ...foo }`", - useLiteralMessage: "Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`" + useSpreadMessage: "Use an object spread instead of `Object.assign` eg: `{ ...foo }`.", + useLiteralMessage: "Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`." } }, diff --git a/package.json b/package.json index bf356703ec8..9860ef9c63d 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "coveralls": "^3.0.1", "dateformat": "^3.0.3", "ejs": "^2.6.1", - "eslint-plugin-eslint-plugin": "^1.4.1", + "eslint-plugin-eslint-plugin": "^2.0.1", "eslint-plugin-node": "^8.0.0", "eslint-plugin-rulesdir": "^0.1.0", "eslint-release": "^1.2.0", diff --git a/tools/internal-rules/consistent-docs-description.js b/tools/internal-rules/consistent-docs-description.js index b56c641a31e..b3ee52241d5 100644 --- a/tools/internal-rules/consistent-docs-description.js +++ b/tools/internal-rules/consistent-docs-description.js @@ -115,7 +115,7 @@ module.exports = { category: "Internal", recommended: false }, - + type: "suggestion", schema: [] }, diff --git a/tools/internal-rules/consistent-docs-url.js b/tools/internal-rules/consistent-docs-url.js index 8e6652fc4bf..4d13441166c 100644 --- a/tools/internal-rules/consistent-docs-url.js +++ b/tools/internal-rules/consistent-docs-url.js @@ -94,7 +94,7 @@ module.exports = { category: "Internal", recommended: false }, - + type: "suggestion", schema: [] }, diff --git a/tools/internal-rules/consistent-meta-messages.js b/tools/internal-rules/consistent-meta-messages.js index 43711c6ec1b..24facb189dd 100644 --- a/tools/internal-rules/consistent-meta-messages.js +++ b/tools/internal-rules/consistent-meta-messages.js @@ -65,8 +65,9 @@ module.exports = { recommended: false }, schema: [], + type: "suggestion", messages: { - expectedMessages: "Expected `meta.messages` property" + expectedMessages: "Expected `meta.messages` property." } }, diff --git a/tools/internal-rules/no-invalid-meta.js b/tools/internal-rules/no-invalid-meta.js index c0a9bc9076a..973b2a4808b 100644 --- a/tools/internal-rules/no-invalid-meta.js +++ b/tools/internal-rules/no-invalid-meta.js @@ -161,7 +161,7 @@ module.exports = { category: "Internal", recommended: false }, - + type: "problem", schema: [] },