4.0.11.8.10gulp-tslint v7.0.0When I use this configuration
{
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules"
],
"extends": [
"./tslint-eslint-rules.json"
],
"rules": {
"comment-format": [ false ],
"quotemark": [ false ]
}
}
I get violations for those 2 rules, even though they are set to be disabled. (I probably get more violations than this, but I have it limited to only show 50 at a time). However, if I comment out the contents of the rulesDirectory and extends arrays like this:
{
"rulesDirectory": [
//"node_modules/tslint-eslint-rules/dist/rules"
],
"extends": [
//"./tslint-eslint-rules.json"
],
"rules": {
"comment-format": [ false ],
"quotemark": [ false ]
}
}
those rules stay disabled and do not report violations as expected.
likely a bug introduced by https://github.com/palantir/tslint/pull/1622
I can't reproduce. I can override quotemark with false if the extend .json file contains "quotemark": [ true, "double", "avoid-escape"] or if it extends tslint:recommended
There are 2 problems here:
extends does not exist. In the CLI, you see the error, but gulp-tslint swallows the error.I think the fix would be to catch the error in the non-API part of the code
This still seems to happen:
{
"defaultSeverity": "error",
"extends": [
"tslint:all",
"tslint-config-prettier"
],
"jsRules": {},
"rules": {
"object-literal-sort-keys": false
},
"rulesDirectory": []
}
I get ERROR: /Users/tommedema/projects/vg/playground/tshape/src/index.ts[5, 3]: 'width' should come alphabetically before 'x' therefore the rule is not disabled.
I have the same problem and it's been a year since the last comment.
{
"extends": ["gts/tslint.json"],
"rules": {
"quotemark": [true, "double", "avoid-escape", "avoid-template"]
},
"jsRules": {
"quotemark": [true, "double", "avoid-escape", "avoid-template"]
}
}
$ gts check
...
export async function get_employees_as_json() {
const response = await pool.query(build_sql_to_get_all_employees_as_json());
- return response.rows[0]["json"];
+ return response.rows[0]['json'];
}
gts 0.9.0
tslint 5.14.0
clang-format (used by gts) 1.2.3
I'm not really familiar with gts. It would be best if you created a minimal repro to demonstrate the issue with the tslint CLI.
You are right! I could not reproduce it with the tslint CLI. The Google Typescript Style says it uses tslint under the hood to do checks but it seems it is overriding the config file.
Most helpful comment
This still seems to happen:
I get
ERROR: /Users/tommedema/projects/vg/playground/tshape/src/index.ts[5, 3]: 'width' should come alphabetically before 'x'therefore the rule is not disabled.