eslint-config-salt

</salt>'s ESLint rules

Usage no npm install needed!

<script type="module">
  import eslintConfigSalt from 'https://cdn.skypack.dev/eslint-config-salt';
</script>

README

eslint-config-salt

</salt>'s ESLint rules for all your course linting needs. 🧂 A ruleset based on Airbnb's JavaScript Style Guide.


version downloads ISC License

Table of Contents

Installation

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

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

LICENSE

ISC