I have some variable names starting with leading underscore , I still get this warning after updating my tslint.json
tslint.json
{
"extends": "tslint:recommended",
"rules": {
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore"
]
},
"exclude": [
"build/**/*",
"node_modules/**/*",
"tmp/**/*"
]
}
where am I wrong ?
thanks for feedback
UPDATE
I am using version 4.5.1 of TSLint
You can solve the problem by editing your tslint.json
and adding "allow-leading-underscore"
to the "variable-name"
array of your "rules"
.
// tslint.json contents
{
// ...
"rules": {
// ...
"variable-name": [
true,
// ...
"allow-leading-underscore"
]
},
// ...
}