Socket
Socket
Sign inDemoInstall

eslint-config-airbnb-standard

Package Overview
Dependencies
10
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-airbnb-standard

Airbnb's JS ESLint config + JS Standard Style + semicolons


Version published
Weekly downloads
3.7K
decreased by-33.7%
Maintainers
1
Install size
21.4 MB
Created
Weekly downloads
 

Readme

Source

Airbnb+ JavaScript Standard Style

ESLint Airbnb Standard JS logo

ESLint on steroids (extends "airbnb" + "standard" configs). Global installation!

NPM Version NPM Downloads GitHub issues Telegram Tweet

It uses original Airbnb Style config extended with JavaScript Standard Style config (with semicolons).

See airbnb/javascript and standardjs for more information. Compare configs.

Another package

- Use another package if you want the original Airbnb config only

ESlint + Airbnb (nothing extra) : eslint-config-airbnb-bundle

Installation

Install it globally:

npm install --global eslint-config-airbnb-standard

You can install it locally as well:

npm install --save-dev eslint-config-airbnb-standard

Usage

You can now run feature packed eslint from any directory:

eslint -v

Create .eslintrc file in your project. Setup your IDE / Editor. And be smart!

ES6, ES7, React, JSX, async/await - all new features supported by default 👍

Sublime Text 3

  1. Install this package globally

  2. Go to: Preferences -> Package Control -> install package

  3. Install SublimeLinter

  4. Install SublimeLinter-contrib-eslint

  5. Run:

    npm bin -g
    

    ... and copy the path

  6. Go to: Tools -> SublimeLinter -> Open User Settings

    Paste the path to NodeJS installation folder inside "paths" for your OS and save:

    "paths": {
        "linux": [
            "~/.nvm/versions/node/v8.1.2/bin"
        ],
        "osx": [],
        "windows": ["%AppData%\\npm"]
    },
    
  7. Create .eslintrc file inside your working project:

    {
      "extends": ["airbnb-standard"]
    }
    
  8. Restart Sublime Text

  9. Go to Tools -> SublimeLinter -> Lint this view

  10. You can switch to squiggly underline mark style from Tools. Have fun!

Example

WebStorm

File ➤ Settings / Default Settings ➤ Languages and Frameworks ➤ JavaScript ➤ Code Quality Tools ➤ ESLint

ESLint settings

Global installation in not necessary for WebStorm, but it is handy for the "Default Settings".

Custom Config

Add your own rules to the .eslintrc file in your project folder. For example, you can turn off semicolons (semi -> "never"):

{
  "extends": ["airbnb-standard"],
  "rules": {
    "semi": ["error", "never"]
  }
}

I want that Sublime Text

You can setup full featured nice black Sublime Text 3 from this repo: sublime-text-3-settings

Keywords

FAQs

Last updated on 10 Oct 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc