Skip to content

Commit f9af112

Browse files
committed
fix: update ESLint config with TypeScript parser options
1 parent 3335f66 commit f9af112

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

eslint.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
import { dirname } from 'path'
2+
import { fileURLToPath } from 'url'
13
import defaultConfig from '@epic-web/config/eslint'
24

5+
const __filename = fileURLToPath(import.meta.url)
6+
const __dirname = dirname(__filename)
7+
38
/** @type {import("eslint").Linter.Config} */
49
export default [
510
...defaultConfig,
611
{
12+
files: ['**/*.ts', '**/*.tsx'],
13+
languageOptions: {
14+
parserOptions: {
15+
projectService: true,
16+
tsconfigRootDir: __dirname,
17+
allowDefaultProject: true,
18+
},
19+
},
720
rules: {
821
// we leave unused vars around for the exercises
922
'no-unused-vars': 'off',

0 commit comments

Comments
 (0)