Skip to content

Commit 9836bf5

Browse files
authored
[.github] exclude "coverage" from tsc and eslint (#38818)
- fixes #38815
1 parent a379830 commit 9836bf5

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

.github/eslint.config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import globals from "globals";
66
import tseslint from "typescript-eslint";
77

88
/** @type {import('eslint').Linter.Config[]} */
9-
export default defineConfig(eslint.configs.recommended, tseslint.configs.recommended, {
10-
languageOptions: { globals: globals.node },
11-
});
9+
export default defineConfig(
10+
eslint.configs.recommended,
11+
tseslint.configs.recommended,
12+
{
13+
languageOptions: { globals: globals.node },
14+
},
15+
{
16+
ignores: ["coverage/**"],
17+
},
18+
);

.github/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"vitest": "^3.2.4"
4040
},
4141
"scripts": {
42+
"check": "npm run lint && npm run format:check && npm run test:ci",
4243
"lint": "npm run lint:eslint && npm run lint:tsc",
4344
"lint:eslint": "cross-env DEBUG=eslint:eslint eslint",
4445
"lint:tsc": "tsc --build --verbose",

.github/shared/eslint.config.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ import globals from "globals";
66
import tseslint from "typescript-eslint";
77

88
/** @type {import('eslint').Linter.Config[]} */
9-
export default defineConfig(eslint.configs.recommended, tseslint.configs.recommendedTypeChecked, {
10-
languageOptions: {
11-
// we only run in node, not browser
12-
globals: globals.node,
13-
// required to use tseslint.configs.recommendedTypeChecked
14-
parserOptions: { projectService: true },
9+
export default defineConfig(
10+
eslint.configs.recommended,
11+
tseslint.configs.recommendedTypeChecked,
12+
{
13+
languageOptions: {
14+
// we only run in node, not browser
15+
globals: globals.node,
16+
// required to use tseslint.configs.recommendedTypeChecked
17+
parserOptions: { projectService: true },
18+
},
1519
},
16-
});
20+
{
21+
ignores: ["coverage/**"],
22+
},
23+
);

.github/shared/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"vitest": "^3.2.4"
6161
},
6262
"scripts": {
63+
"check": "npm run lint && npm run format:check && npm run test:ci",
6364
"lint": "npm run lint:eslint && npm run lint:tsc",
6465
"lint:eslint": "cross-env DEBUG=eslint:eslint eslint",
6566
"lint:tsc": "tsc --build --verbose",

.github/shared/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
"incremental": false,
99
"noEmit": true,
1010
},
11+
"exclude": ["coverage"],
1112
}

.github/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
"incremental": false,
99
"noEmit": true,
1010
},
11+
"exclude": ["coverage"],
1112
}

0 commit comments

Comments
 (0)