Skip to content

Commit

Permalink
Merge pull request #20 from alexrecuenco/linting-configure-tsconfig-f…
Browse files Browse the repository at this point in the history
…or-tests

Configure eslint for tests
  • Loading branch information
alexrecuenco authored Sep 22, 2024
2 parents 2b8c21a + 7504d1f commit 5473592
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,14 @@ export default [
'jest.*.js',
'jest.*.ts',
],
ignores: ['jest.config.ts'],
// https://eslint.org/docs/user-guide/configuring#specifying-environments
languageOptions: { globals: globals.jest },
languageOptions: {
globals: { ...globals.jest, ...globals.node },
parserOptions: {
project: ['./tests/tsconfig.json'],
},
},
plugins: { jest },
rules: {
...jest.configs['recommended'].rules,
Expand Down
2 changes: 1 addition & 1 deletion tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"allowJs": true,
"sourceMap": true,
},
"include": ["./**/*", "../src/**/*"],
"include": ["./**/*", "../src/**/*", "../jest.setup*"],
"exclude": ["node_modules", "../*.config.*"],
}

0 comments on commit 5473592

Please sign in to comment.