Skip to content

Commit 5473592

Browse files
authored
Merge pull request #20 from alexrecuenco/linting-configure-tsconfig-for-tests
Configure eslint for tests
2 parents 2b8c21a + 7504d1f commit 5473592

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

eslint.config.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,14 @@ export default [
163163
'jest.*.js',
164164
'jest.*.ts',
165165
],
166+
ignores: ['jest.config.ts'],
166167
// https://eslint.org/docs/user-guide/configuring#specifying-environments
167-
languageOptions: { globals: globals.jest },
168+
languageOptions: {
169+
globals: { ...globals.jest, ...globals.node },
170+
parserOptions: {
171+
project: ['./tests/tsconfig.json'],
172+
},
173+
},
168174
plugins: { jest },
169175
rules: {
170176
...jest.configs['recommended'].rules,

tests/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"allowJs": true,
77
"sourceMap": true,
88
},
9-
"include": ["./**/*", "../src/**/*"],
9+
"include": ["./**/*", "../src/**/*", "../jest.setup*"],
1010
"exclude": ["node_modules", "../*.config.*"],
1111
}

0 commit comments

Comments
 (0)