The default eslint configuration used by us at Die Schittigs.
We use airbnb-base
as our default configuration, but override some of its settings.
Code is indented by 4 spaces, not 2.
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 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;
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++
.