Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/othree/eslint-config-othree-style
semistandard + trailing comma on multiline
https://github.com/othree/eslint-config-othree-style
eslint eslint-config
Last synced: about 1 month ago
JSON representation
semistandard + trailing comma on multiline
- Host: GitHub
- URL: https://github.com/othree/eslint-config-othree-style
- Owner: othree
- License: unlicense
- Created: 2017-04-24T06:54:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T02:30:51.000Z (about 6 years ago)
- Last Synced: 2024-10-06T22:18:52.207Z (about 1 month ago)
- Topics: eslint, eslint-config
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-othree-style
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-othree-style
* [semistandard][] + [trailing comma][comma-dangle] on multiline
* [eslint-plugin-no-parameter-e][]
* [eslint-plugin-pep8-blank-lines][]## Why
I love standardjs and semistandard. But I really want trailing comma.
Trailing Comma is not allowed in old JavaScript implementations.
But for a long list with tailing comma is easier to maintain.It's easier to modify a list since every element are in the same format.
Reduce the chance produces bug when copy element from old code.Also, minifier can strip trailing commas, so don't worry about old browsers.
## Other Rules
My custom rules:
* [eslint-plugin-no-parameter-e][].
* [eslint-plugin-pep8-blank-lines][]## Usage
Because deps are based on peerDependency. We need to install all eslin config ourself.
```sh
npm install --save-dev \
eslint-config-othree-style \
eslint-config-standard \
eslint-plugin-standard \
eslint-plugin-promise \
eslint-plugin-import \
eslint-plugin-node \
eslint-plugin-no-parameter-e \
eslint-plugin-pep8-blank-lines
```Add this to esling config:
```json
{
"extends": "othree-style"
}
```[semistandard]:https://github.com/Flet/semistandard
[comma-dangle]:https://eslint.org/docs/rules/comma-dangle
[eslint-plugin-no-parameter-e]:https://github.com/othree/eslint-plugin-no-parameter-e
[eslint-plugin-pep8-blank-lines]:https://github.com/othree/eslint-plugin-pep8-blank-lines