diff --git a/src/rules/converters/tests/trailing-comma.test.ts b/src/rules/converters/tests/trailing-comma.test.ts index 244146be6..8154af75d 100644 --- a/src/rules/converters/tests/trailing-comma.test.ts +++ b/src/rules/converters/tests/trailing-comma.test.ts @@ -272,7 +272,6 @@ describe(convertTrailingComma, () => { esSpecCompliant: true, }, expectedRuleArguments: [], - expectedNotices: ["ESLint does not support config property esSpecCompliant"], }, { argument: { @@ -300,10 +299,7 @@ describe(convertTrailingComma, () => { }, }, expectedRuleArguments: [{}], - expectedNotices: [ - "ESLint does not support config property esSpecCompliant", - "ESLint does not support config property typeLiterals", - ], + expectedNotices: ["ESLint does not support config property typeLiterals"], }, { argument: { @@ -314,7 +310,7 @@ describe(convertTrailingComma, () => { }, expectedRuleArguments: [{}], expectedNotices: [ - "ESLint does not support config property esSpecCompliant", + "ESLint only supports esSpecCompliant enabled", "ESLint does not support config property typeLiterals", ], }, @@ -330,7 +326,7 @@ describe(convertTrailingComma, () => { }, expectedRuleArguments: [{}], expectedNotices: [ - "ESLint does not support config property esSpecCompliant", + "ESLint only supports esSpecCompliant enabled", "ESLint does not support config property typeLiterals", ], }, diff --git a/src/rules/converters/trailing-comma.ts b/src/rules/converters/trailing-comma.ts index 76f08a2e2..b5315e0cc 100644 --- a/src/rules/converters/trailing-comma.ts +++ b/src/rules/converters/trailing-comma.ts @@ -125,10 +125,8 @@ function collectNotices(args: TSLintArg[]): string[] { } function buildNoticeForEsSpecCompliant(arg: TSLintArg): string { - const unsupportedConfigKey = "esSpecCompliant"; - - if (Object.keys(arg).includes(unsupportedConfigKey)) { - return `ESLint does not support config property ${unsupportedConfigKey}`; + if (arg.esSpecCompliant === false) { + return `ESLint only supports esSpecCompliant enabled`; } return "";