ts-glob deprecation notice
This package currently uses tsconfig-glob. However in the next major release it will be removed in favor of using the "include" property for TypeScript 2.0
tsconfig-lint
A tsconfig tool for running tslint on files found in the tsconfig. Integrates with tsconfig-glob to allow for filesGlob
in the tsconfig.json.
Install
Use npm
to install this package.
Locally:
npm install tsconfig-lint --save-dev
or, Globally:
npm install -g tsconfig-lint --save-dev
Usage
You can use this library as either a CLI or in a node script. It follows a similar format to the atom-typescript plugin:
- You provide a path to a directory containing a tsconfig.json file
- You can also provide the full path to a
.json
file that contains anexclude
,files
orfilesGlob
property along with your tslint rules.
- You specify an
exclude
,files
, orfilesGlob
pattern in your tsconfig.json - You specify a
lintOptions
property in your tsconfig.json that contains your tslint rules.
- If you do not specify
lintOptions
, the default tslint rules will be used
You can also put your tslint rules in a separate file. By default, tsconfig-lint will look for tslint.json
(you can override the name if needed).
If the file is found, then:
- the rules defined in it will be used
- lintOptions will be ignored
Using the CLI
tsconfig-lint .
Options
-c, --config The name of the tslint configuration file;
Using with Node
;lintundefined,;
Options
Realistic Node Usage
;lint,;
Default Rules
The default rules (found in the tsconfig.json) are below:
"rules":