Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-oniyi

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-oniyi

JavaScript Style Guide based on airbnb/javascript base

  • 6.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-96.08%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 08 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc