eslint-config-slalom
v1.2.1
Published
an eslint config designed to work with prettier
Downloads
4
Maintainers
Readme
eslint-config-slalom ⛷️
An eslint config built with prettier in mind, heavily based off of eslint-config-xo.
Install
yarn add eslint-config-slalom --dev
Usage
In package.json
{
"name": "my-project",
"eslintConfig": {
"extends": "slalom"
}
}
Or in .eslintrc
{
"extends": "slalom"
}
Why another eslint config?
I wanted an eslint config to fit the following criteria:
- doesn't require me to install multiple eslint plugins (e.g.
eslint-config-airbnb
) - doesn't require me to have unnecessary / unneeded plugins just to turn things off (e.g.
eslint-config-prettier
) - had a minimal, clean, but reasonable ruleset that enforces readable code (which is why this is based off of
xo
) - ...but also doesn't have extra/separate configs or plugins to extend certain rules (e.g.
xo/react
,xo/space
, etc.) - reaches code-quality rules and leaves formatting to Prettier
This config:
- contains no rules that conflict with Prettier, nor stylistic rules you can set to your liking with Prettier
- does not require any other eslint config or plugin
- focuses on readable code and code-quality rules
- covers react and next-generation javascript
Recommended configuration
I use this with eslint-plugin-prettier
to set formatting rules. I also recommend eslint-plugin-unicorn
which checks a nice set of rules.
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": ["slalom"],
"plugins": ["prettier", "react", "unicorn"],
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"semi": false
}
]
}
}