40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
|
# eslint-utils
|
||
|
|
||
|
[](https://www.npmjs.com/package/eslint-utils)
|
||
|
[](http://www.npmtrends.com/eslint-utils)
|
||
|
[](https://travis-ci.org/mysticatea/eslint-utils)
|
||
|
[](https://codecov.io/gh/mysticatea/eslint-utils)
|
||
|
[](https://david-dm.org/mysticatea/eslint-utils)
|
||
|
|
||
|
## 🏁 Goal
|
||
|
|
||
|
This package provides utility functions and classes for make ESLint custom rules.
|
||
|
|
||
|
For examples:
|
||
|
|
||
|
- [getStaticValue](https://mysticatea.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
|
||
|
- [PatternMatcher](https://mysticatea.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class) finds a regular expression pattern as handling escape sequences.
|
||
|
- [ReferenceTracker](https://mysticatea.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
|
||
|
|
||
|
## 📖 Usage
|
||
|
|
||
|
See [documentation](https://mysticatea.github.io/eslint-utils/).
|
||
|
|
||
|
## 📰 Changelog
|
||
|
|
||
|
See [releases](https://github.com/mysticatea/eslint-utils/releases).
|
||
|
|
||
|
## ❤️ Contributing
|
||
|
|
||
|
Welcome contributing!
|
||
|
|
||
|
Please use GitHub's Issues/PRs.
|
||
|
|
||
|
### Development Tools
|
||
|
|
||
|
- `npm test` runs tests and measures coverage.
|
||
|
- `npm run clean` removes the coverage result of `npm test` command.
|
||
|
- `npm run coverage` shows the coverage result of the last `npm test` command.
|
||
|
- `npm run lint` runs ESLint.
|
||
|
- `npm run watch` runs tests on each file change.
|