Skip to content

Commit

Permalink
chore: move script/ inclusion to TSConfig (#1744)
Browse files Browse the repository at this point in the history
## 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

💖
  • Loading branch information
JoshuaKGoldberg authored Dec 5, 2024
1 parent e32268f commit a2c7295
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default tseslint.config(
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ["*.config.*s", "bin/*.js", "script/*.ts"],
allowDefaultProject: ["*.config.*s", "bin/*.js"],
},
tsconfigRootDir: import.meta.dirname,
},
Expand Down
14 changes: 13 additions & 1 deletion script/__snapshots__/migrate-test-e2e.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ exports[`expected file changes > eslint.config.js 1`] = `
languageOptions: {
parserOptions: {
- projectService: {
- allowDefaultProject: ["*.config.*s", "bin/*.js", "script/*.ts"],
- allowDefaultProject: ["*.config.*s", "bin/*.js"],
- },
+ projectService: { allowDefaultProject: ["*.config.*s"] },
tsconfigRootDir: import.meta.dirname,
Expand Down Expand Up @@ -232,3 +232,15 @@ exports[`expected file changes > knip.json 1`] = `
+ "project": ["src/**/*.ts!"]
}"
`;
exports[`expected file changes > tsconfig.json 1`] = `
"--- a/tsconfig.json
+++ b/tsconfig.json
@@ ... @@
"strict": true,
"target": "ES2022"
},
- "include": ["src", "script"]
+ "include": ["src"]
}"
`;
1 change: 1 addition & 0 deletions script/migrate-test-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const filesExpectedToBeChanged = [
".prettierignore",
"cspell.json",
"eslint.config.js",
"tsconfig.json",
];

const filesThatMightBeChanged = new Set([
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"strict": true,
"target": "ES2022"
},
"include": ["src"]
"include": ["src", "script"]
}

0 comments on commit a2c7295

Please sign in to comment.