Skip to content

Commit a2c7295

Browse files
chore: move script/ inclusion to TSConfig (#1744)
## PR Checklist - [x] Addresses an existing open issue: fixes #1743 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview 💖
1 parent e32268f commit a2c7295

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default tseslint.config(
5252
languageOptions: {
5353
parserOptions: {
5454
projectService: {
55-
allowDefaultProject: ["*.config.*s", "bin/*.js", "script/*.ts"],
55+
allowDefaultProject: ["*.config.*s", "bin/*.js"],
5656
},
5757
tsconfigRootDir: import.meta.dirname,
5858
},

script/__snapshots__/migrate-test-e2e.ts.snap

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ exports[`expected file changes > eslint.config.js 1`] = `
174174
languageOptions: {
175175
parserOptions: {
176176
- projectService: {
177-
- allowDefaultProject: ["*.config.*s", "bin/*.js", "script/*.ts"],
177+
- allowDefaultProject: ["*.config.*s", "bin/*.js"],
178178
- },
179179
+ projectService: { allowDefaultProject: ["*.config.*s"] },
180180
tsconfigRootDir: import.meta.dirname,
@@ -232,3 +232,15 @@ exports[`expected file changes > knip.json 1`] = `
232232
+ "project": ["src/**/*.ts!"]
233233
}"
234234
`;
235+
236+
exports[`expected file changes > tsconfig.json 1`] = `
237+
"--- a/tsconfig.json
238+
+++ b/tsconfig.json
239+
@@ ... @@
240+
"strict": true,
241+
"target": "ES2022"
242+
},
243+
- "include": ["src", "script"]
244+
+ "include": ["src"]
245+
}"
246+
`;

script/migrate-test-e2e.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const filesExpectedToBeChanged = [
1212
".prettierignore",
1313
"cspell.json",
1414
"eslint.config.js",
15+
"tsconfig.json",
1516
];
1617

1718
const filesThatMightBeChanged = new Set([

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"strict": true,
1313
"target": "ES2022"
1414
},
15-
"include": ["src"]
15+
"include": ["src", "script"]
1616
}

0 commit comments

Comments
 (0)