grunt-tslint
grunt-tslint copied to clipboard
Source path fails when starting with ./
The src paths start with ./, grunt give the following message:
Running "tslint:rgent-64bit-ids" (tslint) task
Verifying property tslint.rgent-64bit-ids exists in config...OK
Files: ./src/server/libs/rgent-64bit-ids/rgent-64bit-ids.ts -> src
Options: formatter="prose", outputFile=null, configuration={"rules":{"ban":[true,["_","extend"],["_","isNull"],["_","isDefined"]],"class-name":true,"comment-format":[true,"check-space"],"curly":false,"eofline":true,"forin":true,"indent":[true,4],"interface-name":true,"jsdoc-format":true,"label-position":true,"label-undefined":true,"max-line-length":[true,140],"member-ordering":[true,"public-before-private","static-before-instance","variables-before-functions"],"no-arg":true,"no-bitwise":false,"no-console":[true,"debug","info","time","timeEnd","trace"],"no-construct":true,"no-constructor-vars":true,"no-debugger":true,"no-duplicate-key":true,"no-duplicate-variable":true,"no-empty":true,"no-eval":true,"no-string-literal":true,"no-switch-case-fall-through":true,"no-trailing-comma":true,"no-trailing-whitespace":true,"no-unused-expression":true,"no-unused-variable":true,"no-unreachable":true,"no-use-before-declare":true,"no-var-requires":true,"one-line":[true,"check-open-brace","check-catch","check-else","check-whitespace"],"quotemark":[true,"double"],"radix":true,"semicolon":true,"triple-equals":[true,"allow-null-check"],"typedef":[true,"callSignature","indexSignature","parameter","propertySignature","variableDeclarator"],"typedef-whitespace":[true,["callSignature","noSpace"],["catchClause","noSpace"],["indexSignature","space"]],"use-strict":[true,"check-module","check-function"],"variable-name":false,"whitespace":[true,"check-branch","check-decl","check-operator","check-separator","check-type"]}}
Reading ./src/server/libs/rgent-64bit-ids/rgent-64bit-ids.ts...OK
Warning: Cannot read property 'kind' of undefined Use --force to continue.
Works:
tslint: {
options: {
configuration: grunt.file.readJSON('./src/server/libs/rgent-64bit-ids/rgent-64bit-ids.lint.json')
},
'rgent-64bit-ids':{
files: {
// Note: path can't have ./ on the front; it screws it up
src: ['src/server/libs/rgent-64bit-ids/rgent-64bit-ids.ts']
}
}
},
Doesn't work (this difference is in the line that starts with src):
tslint: {
options: {
configuration: grunt.file.readJSON('./src/server/libs/rgent-64bit-ids/rgent-64bit-ids.lint.json')
}, 'rgent-64bit-ids':{
files: {
// Note: path can't have ./ on the front; it screws it up
src: ['./src/server/libs/rgent-64bit-ids/rgent-64bit-ids.ts']
}
}
},
This issue is experienced on Mac OS X 10.10 (Yosemite). I expect that the issue will also occur on Linux but I haven't tested it.