Chore: Ignore type assertions in __mocks__ (#53593)

This commit is contained in:
Josh Hunt
2022-08-11 15:06:15 +01:00
committed by GitHub
parent 85dbacafdb
commit 44ea98b24f
2 changed files with 13 additions and 100 deletions

View File

@@ -35,7 +35,10 @@ function countEslintErrors() {
'@typescript-eslint/no-explicit-any': 'error',
};
if (!filePath.endsWith('.test.tsx') && !filePath.endsWith('.test.ts')) {
const isTestFile =
filePath.endsWith('.test.tsx') || filePath.endsWith('.test.ts') || filePath.includes('__mocks__');
if (!isTestFile) {
rules['@typescript-eslint/consistent-type-assertions'] = [
'error',
{