diff --git a/eslint.config.mjs b/eslint.config.mjs index e486f3f1..f9fcd4b4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -86,7 +86,12 @@ export default [ // Test files specific config { - files: ['**/*.test.{js,jsx,ts,tsx}', '**/*.spec.{js,jsx,ts,tsx}'], + files: ['**/*.test.{js,jsx,ts,tsx}', '**/*.spec.{js,jsx,ts,tsx}', 'playwright.config.ts'], + languageOptions: { + parserOptions: { + project: './tsconfig.test.json', + }, + }, rules: { 'no-restricted-globals': 'off', '@typescript-eslint/no-explicit-any': 'off', diff --git a/tsconfig.json b/tsconfig.json index 5f704e22..1d570bc9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,8 +21,7 @@ "consts/*": ["./src/constant/*"], "assets": ["./src/ui/assets"], "changeLogs": ["./changeLogs"], - "react": ["./node_modules/@types/react"], - "tests": ["./tests/*"] + "react": ["./node_modules/@types/react"] }, "lib": ["ES2021.String", "DOM", "DOM.Iterable"], "types": ["chrome", "node", "react", "react-dom", "jest"], diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 00000000..8183471c --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": ["tests/**/*", "playwright.config.ts"], + "compilerOptions": { + "types": ["@playwright/test"] + } +}