3

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?

ZiiMakc
  • 31,187
  • 24
  • 65
  • 105

2 Answers2

2

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?

Tom
  • 17,103
  • 8
  • 67
  • 75
1

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\"",
gvlax
  • 740
  • 4
  • 17