-
Notifications
You must be signed in to change notification settings - Fork 889
Examples of correct and incorrect code #3594
Comments
Closing as a duplicate of #1329 For the time being the easiest way to understand a rule is to look at the tests. |
Thanks for the housekeeping efforts, and sorry for the duplicates. |
Actually, can you guide me a bit on how to understand the tests? They are somewhat cryptic. |
The test consist of different line types: Code lines everything that is not listed below. Message substitution (or template) Error Markup Example:
The above means there is an error |
the testing markup is documented here: https://palantir.github.io/tslint/develop/testing-rules/ |
Thanks to both 😄 |
I find myself very often searching for examples online, since TSLint's docs are lacking them. For TSLint to be useful, one must know what its rules are about, and this is currently not provided by the documentation alone.
The ESLint team did a great job in this regard, and I think you should take inspiration from them, e.g. https://eslint.org/docs/rules/no-empty.
If this is not under consideration already, please consider it 🙂
The text was updated successfully, but these errors were encountered: