Skip to content

Commit 840f3a9

Browse files
authored
docs: add info how to use with tslint (ReactiveX#22)
1 parent 186ab4d commit 840f3a9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,30 @@ For an Angular CLI project the invocation of `rxjs-5-to-6-migrate` will be:
2828
rxjs-5-to-6-migrate -p src/tsconfig.app.json
2929
```
3030

31+
## Use rules
32+
33+
To use the exported rules without `rxjs-5-to-6-migrate`, use the `rulesDirectory` configuration property of `tslint.json`:
34+
35+
```json
36+
{
37+
"rulesDirectory": [
38+
"node_modules/rxjs-tslint"
39+
],
40+
"rules": {
41+
"rxjs-collapse-imports": true,
42+
"rxjs-pipeable-operators-only": true,
43+
"rxjs-no-static-observable-methods": true,
44+
"rxjs-proper-imports": true
45+
}
46+
}
47+
```
48+
49+
To lint your project use:
50+
51+
```
52+
./node_modules/.bin/tslint -c tslint.json -p tsconfig.json
53+
```
54+
3155
### Notes
3256

3357
* Once you run all the migrations check the diff and make sure that everything looks as expected. These fixers cover almost all cases we know of, but it's possible that some manual fixes can be required.

0 commit comments

Comments
 (0)