-
Notifications
You must be signed in to change notification settings - Fork 887
Trying to create simple project to build and test custom rules #1178
Comments
Thanks for the detailed report @abierbaum! This is a bug, it turns out that the TSLint CLI doesn't pay attention to the
In the future, the command-line flag should work. Or, in the future, the path in the |
@jkillian Thanks for the quick feedback. I tried that and it worked. Just pushed the change back up to https://github.com/abierbaum/tslint_custom_rule_seed A couple of followup questions:
Thanks again. |
|
@jkillian Thanks for the great pointers. I took what you suggested and built up a pretty nice new name rule (ext-variable-name) See: https://github.com/vrsource/vrsource-tslint-rules It allows very fine grained variable name checks based upon the type of the variable (class, interface, parameter, property, method, function, etc) along with the way it is modified/used (static, public, private, protected, local, const, etc) and can then be checked against pascal, camel, snake, upper, and regex values along with allowing leading/trailing underscore. It allows from some pretty sweet configurations to cover various coding styles. (we have one that is pretty hairy which is why I worked on it). The new test framework worked great. I can't imagine trying to test this rule without it. :) |
* rulesDirectory is resolved relative to location of tslint.json file * --rules-dir CLI option is not ignored Fixes #1178
* rulesDirectory is resolved relative to location of tslint.json file * --rules-dir CLI option is not ignored Fixes #1178
@abierbaum Just merged a commit that should fix the behavior of the
|
…#1195) * rulesDirectory is resolved relative to location of tslint.json file * --rules-dir CLI option is not ignored Fixes palantir#1178
Bug Report
3.8.1
1.8.10
I am interested in creating some custom rules.
I started with the documentation here:
and decided to try to make a basic project with one simple rule and see if I could use the test framework created in #620. It all looks great, but I can't see to get it working.
I pushed a project up that shows what I am trying to do: https://github.com/abierbaum/tslint_custom_rule_seed
For now I kept it very very simple. I have:
Unfortunately it is not working. When I run it I get:
Does anyone see what I am doing wrong in here? The new testing system looks great but I can't seem to get it to work.
@jkillian Am I using the testing system in the way you expected for this type of usage? (I think I followed what was described in #620 and #941
The text was updated successfully, but these errors were encountered: