Skip to content

Commit e1369b9

Browse files
committed
1 parent aa204a3 commit e1369b9

File tree

5 files changed

+31
-52
lines changed

5 files changed

+31
-52
lines changed

eslint.config.mjs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ import _import from 'eslint-plugin-import'
99
import jest from 'eslint-plugin-jest'
1010
import prettier from 'eslint-plugin-prettier'
1111
import globals from 'globals'
12-
import path from 'node:path'
13-
import { fileURLToPath } from 'node:url'
1412

15-
const __filename = fileURLToPath(import.meta.url)
16-
const __dirname = path.dirname(__filename)
1713
const compat = new FlatCompat({
18-
baseDirectory: __dirname,
14+
baseDirectory: import.meta.dirname,
1915
recommendedConfig: js.configs.recommended,
2016
allConfig: js.configs.all
2117
})
@@ -52,16 +48,26 @@ export default [
5248
sourceType: 'module',
5349

5450
parserOptions: {
55-
project: ['tsconfig.eslint.json'],
56-
tsconfigRootDir: __dirname
51+
projectService: {
52+
allowDefaultProject: [
53+
'__fixtures__/*.ts',
54+
'__tests__/*.ts',
55+
'eslint.config.mjs',
56+
'jest.config.js',
57+
'rollup.cleanup.config.ts',
58+
'rollup.main.config.ts'
59+
],
60+
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 32
61+
},
62+
tsconfigRootDir: import.meta.dirname
5763
}
5864
},
5965

6066
settings: {
6167
'import/resolver': {
6268
typescript: {
6369
alwaysTryTypes: true,
64-
project: 'tsconfig.eslint.json'
70+
project: 'tsconfig.json'
6571
}
6672
}
6773
},

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
'^.+\\.ts$': [
2121
'ts-jest',
2222
{
23-
tsconfig: 'tsconfig.eslint.json',
23+
tsconfig: 'tsconfig.json',
2424
useESM: true
2525
}
2626
]

tsconfig.base.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

tsconfig.eslint.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

tsconfig.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
3-
"extends": "./tsconfig.base.json",
43
"compilerOptions": {
4+
"allowSyntheticDefaultImports": true,
5+
"declaration": false,
6+
"declarationMap": false,
7+
"esModuleInterop": true,
8+
"forceConsistentCasingInFileNames": true,
59
"isolatedModules": true,
10+
"lib": ["ES2022"],
611
"module": "NodeNext",
712
"moduleResolution": "NodeNext",
8-
"outDir": "./dist"
13+
"newLine": "lf",
14+
"noImplicitAny": true,
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": false,
17+
"outDir": "./dist",
18+
"pretty": true,
19+
"resolveJsonModule": true,
20+
"strict": true,
21+
"strictNullChecks": true,
22+
"target": "ES2022"
923
},
1024
"exclude": ["__fixtures__", "__tests__", "coverage", "dist", "node_modules"],
1125
"include": ["src"]

0 commit comments

Comments
 (0)