Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuartzhang/eslint-plugin-amo
ESLint presets for the AMO company
https://github.com/stuartzhang/eslint-plugin-amo
Last synced: 16 days ago
JSON representation
ESLint presets for the AMO company
- Host: GitHub
- URL: https://github.com/stuartzhang/eslint-plugin-amo
- Owner: stuartZhang
- License: mit
- Created: 2017-12-05T15:27:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-30T06:20:12.000Z (over 6 years ago)
- Last Synced: 2024-11-15T21:42:42.297Z (about 1 month ago)
- Language: JavaScript
- Size: 57.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-stzhang
A group of ESLint plugin and presets for the AMO 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-stzhang`:
```
$ npm install eslint-plugin-stzhang --save-dev
```**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-stzhang` globally.
## Usage
Add `stzhang` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"stzhang"
]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"stzhang/arrow-parens": ["error", "as-needed"],
"stzhang/generator-star-spacing": ["error", "before"],
"stzhang/no-array-concat": ["error"],
"stzhang/no-string-charcode": ["error"],
"stzhang/no-util-format": ["error"],
"stzhang/require-yield": 2,
"stzhang/no-console": 2
}
}
```## Supported Rules
* Fill in provided rules here