From d788b88f5413d356734fe8c9655482b33d9f159a Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Sat, 7 Jun 2025 15:47:32 +0200 Subject: [PATCH] Use `jest` with eslint --- eslint.config.mjs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c5a128e..4acd405 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,4 +1,5 @@ import github from 'eslint-plugin-github' +import jest from 'eslint-plugin-jest' export default [ github.getFlatConfigs().recommended, @@ -15,12 +16,26 @@ export default [ '@typescript-eslint/no-shadow': ['error'], }, }, + { + files: ['__tests__/**/*.test.ts'], + ...jest.configs['flat/recommended'], + plugins: { + jest, + }, + languageOptions: { + globals: jest.environments.globals.globals, + }, + rules: { + 'i18n-text/no-en': 'off', + 'import/no-namespace': 'off', + "@typescript-eslint/array-type": ['error', {default: 'array'}], + }, + }, { ignores: [ 'dist/**', 'lib/**', 'node_modules/**', - '__tests__/**', '__tests__/__snapshots__/**', '__tests__/__results__/**', 'assets/**',