tslint-plugin-ikatyang
tslint rules for ikatyang
Install
# using npm npm install --save-dev tslint-plugin-ikatyang tslint # using yarn yarn add --dev tslint-plugin-ikatyang tslint
Usage
(tslint.json)
for tslint@5.0.0+
for tslint@5.2.0+
Rules
filename-convention
Enforces all linted files to have their names in a certain case style
Options:
- namingStyle
- default:
"kebab-case"
- type:
"camelCase" | "kebab-case" | "PascalCase" | "snake_case" | "none"
"none"
means only acceptallowPatterns
- default:
- allowPrefixes
- default:
[]
- type:
string[]
- e.g.
["."]
(dotfile)
- default:
- allowSuffixes
- default:
[]
- type:
string[]
- e.g.
[".test", ".spec"]
(test files)
- default:
- allowPatterns
- default:
[]
- type:
string[]
- regex patterns, extname excluded
- default:
no-bad-namespace-import
Disallow bad namespace import
-
pass
; // export = namespace { ... }; // export const x = 1; export const y = 2; ... -
fail
; // export = function () { ... }; // function a () {}; namespace a { ... }; export = a; -
fixed
;;
no-mixed-parameter-properties
Disallow mixed parameter properties
-
pass
-
fail
-
fixed
Development
# lint yarn run lint # format yarn run format # build yarn run build # test yarn run test
License
MIT © Ika