Skip to content

Commit 12b0124

Browse files
committed
Tweak eslint config to better handle json/md, remove compile-tests script
1 parent 32dfda4 commit 12b0124

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.eslintrc.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,20 @@
1717
],
1818
"overrides": [
1919
{
20-
"files": ["*.md"],
21-
"parser": "markdown-eslint-parser",
20+
"files": ["*.ts"],
2221
"rules": {
23-
"@typescript-eslint/require-await": "off"
22+
"require-await": "off",
23+
"@typescript-eslint/require-await": "error"
2424
}
2525
},
2626
{
27+
"extends": ["plugin:package-json/legacy-recommended"],
2728
"files": ["*.json"],
28-
"parser": "jsonc-eslint-parser",
29-
"rules": {
30-
"@typescript-eslint/require-await": "off"
31-
}
29+
"parser": "jsonc-eslint-parser"
3230
},
3331
{
34-
"extends": ["plugin:package-json/legacy-recommended"],
35-
"files": ["package.json"],
36-
"parser": "jsonc-eslint-parser",
37-
"rules": {
38-
"@typescript-eslint/require-await": "off"
39-
}
32+
"files": ["*.md"],
33+
"parser": "markdown-eslint-parser"
4034
}
4135
],
4236
"rules": {
@@ -73,9 +67,7 @@
7367
"sublings_only": true
7468
}
7569
}
76-
],
77-
"require-await": "off",
78-
"@typescript-eslint/require-await": "error"
70+
]
7971
},
8072
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
8173
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
"main": "./dist/extension.js",
2020
"scripts": {
2121
"build": "webpack",
22-
"compile-tests": "tsc -p . --outDir out",
2322
"fmt": "prettier --write .",
2423
"lint": "eslint . --ext ts,md,json",
2524
"lint:fix": "yarn lint --fix",
2625
"package": "webpack --mode production --devtool hidden-source-map",
2726
"package:prerelease": "npx vsce package --pre-release",
28-
"pretest": "yarn run compile-tests && yarn run build && yarn run lint",
27+
"pretest": "tsc -p . --outDir out && yarn run build && yarn run lint",
2928
"test": "vitest",
3029
"test:ci": "CI=true yarn test",
3130
"test:integration": "vscode-test",

0 commit comments

Comments
 (0)