Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/not-an-aardvark/eslint-plugin-self
Allows ESLint plugins to lint themselves
https://github.com/not-an-aardvark/eslint-plugin-self
eslint eslint-plugin
Last synced: 11 days ago
JSON representation
Allows ESLint plugins to lint themselves
- Host: GitHub
- URL: https://github.com/not-an-aardvark/eslint-plugin-self
- Owner: not-an-aardvark
- License: mit
- Created: 2017-07-01T00:43:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T09:23:17.000Z (7 months ago)
- Last Synced: 2024-10-25T20:39:17.861Z (17 days ago)
- Topics: eslint, eslint-plugin
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 18
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# eslint-plugin-self
When writing an ESLint plugin, it's often useful to use the plugin's rules to lint the plugin's own codebase. You can use `eslint-plugin-self` to do that.
## Usage
```
npm install eslint-plugin-self --save-dev
```Note: `eslint-plugin-self` must be installed locally (it will not work if installed globally), and the project that installs it must be a functioning ESLint plugin.
Add the following to your config file:
```json
{
"plugins": [
"self"
]
}
```Then you can use your plugin's rules, with the `self/` prefix:
```json
{
"rules": {
"self/my-custom-rule": "error"
}
}
```You can also use your plugin's configs, or anything else exported by your plugin:
```json
{
"extends": [
"plugin:self/some-config"
]
}
```