Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuartzhang/eslint-plugin-stzhang
A group of ESLint plugin and presets for the minxing company.
https://github.com/stuartzhang/eslint-plugin-stzhang
Last synced: 16 days ago
JSON representation
A group of ESLint plugin and presets for the minxing company.
- Host: GitHub
- URL: https://github.com/stuartzhang/eslint-plugin-stzhang
- Owner: stuartZhang
- License: mit
- Created: 2018-01-05T23:07:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-14T06:53:09.000Z (over 1 year ago)
- Last Synced: 2024-12-03T01:05:36.259Z (21 days ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-stzhang2
A group of ESLint plugin and presets for the stzhang2 company.
# Setup
1. Global tools
1. `npm install -g yo`
1. `npm install -g generator-eslint`
1. Generate the eslint-plugin skeleton
1. `yo eslint:plugin`
1. Generate the eslint-rules skeleton
1. `yo eslint:rule`
# References
1. https://medium.com/@btegelund/creating-an-eslint-plugin-87f1cb42767f
1. https://www.kenneth-truyers.net/2016/05/27/writing-custom-eslint-rules/## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```Next, install `eslint-plugin-stzhang2`:
```
$ npm install eslint-plugin-stzhang2 --save-dev
```**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eeslint-plugin-stzhang2` globally.
## Usage
Add `stzhang2` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"stzhang2"
]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"stzhang2/arrow-parens": ["error", "as-needed"],
"stzhang2/generator-star-spacing": ["error", "before"],
"stzhang2/no-array-concat": ["error"],
"stzhang2/no-string-charcode": ["error"],
"stzhang2/no-util-format": ["error"],
"stzhang2/require-yield": 2,
"stzhang2/no-console": 2
}
}
```## Supported Rules
* Fill in provided rules here