I am using commitlint which is using ts-node as a dep. Now somehow whenever I try to commit ts-node throws error TypeScriptCompileError Emit Skipped which is weird coz I compiled the project with tsc and it compiled succesfully.
I even tried it with just one file containing console.log please check the linked github repo
Search Terms
Emit Skipped
commitlint
Actual Behavior
Edit: just found that even after settings the rootdir in tsconfig ts-node still includes files outside from src directory, I think its a bug but I'm not sure.
Expected Behavior
should not throw compile error and emit skipped.
Must not include files outside of rootdir
Steps to reproduce the problem
yarn install
git add .
git commit -m "test: added a test"
Minimal reproduction
https://github.com/iamarpitpatidar/ts-node-bug
Specifications
- ts-node version: v10.4.0
- node version: v16.13.1
- TypeScript version: v4.5.4
- tsconfig.json, if you're using one:
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"outDir": "./dist",
"rootDir": "./src",
"moduleResolution": "Node",
"lib": ["ESNext", "ESNext.AsyncIterable"],
"esModuleInterop": true,
"allowJs": true,
"strict": true,
"experimentalDecorators": true,
"noEmitOnError": true,
"baseUrl": ".",
"types": ["@types/node"],
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
- Operating system and version: Zorin OS 16
I am using commitlint which is using ts-node as a dep. Now somehow whenever I try to commit
ts-nodethrows errorTypeScriptCompileError Emit Skippedwhich is weird coz I compiled the project with tsc and it compiled succesfully.I even tried it with just one file containing
console.logplease check the linked github repoSearch Terms
Emit Skipped
commitlint
Actual Behavior
Edit: just found that even after settings the
rootdirin tsconfigts-nodestill includes files outside fromsrcdirectory, I think its a bug but I'm not sure.Expected Behavior
should not throw compile error and emit skipped.
Must not include files outside of
rootdirSteps to reproduce the problem
Minimal reproduction
https://github.com/iamarpitpatidar/ts-node-bug
Specifications