Skip to content

DieSchittigs/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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++.

About

Our default ESLint configuration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published