6.0.1 • Published 5 years ago

eslint-config-oniyi v6.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

JavaScript Style Guide based on airbnb/base

This style guide is based on the airbnb/base javascript style for node.js development. Also, some customizations are inspired by Roman Krejčík's article. In addition, this package ships with ava eslint rules for **/*.test.js files

Best Practices

callback-return: [2, ['callback', 'next']]

Force developers to return when they call a callback function. This is following RisingStack's recommendations on Node.js Best Practices

handle-callback-err: [2, '^.*(e|E)rr']

Always check for errors in callbacks - to round-up the callback convention

Style

max-len [1, 120, 2, {ignoreComments: true}]

Sometimes, a rule in the editor is just not enough. This rule raises a warning if a code line is longer than 120 characters (while comments are ignored)

Variables

no-use-before-define ['error', { functions: false, classes: true, variables: true }]

disallow use of variables and classes but not functions before they are defined.

Also see Risingstack's Post on clean code.

Usage

Our default export lints ES2016 and below, only requires eslint. Check node.green for your node's version compatibility with ES2016.

  1. npm install --save-dev eslint-config-oniyi eslint
  2. add "extends": "oniyi" to your .eslintrc.js
6.0.1

5 years ago

6.0.0

6 years ago

5.1.0

6 years ago

5.0.2

7 years ago

5.0.1

7 years ago

4.5.0

7 years ago

4.4.0

7 years ago

4.3.0

7 years ago

4.2.0

8 years ago

4.1.0

8 years ago

4.0.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago