Skip to content

Commit bafb885

Browse files
committed
docs(usage): updated documentation to reflect the breaking changes
1 parent 6a3abb2 commit bafb885

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The intended usage is as an npm script:
2727
{
2828
...
2929
"scripts": {
30-
"find-new-rules": "eslint-find-new-rules eslint-config-yourConfigName"
30+
"find-new-rules": "eslint-find-new-rules path/to/eslint-config"
3131
}
3232
...
3333
}
@@ -65,6 +65,27 @@ It will also default to the `main` in your `package.json`, so you can omit the a
6565
eslint-find-new-rules
6666
```
6767

68+
### As a `require`d module
69+
70+
```
71+
var getRuleFinder = require('./eslint-find-new-rules')
72+
var ruleFinder = getRuleFinder('path/to/eslint-config')
73+
74+
// default to the `main` in your `package.json`
75+
// var ruleFinder = getRuleFinder()
76+
77+
// get all the current, plugin, available and unused rules
78+
// without referring the extended files or documentation
79+
80+
ruleFinder.getCurrentRules()
81+
82+
ruleFinder.getPluginRules()
83+
84+
ruleFinder.getAllAvailableRules()
85+
86+
ruleFinder.getUnusedRules()
87+
```
88+
6889
## Contributors
6990

7091
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

0 commit comments

Comments
 (0)