Package Exports
- @mcmath/tslint-rules
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mcmath/tslint-rules) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@mcmath/tslint-rules
Custom rules for TSLint
Install
Install as an npm devDependency. TypeScript and TSLint should also be installed.
npm install --save-dev typescript tslint @mcmath/tslint-rules
Usage
Include a tslint.json
file in your project and add "@mcmath/tslint-rules"
to
the "extends"
field. Custom rules can then be enabled under "rules"
.
{
"extends": ["@mcmath/tslint-rules"],
"rules": {
"enum-member-name": [true, "caps-case"]
}
}
Rules
enum-member-name
Ensures enum
members follow a consistent naming convention.
This rule accepts a single string option. If no option is given, "pascal-case" is assumed.
Option | Attributes | Example |
---|---|---|
"pascal-case" | default | PascalCase |
"camel-case" | camelCase | |
"caps-case" | CAPS_CASE | |
"snake-case" | snake_case |
enum-name
Ensures enum
identifiers follow a consistent naming convention.
This rule accepts a single string option. If no option is given, "pascal-case" is assumed.
Option | Attributes | Example |
---|---|---|
"pascal-case" | default | PascalCase |
"camel-case" | camelCase | |
"caps-case" | CAPS_CASE | |
"snake-case" | snake_case |
License
Copyright © 2017 Akim McMath. Licensed under the MIT License.