Skip to content

An ESLint config, for individual projects (based on Airbnb ESLint, forked from OKGrow code style guide).

License

Notifications You must be signed in to change notification settings

eatdrinkhealthy/eslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Code Style

Based on AirBnB ESLint, and forked from OKGrow code style guide.

Linting

Every new project should contain a .eslintrc.json file in its root.

As technologies and coding styles advance with time, each individual project can be updated with a simple refresh of .eslintrc.json if appropriate. This will stop old projects lighting up like a christmas tree, and still enforce good coding style.

We will stay as close to the AirBnB style guide as possible as it has quickly become an industry standard with ~36k stars on GitHub.

Installation & Setup

We will use the official AirBnB eslint config.

Install the eslint and airbnb specific modules to the project itself (not global).

The default eslint-config-airbnb export contains all of the AirBnB ESLint rules, including ECMAScript 6+ and React. It requires eslint, eslint-plugin-import, eslint-plugin-react, eslint-plugin-jsx-a11y.

To ensure all correct versions are installed, run:

(
  export PKG=eslint-config-airbnb;
  npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"
)

Copy the latest .eslintrc.json to your project root:

curl -O https://raw.githubusercontent.com/eatdrinkhealthy/eslint/master/.eslintrc.json

Rule File Versions

Typically changes in rules are versioned for ease of reference. Versions of eslint rule files can be seen on the releases page.

NOTE: to see a brief description of the rule changes for each version,
click on the ellipsis adjacent to the version number

About

An ESLint config, for individual projects (based on Airbnb ESLint, forked from OKGrow code style guide).

Resources

License

Stars

Watchers

Forks

Packages

No packages published