import { BottomSheetKey, BottomSheetService } from "bottomSheet";
import { INavItem, NavHeight } from 'core/services/nav.service';
import { Configuration } from './app.configuration';
with tslint.json
configuration:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": {
"options": [ true, "single", "avoid-escape" ],
"severity": "warning"
}
},
}
The quotemark
rule is ignored.
There should be a warning reported from the quotemark
rule on line 1 of the provided snippet at "bottomSheet"
.
This could be a larger issue with rules, but I've only observed it with quotemark
.
If you use the new config format with severity and options, you don't want
the first option to be true
. If you remove it from the array, the rule
should work as expected.
Am 12.05.2017 18:07 schrieb "Jacob Robertson" notifications@github.com:
Bug Report
- TSLint version: 5.2.0
- TypeScript version: 2.3.1
- Running TSLint via: (pick one) CLI / Node.js API / VSCode /
grunt-tslint / Atom / Visual Studio / etcTypeScript code being linted
import { BottomSheetKey, BottomSheetService } from "bottomSheet";import { INavItem, NavHeight } from 'core/services/nav.service';import { Configuration } from './app.configuration';
with tslint.json configuration:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": {
"options": [ true, "single", "avoid-escape" ],
"severity": "warning"
}
},
}Actual behavior
The quotemark rule is ignored.
Expected behaviorThere should be a warning reported from the quotemark rule on line 1 of
the provided snippet at "bottomSheet".
ThoughtsThis could be a larger issue with rules, but I've only observed it with
quotemark.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/palantir/tslint/issues/2746, or mute the thread
https://github.com/notifications/unsubscribe-auth/ALaeKN8MtJyisZmnL1SJfgTyAIcaUQPJks5r5IOlgaJpZM4NZfAU
.
Yeah, that works. Thanks!
I couldn't find a good example in the docs for how to go from
"rules": {
"quotemark": [ true, "single", "avoid-escape" ],
}
to
"rules": {
"quotemark": {
"options": [ "single", "avoid-escape" ],
"severity": "warning"
}
}
Is this subtle difference mentioned anywhere?
@jacob-robertson yes, it's in the Notable features & enhancements section of the 5.0.0 release notes and the changelog.
Most helpful comment
If you use the new config format with severity and options, you don't want
the first option to be
true
. If you remove it from the array, the ruleshould work as expected.
Am 12.05.2017 18:07 schrieb "Jacob Robertson" notifications@github.com: