From bca6dbd8a478d4e062d56b2e026529f6253e33fd Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sat, 3 Aug 2024 09:27:12 +1200 Subject: [PATCH] test: only run `unbound-method` cases when using `@typescript-eslint` v7 --- jest.config.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 8403937e6..bc0faa898 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -42,17 +42,17 @@ if (semver.major(eslintVersion) !== 8) { config.projects = config.projects.filter( ({ displayName }) => displayName !== 'lint', ); +} - // jest/unbound-method doesn't work when using @typescript-eslint v6 - if (semver.major(typescriptESLintPluginVersion) === 6) { - for (const project of config.projects) { - project.testPathIgnorePatterns.push( - '/src/rules/__tests__/unbound-method.test.ts', - ); - project.coveragePathIgnorePatterns.push( - '/src/rules/unbound-method.ts', - ); - } +// jest/unbound-method seems to only be happy with @typescript-eslint v7 right now... +if (semver.major(typescriptESLintPluginVersion) !== 7) { + for (const project of config.projects) { + project.testPathIgnorePatterns.push( + '/src/rules/__tests__/unbound-method.test.ts', + ); + project.coveragePathIgnorePatterns.push( + '/src/rules/unbound-method.ts', + ); } }