You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
tslint --project test.json --type-check true --rules-dir src/rules
Error: my-custom-rule requires type checking
at Rule.TypedRule.apply (C:\Code\tslint-test\node_modules\tslint\lib\language\rule\typedRule.js:15:15)
at Linter.lint (C:\Users\jogol\AppData\Roaming\npm\node_modules\tslint\lib\tslint.js:69:37)
at processFile (C:\Users\jogol\AppData\Roaming\npm\node_modules\tslint\lib\tslint-cli.js:138:29)
at C:\Users\jogol\AppData\Roaming\npm\node_modules\tslint\lib\tslint-cli.js:177:74
at Array.forEach (native)
at Object.<anonymous> (C:\Users\jogol\AppData\Roaming\npm\node_modules\tslint\lib\tslint-cli.js:177:41)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
The text was updated successfully, but these errors were encountered:
I think the issue causing this is in tslintMulti.ts, where it checks if a rule is a TypedRule:
if(this.program&&ruleinstanceofTypedRule){
In my call stack the TypedRule can be the one defined in C:\Code\tslint-test\node_modules\tslintorC:\Users\jogol\AppData\Roaming\npm\node_modules\tslint.
A couple solution proposals:
Make an isTypedRule equivalent in the class (I think preferable, for future compability)
Check the constructor.name(I think less preferable)
Bug Report
3.15.1
2.0.3
tslint.json
test.json:
Expected behavior
tslint --project test.json --type-check true --rules-dir src/rules > (tslint output from my-custom-rule)
Actual behavior
The text was updated successfully, but these errors were encountered: