diff --git a/eslint.config.mjs b/eslint.config.mjs index 30217a6..196deb9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,13 +9,9 @@ import _import from 'eslint-plugin-import' import jest from 'eslint-plugin-jest' import prettier from 'eslint-plugin-prettier' import globals from 'globals' -import path from 'node:path' -import { fileURLToPath } from 'node:url' -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) const compat = new FlatCompat({ - baseDirectory: __dirname, + baseDirectory: import.meta.dirname, recommendedConfig: js.configs.recommended, allConfig: js.configs.all }) @@ -52,8 +48,18 @@ export default [ sourceType: 'module', parserOptions: { - project: ['tsconfig.eslint.json'], - tsconfigRootDir: __dirname + projectService: { + allowDefaultProject: [ + '__fixtures__/*.ts', + '__tests__/*.ts', + 'eslint.config.mjs', + 'jest.config.js', + 'rollup.cleanup.config.ts', + 'rollup.main.config.ts' + ], + maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 32 + }, + tsconfigRootDir: import.meta.dirname } }, @@ -61,7 +67,7 @@ export default [ 'import/resolver': { typescript: { alwaysTryTypes: true, - project: 'tsconfig.eslint.json' + project: 'tsconfig.json' } } }, diff --git a/jest.config.js b/jest.config.js index b68f59d..f21a085 100644 --- a/jest.config.js +++ b/jest.config.js @@ -20,7 +20,7 @@ export default { '^.+\\.ts$': [ 'ts-jest', { - tsconfig: 'tsconfig.eslint.json', + tsconfig: 'tsconfig.json', useESM: true } ] diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index cd82ad9..0000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "declaration": false, - "declarationMap": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "lib": ["ES2022"], - "module": "NodeNext", - "moduleResolution": "NodeNext", - "newLine": "lf", - "noImplicitAny": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "pretty": true, - "resolveJsonModule": true, - "sourceMap": false, - "strict": true, - "strictNullChecks": true, - "target": "ES2022" - } -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 41c0a4a..0000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./tsconfig.base.json", - "compilerOptions": { - "allowJs": true, - "noEmit": true - }, - "exclude": ["dist", "node_modules"], - "include": [ - "__fixtures__", - "__tests__", - "src", - "eslint.config.mjs", - "jest.config.js", - "rollup.cleanup.config.ts", - "rollup.main.config.ts" - ] -} diff --git a/tsconfig.json b/tsconfig.json index afd50ab..8191311 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,25 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./tsconfig.base.json", "compilerOptions": { + "allowSyntheticDefaultImports": true, + "declaration": false, + "declarationMap": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, "isolatedModules": true, + "lib": ["ES2022"], "module": "NodeNext", "moduleResolution": "NodeNext", - "outDir": "./dist" + "newLine": "lf", + "noImplicitAny": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "outDir": "./dist", + "pretty": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "target": "ES2022" }, "exclude": ["__fixtures__", "__tests__", "coverage", "dist", "node_modules"], "include": ["src"]