@dieschittigs/eslint-config
v0.1.0
Published
Our preferred ESLint configuration
Downloads
1
Readme
eslint-config
The default eslint configuration used by us at Die Schittigs.
Differences from airbnb-base
We use airbnb-base
as our default configuration, but override some of its settings.
Indentation
Code is indented by 4 spaces, not 2.
Trailing commas
Trailing commas in arrays are allowed, but not recommended and as such throw a warning:
const value = [
1,
2,
3, // This is valid, but throws a warning
];
Template strings
Template strings are preferred over string concatenation, but only warnings are thrown:
// Perfect
const url = `${protocol}://${host}/${query}`;
// Not ideal, but accepted
const url = protocol + '://' + host + '/' + query;
Infix and Suffix operators
The ++
and --
unary operators are often disallowed when semicolons are omitted, because they can lead to unexpected behavior. Since our code style requires semicolons, there is no reason to disallow syntax such as i++
.