From e0111db5f5198da36356c3aa330935cbb032f8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Sat, 15 Nov 2025 11:53:12 +0100 Subject: [PATCH] add tests to main tsconfig --- eslint.config.ts | 10 +++++++++- tsconfig.eslint.json | 2 +- tsconfig.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 5b3ab02..8ede127 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -3,8 +3,16 @@ import eslintParserTypeScript from "@typescript-eslint/parser"; import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss"; import globals from "globals"; import tseslint from "typescript-eslint"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default tseslint.config( + { + ignores: ["**/node_modules/**", "eslint.config.ts", "dist/**"], + }, js.configs.recommended, tseslint.configs.recommended, { @@ -12,11 +20,11 @@ export default tseslint.config( plugins: { "better-tailwindcss": eslintPluginBetterTailwindcss, }, - ignores: ["**/node_modules/**", "eslint.config.ts", "dist/**"], languageOptions: { parser: eslintParserTypeScript, parserOptions: { project: "./tsconfig.eslint.json", + tsconfigRootDir: __dirname, ecmaFeatures: { jsx: true, }, diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 37d9272..acecbf1 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -3,5 +3,5 @@ "noEmit": true }, "extends": "./tsconfig.json", - "include": ["src", "tests/**/*.ts", "eslint.config.ts", "package.json"] + "include": ["src", "tests", "eslint.config.ts", "package.json"] } diff --git a/tsconfig.json b/tsconfig.json index cb524d9..04df3a6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,6 +29,6 @@ "esModuleInterop": true // "noImplicitReturns": true }, - "include": ["src", "package.json"], + "include": ["src", "tests", "package.json"], "exclude": ["dist", "node_modules"] }