I'm working on an angular2 project and have included grunt-tslint to improve my code. The grunt task "tslint" and default grunt task is workink fine but when I include it to the watch task it's not linting. I tried to delete every other watch task but also not working.
This are my versions:
grunt: v1.0.1
grunt-contrib-watch: 1.0.0
grunt-ts: v6.0.0-beta.3
grunt-tslint: 4.0.0
And the grunt tasks:
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
tslint: {
options: {
configuration: "tslint.json",
force: false,
fix: false
},
files: {
src: ['app/**/*.ts']
}
},
ts: {
default : {
src: ['app/**/*.ts'],
outDir: 'outDir/app/',
tsconfig: './tsconfig.json'
}
},
watch: {
tslint: {
files: ['app/**/*.ts'],
task: ['tslint']
},
ts: {
files: ['app/**/*.ts'],
tasks: ['ts']
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-tslint');
grunt.registerTask('default', [
'ts', 'tslint'
]);
grunt.registerTask('validate:ts', ['tslint']);
};