Is there a way doing this without webpack or other bundlers?
Or the only option is to use two consoles where in one you will build and in second lint?
Is there a way doing this without webpack or other bundlers?
Or the only option is to use two consoles where in one you will build and in second lint?
I think there is no way around the fact that this will require two processes: one for 'tsc -w' and the other for the linting. The linting can happen in a 2nd terminal, in your IDE, or in your build script, but either way it is still another process.
Does that answer your question?
For instance,
first: npm i tsc-watch -D
and then, in package.json
:
"scripts": {
"lint": "eslint . --ext .ts",
"serve:reload": "npm run lint && node ./dist/index.js",
"serve": "tsc-watch --noClear --onSuccess \"npm run serve:reload\"",