Ignores "max-line-length": 5
Here's my tslint.json:
{
"rules": {
"max-line-length": 5
}
}
This doesn't result in any errors because I should have written [true, 5].
I'd prefer 5 alone to just work, but if not it would be nice to throw errors for bad rule options.
Actually working on that as we speak. I went through added metadata to all the branches on this branch, and it should be possible to check if options are valid based off of that data.
In the meantime, rules should all have example configurations documented. (Website still a WIP.) The schema part refers to the format of data that comes after the [true, part and is identical to the config metadata each rule now has. This will all be better documented someday.
(I changed the title of this issue to make it more generic to reflect the bigger issue.)
Once #1311 merges, it should be fairly easy to implement this
It would be great to have this. Just noticed our trailing-comma rule didn't apply because I wrote "object": "always" instead of "objects": "always".
Is it possible to validate the tslint.json file from the CLI?
Maybe something like this: tslint --validate tslint.json
I think tslint -c tslint.json index.js does validate the configuration before running the linter, but a separate --validate flag could be helpful.
Wondering also if something like https://github.com/gristlabs/ts-interface-checker could be used to lessen the amount of work TSLint has to do... I could have sworn someone was Tweeting about a similar library recently but can't find it.
a tslint --validate can be very very helpful!
TSLint is being deprecated and no longer accepting pull requests for major new changes or features. See #4534. ๐ฑ
If you'd like to see this change implemented, you have two choices:
๐ It was a pleasure open sourcing with you!
_If you believe this message was posted here in error, please comment so we can re-open the issue!_
๐ค Beep boop! ๐ TSLint is deprecated ๐ _(#4534)_ and you should switch to typescript-eslint! ๐ค
๐ This issue is being locked to prevent further unnecessary discussions. Thank you! ๐
Most helpful comment
a
tslint --validatecan be very very helpful!