Skip to content

Commit

Permalink
feat: capitalize default pattern of require-meta-docs-description rule
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Nov 17, 2024
1 parent 7b93c7a commit ecaf037
Show file tree
Hide file tree
Showing 31 changed files with 46 additions and 45 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = [
'@eslint-community/eslint-comments/no-unused-disable': 'error',
'@eslint-community/eslint-comments/require-description': 'error',

'unicorn/expiring-todo-comments': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-for-each': 'off',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/consistent-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'enforce consistent use of `output` assertions in rule tests',
'Enforce consistent use of `output` assertions in rule tests',
category: 'Tests',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/consistent-output.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/fixer-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'require fixer functions to return a fix',
description: 'Require fixer functions to return a fix',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/fixer-return.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/meta-property-ordering.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'enforce the order of meta properties',
description: 'Enforce the order of meta properties',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/meta-property-ordering.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-deprecated-context-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'disallow usage of deprecated methods on rule context objects',
'Disallow usage of deprecated methods on rule context objects',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-deprecated-context-methods.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-deprecated-report-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'disallow the version of `context.report()` with multiple arguments',
'Disallow the version of `context.report()` with multiple arguments',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-deprecated-report-api.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-identical-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow identical tests',
description: 'Disallow identical tests',
category: 'Tests',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-identical-tests.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-missing-message-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
type: 'problem',
docs: {
description:
'disallow `messageId`s that are missing from `meta.messages`',
'Disallow `messageId`s that are missing from `meta.messages`',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-missing-message-ids.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-missing-placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow missing placeholders in rule report messages',
description: 'Disallow missing placeholders in rule report messages',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-missing-placeholders.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-only-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow the test case property `only`',
description: 'Disallow the test case property `only`',
category: 'Tests',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-only-tests.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-property-in-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'disallow using `in` to narrow node types instead of looking at properties',
'Disallow using `in` to narrow node types instead of looking at properties',
category: 'Rules',
recommended: false,
requiresTypeChecking: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unused-message-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow unused `messageId`s in `meta.messages`',
description: 'Disallow unused `messageId`s in `meta.messages`',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-unused-message-ids.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unused-placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'disallow unused placeholders in rule report messages',
description: 'Disallow unused placeholders in rule report messages',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-unused-placeholders.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-useless-token-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'disallow unnecessary calls to `sourceCode.getFirstToken()` and `sourceCode.getLastToken()`',
'Disallow unnecessary calls to `sourceCode.getFirstToken()` and `sourceCode.getLastToken()`',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/no-useless-token-range.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-message-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
type: 'problem',
docs: {
description:
'require using `messageId` instead of `message` or `desc` to report rule violations',
'Require using `messageId` instead of `message` or `desc` to report rule violations',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/prefer-message-ids.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-object-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'disallow function-style rules',
description: 'Disallow function-style rules',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/prefer-object-rule.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-output-null.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'disallow invalid RuleTester test cases where the `output` matches the `code`',
'Disallow invalid RuleTester test cases where the `output` matches the `code`',
category: 'Tests',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/prefer-output-null.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'require using placeholders for dynamic report messages',
description: 'Require using placeholders for dynamic report messages',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/prefer-placeholders.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/prefer-replace-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'require using `replaceText()` instead of `replaceTextRange()`',
'Require using `replaceText()` instead of `replaceTextRange()`',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/prefer-replace-text.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/report-message-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'enforce a consistent format for rule report messages',
description: 'Enforce a consistent format for rule report messages',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/report-message-format.md',
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/require-meta-docs-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const utils = require('../utils');
// Rule Definition
// ------------------------------------------------------------------------------

const DEFAULT_PATTERN = new RegExp('^(enforce|require|disallow)');
const DEFAULT_PATTERN = new RegExp('^(Enforce|Require|Disallow)');

/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
type: 'suggestion',
docs: {
description:
'require rules to implement a `meta.docs.description` property with the correct format',
'Require rules to implement a `meta.docs.description` property with the correct format',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-docs-description.md',
Expand All @@ -29,7 +29,7 @@ module.exports = {
type: 'string',
description:
"A regular expression that the description must match. Use `'.+'` to allow anything.",
default: '^(enforce|require|disallow)',
default: '^(Enforce|Require|Disallow)',
},
},
additionalProperties: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-docs-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'require rules to implement a `meta.docs.recommended` property',
'Require rules to implement a `meta.docs.recommended` property',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-docs-recommended.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-docs-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'require rules to implement a `meta.docs.url` property',
description: 'Require rules to implement a `meta.docs.url` property',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-docs-url.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-fixable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'require rules to implement a `meta.fixable` property',
description: 'Require rules to implement a `meta.fixable` property',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-fixable.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-has-suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
type: 'problem',
docs: {
description:
'require suggestable rules to implement a `meta.hasSuggestions` property',
'Require suggestable rules to implement a `meta.hasSuggestions` property',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-has-suggestions.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-schema-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'require rules `meta.schema` properties to include descriptions',
'Require rules `meta.schema` properties to include descriptions',
category: 'Rules',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-schema-description.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'require rules to implement a `meta.schema` property',
description: 'Require rules to implement a `meta.schema` property',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-schema.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-meta-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
meta: {
type: 'problem',
docs: {
description: 'require rules to implement a `meta.type` property',
description: 'Require rules to implement a `meta.type` property',
category: 'Rules',
recommended: true,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-type.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/test-case-property-ordering.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'require the properties of a test case to be placed in a consistent order',
'Require the properties of a test case to be placed in a consistent order',
category: 'Tests',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/test-case-property-ordering.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/test-case-shorthand-strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
type: 'suggestion',
docs: {
description:
'enforce consistent usage of shorthand strings for test cases with no options',
'Enforce consistent usage of shorthand strings for test cases with no options',
category: 'Tests',
recommended: false,
url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/test-case-shorthand-strings.md',
Expand Down
Loading

0 comments on commit ecaf037

Please sign in to comment.