Skip to content

Commit fdc5814

Browse files
committed
Tweak config globs
1 parent 21a5285 commit fdc5814

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

eslint.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ module.exports = [
147147
ignores: biomeConfig.files.ignore.map(convertIgnorePatternToMinimatch)
148148
},
149149
{
150-
files: ['**/*.ts'],
150+
files: ['**/*.{cts,mts,ts}'],
151151
...js.configs.recommended,
152152
...importFlatConfigsForModule.typescript,
153153
languageOptions: {
@@ -169,11 +169,12 @@ module.exports = [
169169
...importFlatConfigsForModule.typescript.languageOptions
170170
?.parserOptions?.projectService,
171171
allowDefaultProject: [
172-
'test/*.ts',
173172
// Allow paths like src/utils/*.test.ts.
174173
'src/*/*.test.ts',
175174
// Allow paths like src/commands/optimize/*.test.ts.
176-
'src/*/*/*.test.ts'
175+
'src/*/*/*.test.ts',
176+
'test/*.ts',
177+
'vitest.config.mts'
177178
],
178179
defaultProject: 'tsconfig.json',
179180
tsconfigRootDir: rootPath,
@@ -223,7 +224,7 @@ module.exports = [
223224
}
224225
},
225226
{
226-
files: ['**/*.{c,}js'],
227+
files: ['**/*.{cjs,js}'],
227228
...js.configs.recommended,
228229
...importFlatConfigsForScript.recommended,
229230
...nodePlugin.configs['flat/recommended-script'],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"translations.json"
214214
],
215215
"lint-staged": {
216-
"*.{cjs,js,json,md,mjs,ts}": [
216+
"*.{cjs,cts,js,json,md,mjs,mts,ts}": [
217217
"npm run lint -- --fix",
218218
"npm run lint:fix:fast -- --no-errors-on-unmatched --files-ignore-unknown=true --colors=off"
219219
]

0 commit comments

Comments
 (0)