</salt>'s ESLint rules for all your course linting needs. 🧂 A ruleset based on Airbnb's JavaScript Style Guide.
This module is distributed via npm which is bundled with node and
should be installed as one of your project's devDependencies
:
npm install --save-dev eslint-config-salt
Then add the extends to your .eslintrc
:
{
"extends": "salt",
"rules": {
// your overrides
}
}
This config also exposes a few other configs that will be used throughout the duration of the course.
For vanilla JavaScript in the beginning of the course:
{
"extends": "salt/vanilla"
}
The config for React are created as additions. Use the the following config:
{
"extends": ["salt", "salt/react"]
}
And for the config in case you are using React Hooks:
{
"extends": ["salt", "salt/react", "salt/react/hooks"]
}
This version has a hack to combat a bug in the airbnb
-rules. See this.
The hack is found in the package.json
and ensure that we're using older versions of eslint-config-airbnb
and eslint-config-airbnb-–base
.
Once the fix is published we'll update too.