cloderic / eslint-config-algolia

Algolia's ESLint config for all JavaScript projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-config-algolia

This is Algolia's ESLint configuration for es5 and es6.

We extend airbnb/javascript rules.

Usage

npm install eslint eslint-config-algolia eslint-plugin-algolia eslint-config-airbnb eslint-plugin-react babel-eslint --save-dev

create an .eslintrc file:

{
  "extends": "algolia"
}

Tips

If you are using any editors plugin for ESLint then it will show you warnings/errors.

Now you can create an npm lint script that will run eslint . to lint all files or eslint . --quiet to hide warnings.

Rules

The rules are the ones from the Airbnb JavaScript style guide with modifications:

Ignoring files

See "Ignoring Files and Directories" on ESLint website.

Using as a global eslint config

You can have a ~/.eslintrc config that will be used if your project has no .eslintrc.

Create a ~/.eslintrc with:

{
  "extends": "algolia"
}

Then:

cd ~
npm install eslint eslint-config-algolia eslint-config-airbnb eslint-plugin-react

About

Algolia's ESLint config for all JavaScript projects

License:MIT License


Languages

Language:JavaScript 84.9%Language:Shell 15.1%