I am using webpack 2, and it will tell me if there are compile issues with my typescript code. However, I have not figured out a way to run tslint through it and have it run with every change detected by webpack when its running in dev-server mode.
I have tried getting tslint-loader working, but for each file in my project it simply tells me:
/src/main.tsNo valid rules have been specified
I am using it as such:
rules: [
{
test: /\.ts$/,
enforce: 'pre',
loader: 'tslint-loader',
options: {
configuration: {
configFile: true // I have also tried setting this to "tslint.json"
}
}
},
... more loaders...
Still no joy.
It there a way to either:
- Have the tslint-loader I'm using inform me of lint errors in webpack-dev-server mode each time I make a change?
- Simply run tslint from the command line and have it continually "watch" the files in my project? I'm looking for something like
tslint ./src/**/*.ts -t --force
, but with an additional--watch
flag that doesn't exist according to the tslint docs.
I would prefer not to use my editor (such as VS Code), as not everyone on my team uses it. I would prefer that the solution is contained either in the webpack config or the package.json scripts.
Thank you!