UNPKG

1.09 kBMarkdownView Raw
1# tslint loader for webpack
2
3## Usage
4
5Apply the tslint loader as pre/postLoader in your webpack configuration:
6
7``` javascript
8module.exports = {
9 module: {
10 preLoaders: [
11 {
12 test: /\.ts$/,
13 loader: "tslint"
14 }
15 ]
16 },
17 // more options in the optional tslint object
18 tslint: {
19 configuration: {
20 rules: {
21 quotemark: [true, "double"]
22 }
23 },
24
25 // tslint errors are displayed by default as warnings
26 // set emitErrors to true to display them as errors
27 emitErrors: false,
28
29 // tslint does not interrupt the compilation by default
30 // if you want any file with tslint errors to fail
31 // set failOnHint to true
32 failOnHint: true,
33
34 // name of your formatter (optional)
35 formatter: "yourformatter",
36
37 // path to directory contating formatter (optional)
38 formattersDirectory: "node_modules/tslint-loader/formatters/"
39 }
40}
41```
42## Installation
43
44``` shell
45npm install tslint-loader --save-dev
46```
47
48## License
49
50MIT (http://www.opensource.org/licenses/mit-license.php)
51
52