diff --git a/packages/eslint-plugin/docs/rules/ban-ts-comment.md b/packages/eslint-plugin/docs/rules/ban-ts-comment.md index 60e6508d3bd3..2509793ebd37 100644 --- a/packages/eslint-plugin/docs/rules/ban-ts-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-ts-comment.md @@ -29,7 +29,7 @@ interface Options { } const defaultOptions: Options = { - 'ts-expect-error': true, + 'ts-expect-error': 'allow-with-description', 'ts-ignore': true, 'ts-nocheck': true, 'ts-check': false, diff --git a/packages/eslint-plugin/src/rules/ban-ts-comment.ts b/packages/eslint-plugin/src/rules/ban-ts-comment.ts index 3eccf04ced20..f8c688415987 100644 --- a/packages/eslint-plugin/src/rules/ban-ts-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-ts-comment.ts @@ -11,16 +11,6 @@ interface Options { export const defaultMinimumDescriptionLength = 3; -const defaultOptions: [Options] = [ - { - 'ts-expect-error': true, - 'ts-ignore': true, - 'ts-nocheck': true, - 'ts-check': false, - minimumDescriptionLength: defaultMinimumDescriptionLength, - }, -]; - type MessageIds = | 'tsDirectiveComment' | 'tsDirectiveCommentRequiresDescription'; @@ -98,7 +88,15 @@ export default util.createRule<[Options], MessageIds>({ }, ], }, - defaultOptions, + defaultOptions: [ + { + 'ts-expect-error': 'allow-with-description', + 'ts-ignore': true, + 'ts-nocheck': true, + 'ts-check': false, + minimumDescriptionLength: defaultMinimumDescriptionLength, + }, + ], create(context, [options]) { const tsCommentRegExp = /^\/*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/; const sourceCode = context.getSourceCode(); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy