eslint-config-xo-overrides
v1.5.0
Published
eslint+xo sharable config with some opinionated rule overrides
Downloads
259
Readme
eslint-config-xo-overrides
eslint+xo sharable config with some opinionated rule overrides
Overrides
Trailing commas in multiline objects and arrays
This makes diffs simpler.
Correct :+1: code:
const f fizz = {
blep: 'bloop',
};
Space around object and array literals
Cause it looks better.
Correct :+1: code:
const { curly } = foo;
const bar = [ square ];
No camelcase in property names
We still use objects as poor man's hashmaps.
Correct :+1: code:
const rates = {
eur_usd: 1,
};
Linebreak before the operator
IMO reads better. Also makes diffs simpler.
Correct :+1: code:
return user.email
|| user.phone
|| user.slug;
Other enabled rules
- unicorn/custom-error-definition - Enforce correct
Error
subclassing.
Usage
Installation:
yarn add --dev eslint-config-xo-overrides
yarn eslint-config-xo-overrides
or
npm install --save-dev eslint-config-xo-overrides
./node_modules/.bin/eslint-config-xo-overrides
This will install the package and add the following to your package.json
:
{
"xo": {
"extends": ["eslint-config-xo-overrides"]
}
}