Skip to content

Commit

Permalink
feat!: validate presence of outDir in tsconfig
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `outDir` is now required in `tsconfig.json`. Run `plugin-kit verify-package` to
get hints about how to apply required changes.
  • Loading branch information
mariuslundgard committed Jan 2, 2023
1 parent 34aaf9b commit 89d0978
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/inject/template-tsconfig.json
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"outDir": "./lib",
"jsx": "preserve",
"moduleResolution": "node",
"target": "esnext",
Expand Down
1 change: 1 addition & 0 deletions src/actions/verify/validations.ts
Expand Up @@ -34,6 +34,7 @@ const expectedCompilerOptions = {
declaration: true,
allowSyntheticDefaultImports: true,
rootDir: 'src',
outDir: 'lib',
}

export function validateNodeEngine(packageJson: PackageJson) {
Expand Down
3 changes: 2 additions & 1 deletion tap-snapshots/test/verify-package.test.ts.test.cjs
Expand Up @@ -128,7 +128,7 @@ To skip this validation add the following to your package.json:
[error]
Recommended tsconfig.json compilerOptions missing:
The following fields had unexpected values: [jsx, moduleResolution, target, module, sourceMap, inlineSourceMap, esModuleInterop, skipLibCheck, isolatedModules, downlevelIteration, declaration, allowSyntheticDefaultImports, rootDir]
The following fields had unexpected values: [jsx, moduleResolution, target, module, sourceMap, inlineSourceMap, esModuleInterop, skipLibCheck, isolatedModules, downlevelIteration, declaration, allowSyntheticDefaultImports, rootDir, outDir]
Expected to find these values:
"jsx": "preserve",
"moduleResolution": "node",
Expand All @@ -143,6 +143,7 @@ Expected to find these values:
"declaration": true,
"allowSyntheticDefaultImports": true,
"rootDir": "src",
"outDir": "lib",
Please update your tsconfig.json accordingly.
Expand Down

0 comments on commit 89d0978

Please sign in to comment.