fix: adiciona variáveis globais do Jest no ESLint config

This commit is contained in:
JuruSysadmin
2025-11-21 16:46:18 -03:00
parent 0760ddf631
commit 32da5b1466
10 changed files with 352 additions and 693 deletions

View File

@@ -18,6 +18,14 @@ module.exports = [
globals: {
node: true,
jest: true,
describe: 'readonly',
it: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
},
},
plugins: {
@@ -33,6 +41,22 @@ module.exports = [
'prettier/prettier': 'error',
},
},
{
files: ['**/*.spec.ts', '**/__tests__/**/*.ts', '**/test/**/*.ts'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
jest: 'readonly',
},
},
},
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**'],
},