Cannot read property 'findConfiguration' of undefined Use --force to continue.
Closed this issue · 3 comments
My gruntfile.js is as following and get the warning message " Cannot read property 'findConfiguration' of undefined Use --force to continue."
my code:
`module.exports = function(grunt){
grunt.initConfig({
tslint:{
options:{ configuration: "tslint.json"
,force:false
,fix:false
}
,files:{
src:["src/**/*.ts"]
}
}
});
grunt.loadNpmTasks('grunt-tslint');
grunt.registerTask('default', ['tslint']);
}`
message:
`Running "tslint:files" (tslint) task
Warning: Cannot read property 'findConfiguration' of undefined Use --force to co
ntinue.
Aborted due to warnings.`
I have debugged in the grunt-tslint and found the require('tslint') doesn't return object that has Configuration property, so the code below raise error:
configuration = Linter.Configuration.findConfiguration(configuration, filepath).results;
Could you please give any advice on it?
which versions of grunt-tslint, tslint, and typescript are you using?
It seems as if tslint
changed the interface with version 4.x see: palantir/tslint#1720