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

@withdouble/eslint-config

Package Overview
Dependencies
Maintainers
8
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@withdouble/eslint-config

Double’s JavaScript Style

  • 3.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
82
decreased by-11.83%
Maintainers
8
Weekly downloads
 
Created
Source

@withdouble/eslint-config

Install

npm i -D @withdouble/eslint-config

Usage

Add this to your .eslintrc file:

{
  "extends": "@withdouble"
}

or in your package.json:

"eslintConfig": {
  "extends": "@withdouble"
}

Rules

Follows JavaScript Standard Style and Flowtype plugin recommended rules, with additions/exceptions:

  • Else/Catch/Finally statements must be on their own line after the preceding closing brace.

    eslint: brace-style

    // ✓ ok
    if (condition) {
      // ...
    }
    else {
      // ...
    }
    
    // ✗ avoid
    if (condition) {
      // ...
    } else {
      // ...
    }
    
  • Trailing commas on each line if multiline

    eslint: comma-dangle

      const him = {
        name: 'John',
        message: 'hello'   // ✗ avoid
      }
    
      const her = {
        name: 'Jane',
        message: 'hi',     // ✓ ok
      }
    
  • No var, use const or let instead

    eslint: no-var

      // ✗ avoid
      var him = 'John'
    
      // ✓ ok
      const her = 'Jane'
      let it = 'Rex'
    

FAQs

Package last updated on 01 Apr 2020

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