A set of custom TSLint rules.
Install from npm to your devDependencies:
npm install --save-dev tslint-gandalf-rules
Configure tslint to use the custom-tslint-rules folder:
Add the following path to the rulesDirectory
setting in your tslint.json
file:
{
"extends": [
"tslint-gandalf-rules"
],
"rules": {
...
}
}
Now configure some of the new rules.
prevent from creating arrow functions as class property
...
"rules": {
"arrow-function-class-prop": true
}
...
No options at the moment
prevent from passing function as an input to Angular component
...
"rules": {
"no-function-as-input": true
}
...
No options at the moment
Issue reports and pull requests are highly welcome! Please make sure to provide sensible tests along with your pull request.
To get started with development, clone the project and run yarn install
.
To run the tests execute yarn test
.