diff --git a/eslint-bridge/tests/RuleTesterTs.ts b/eslint-bridge/tests/RuleTesterTs.ts index 1852feb5c5a..63c443c70e1 100644 --- a/eslint-bridge/tests/RuleTesterTs.ts +++ b/eslint-bridge/tests/RuleTesterTs.ts @@ -35,17 +35,6 @@ const placeHolderFilePath = path.resolve(`${__dirname}/fixtures/rule-tester-proj * It will also assert that no issues is raised when there are no type information. */ class RuleTesterTs extends RuleTester { - ruleTesterNoTsConfig = new RuleTester({ - parser, - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module', - ecmaFeatures: { - jsx: true, - globalReturn: true, - }, - }, - }); constructor(public expectNoIssuesWithoutTypes = true) { super({ @@ -62,16 +51,14 @@ class RuleTesterTs extends RuleTester { invalid?: RuleTester.InvalidTestCase[]; }, ): void { - tests.valid.forEach(test => { + const setFilename = test => { if (!test.filename) { test.filename = placeHolderFilePath; } - }); - tests.invalid.forEach(test => { - if (!test.filename) { - test.filename = placeHolderFilePath; - } - }); + }; + + tests.valid.forEach(setFilename); + tests.invalid.forEach(setFilename); super.run(name, rule, tests); }