eslint-config-salt
</salt>'s ESLint rules for all your course linting needs. 🧂
A ruleset based on Airbnb's JavaScript Style Guideairbnb.!versionversion-badgepackage !downloadsdownloads-badgenpmtrends !ISC Licenselicense-badgelicense
Table of Contents
Installation
This module is distributed via npmnpm which is bundled with nodenode and should be installed as one of your project'sdevDependencies
:npm install --save-dev eslint-config-salt
Usage
Then add the extends to your.eslintrc
:{
"extends": "salt",
"rules": {
// your overrides
}
}
Other configs
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"
}
React configs
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"]
}
Comment on version 1.2.0
This version has a hack to combat a bug in theairbnb
-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.