tslint-rules-jeongho
v1.0.1
Published
Custom utility rules for TSLint.
Downloads
2
Readme
tslint-rules-jeongho
Custom utility rules for TSLint.
How to use
yarn add tslint-rules-jeongho
in tslint.json
,
{
"rulesDirectory": ["./node_modules/tslint-rules-jeongho/dist"],
"rules": {
"symmetric-enum": [true, {
// Optional regex to restrict files to apply this rule.
"path": ".*.ts$"
}]
}
}
symmetric-enum
This rule restricts enum string literals to be exactly same as its key name.
enum Action {
FETCH_USER = 'FETCH_USER',
LOGIN = 'Login', // ERROR! The string value must be 'LOGIN'.
}