Skip to content

Commit 48d8608

Browse files
authored
fix: eslint json linting (#58)
For the @typescript-eslint/parser the tsconfig needs to include all files being linted. We need to explicitly include .json files per the default rule: https://www.typescriptlang.org/tsconfig#include ``` If a glob pattern doesn’t include a file extension, then only files with supported extensions are included (e.g. .ts, .tsx, and .d.ts by default, with .js and .jsx if allowJs is set to true). ```
1 parent c2fffa4 commit 48d8608

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/data.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"some": "data",
3+
"important": true
4+
}

tsconfig.test.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": ["src", "scripts"],
3+
"include": ["src", "src/**/*.json", "scripts", "scripts/**/*.json"],
44
"exclude": ["node_modules"]
55
}

0 commit comments

Comments
 (0)