@dieschittigs/eslint-config

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @dieschittigs/eslint-config

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

1.76 kB

Total Files

3

Last publish

Collaborators

  • padarom
  • saibotd