I'm having difficulty to understand why my custom typescript rule is not working. Below some code to show my setup.
package.json:
{
"name": "lintingrules",
"version": "0.0.1",
"description": "Custom linting rules",
"main": "lintrules.json"
}
lintrules.json:
{
"rulesDirectory": "./rules",
"rules": {
"enounderscore": true
}
}
tslint.json of the project I want to use the linting rules:
{
"extends": ["lintingrules"]
}
In my folder src/rules
I have one rule that uses tsquery
. When using this in my angular project I always get the following message when running ng lint
:
Could not find implementations for the following rules specified in the configuration: enounderscore Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed. If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.