Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable eslint-plugin/require-meta-docs-description rule #5969

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc.js
Expand Up @@ -257,6 +257,11 @@ module.exports = {
'./packages/eslint-plugin/src/rules/**/*.ts',
],
rules: {
'eslint-plugin/require-meta-docs-description': [
'error',
{ pattern: '^(Enforce|Require|Disallow) .+[^. ]$' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, TIL about this one. Eventually maybe we'll even narow this list down to two 😄

],

// specifically for rules - default exports makes the tooling easier
'import/no-default-export': 'off',
},
Expand Down
Expand Up @@ -35,7 +35,7 @@ export default createRule({
type: 'problem',
docs: {
description:
"Enforces rules don't use TS API properties with known bad type definitions",
"Enforce that rules don't use TS API properties with known bad type definitions",
recommended: 'error',
requiresTypeChecking: true,
},
Expand Down
Expand Up @@ -20,7 +20,7 @@ export default createRule({
type: 'problem',
docs: {
description:
"Enforces that packages rules don't do `import ts from 'typescript';`",
"Enforce that packages rules don't do `import ts from 'typescript';`",
recommended: 'error',
},
fixable: 'code',
Expand Down
Expand Up @@ -15,7 +15,7 @@ export default createRule({
meta: {
type: 'problem',
docs: {
description: `Enforces that eslint-plugin rules don't require anything from ${TSESTREE_NAME} or ${TYPES_NAME}`,
description: `Enforce that eslint-plugin rules don't require anything from ${TSESTREE_NAME} or ${TYPES_NAME}`,
recommended: 'error',
},
fixable: 'code',
Expand Down
Expand Up @@ -107,7 +107,7 @@ export default createRule<Options, MessageIds>({
meta: {
type: 'problem',
docs: {
description: `Enforces that eslint-plugin test snippets are correctly formatted`,
description: `Enforce that eslint-plugin test snippets are correctly formatted`,
recommended: 'error',
requiresTypeChecking: true,
},
Expand Down
Expand Up @@ -15,7 +15,7 @@ export default createRule({
docs: {
recommended: 'error',
description:
'Ensures consistent usage of `AST_NODE_TYPES`, `AST_TOKEN_TYPES` and `DefinitionType` enums.',
'Enforce consistent usage of `AST_NODE_TYPES`, `AST_TOKEN_TYPES` and `DefinitionType` enums',
},
messages: {
preferEnum: 'Prefer {{ enumName }}.{{ literal }} over raw literal',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-tslint/src/rules/config.ts
Expand Up @@ -64,7 +64,7 @@ export default createRule<Options, MessageIds>({
meta: {
docs: {
description:
'Wraps a TSLint configuration and lints the whole source using TSLint',
'Wraps a TSLint configuration and lints the whole source using TSLint', // eslint-disable-line eslint-plugin/require-meta-docs-description
recommended: false,
},
fixable: 'code',
Expand Down