Skip to content

Commit

Permalink
Fix checkProject option
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Jun 11, 2022
1 parent 13c0828 commit 858d6d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Configuration can get specified in your `package.json` file under `ts-scripts`:
- `src` - An array of source directories used for `format` and `lint` (default: `["src"]`)
- `ignore` - An array of patterns to ignore for `format` and `lint` (default: `[]`)
- `dist` - An array of output directories to clean before `build` (default: `["dist"]`)
- `project` An array of `tsconfig.json` project files to build using TypeScript (default: `["tsconfig.json"]`)
- `checkProject` An array of `tsconfig.json` project files to type check using TypeScript (default: `["tsconfig.json"]`)
- `project` An array of TSConfig files to build using TypeScript (default: `["tsconfig.json"]`)
- `checkProject` An array of TSConfig files to type check using TypeScript (default: `["tsconfig.json"]`)
- `test` An array of test configuration objects (default: `[{}]`)
- `dir` The directory to read tests from (default: `undefined`, root directory)
- `config` The configuration file to use for this test (default: `undefined`, discovered by `vitest`)
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ const configSchema = object({
ignore: arrayifySchema(string()).optional(),
dist: arrayifySchema(string()).optional(),
project: arrayifySchema(string()).optional(),
checkProject: arrayifySchema(string()).optional(),
test: arrayifySchema(
object({
dir: string().optional(),
config: string().optional(),
project: string().optional(),
})
).optional(),
});
Expand All @@ -472,7 +472,7 @@ export async function getConfig(cwd: string): Promise<Config> {
ignore: arrayify(schema.ignore ?? []),
dist: arrayify(schema.dist ?? "dist"),
project: arrayify(schema.project ?? "tsconfig.json"),
checkProject: arrayify(schema.project ?? "tsconfig.json"),
checkProject: arrayify(schema.checkProject ?? "tsconfig.json"),
test: arrayify(schema.test ?? {}).map((testSchema) => ({
dir: testSchema.dir,
config: testSchema.config,
Expand Down

0 comments on commit 858d6d2

Please sign in to comment.