npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-config-airbnb-standard

v3.1.0

Published

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

Downloads

10,952

Readme

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

If you want to install Airbnb config only, check this package:

ESLint + Airbnb : 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
Setup your IDE / Editor:

WebStorm

VSCode

Sublime Text 3

Atom

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 👍

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"]
  }
}

ESLint inside

You shouldn't add eslint to your dependencies. It's bundled with this package, just specify the path if you need. Here is an example for eslint-loader:

{
  loader: 'eslint-loader',
  options: {
    eslintPath: 'eslint-config-airbnb-standard/node_modules/eslint',
  }
},

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.8.1/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

VSCode

  1. Install this package globally (or locally)

  2. Go to: View -> Extension or press CTRL + SHIFT + X

  3. Search for ESLint extension, click it and press "Install" button

  4. Press "Reload" button or reopen the editor

  5. Go to: File -> Preferences -> Settings

    Add ESLint path to your workspace settings (do not use ~):

    {
      "eslint.nodePath": "/home/username/.nvm/versions/node/v10.5.0/lib/node_modules/eslint-config-airbnb-standard/node_modules/eslint",
    }

    Relative path for local installation:

    {
      "eslint.nodePath": "node_modules/eslint-config-airbnb-standard/node_modules/eslint",
    }
  6. Create .eslintrc.js file inside your working project root:

    process.chdir(__dirname);
    
    module.exports = {
      root: true,
      parser: 'babel-eslint',
      parserOptions: {
        allowImportExportEverywhere: true,
        codeFrame: false
      },
      extends: [
        'airbnb-standard',
      ],
    };

    VSCode errors

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

Atom

  1. Install this package globally

  2. Go to: Edit -> Preferences -> Install

  3. Install Linter

  4. Install linter-eslint

  5. Run:

    npm prefix -g

    ... copy the prefix path

  6. Go to: Preferences -> Packages -> linter-eslint -> Settings

    a) Check "Use global ESLint installation" option at the bottom

    b) Paste the prefix path to the field "Global Node Installation Path" and append:

    /lib/node_modules/eslint-config-airbnb-standard

    Example

  7. Create .eslintrc file inside your working project:

    {
      "extends": ["airbnb-standard"]
    }
  8. Press Ctrl + Shift + P -> enter "lint" -> click "Linter:Lint"