@hz-9/eslint-config-airbnb
Less than 1 minute
@hz-9/eslint-config-airbnb
A eslint config for 'hz-9' (JavaScript).
Installation
To install the @hz-9/eslint-config-airbnb package, run the following command:
npm install @hz-9/eslint-config-airbnb --save-devUsage
This package provides both Legacy eslintrc and Flat config formats.
Legacy (eslintrc)
Add the following code to your .eslintrc.js file:
module.exports = {
extends: [
'@hz-9/eslint-config-airbnb'
],
}Available sub-path exports:
| Export | Description |
|---|---|
@hz-9/eslint-config-airbnb (or ./index) | airbnb-base + hz-9 rules |
@hz-9/eslint-config-airbnb/airbnb-base | airbnb-base rules only |
@hz-9/eslint-config-airbnb/airbnb-prettier | airbnb-base + prettier rules |
Flat Config (ESLint >= 9.x)
Add the following code to your eslint.config.js file:
const airbnbConfig = require('@hz-9/eslint-config-airbnb/flat')
module.exports = [
...airbnbConfig,
]Available sub-path exports:
| Export | Description |
|---|---|
@hz-9/eslint-config-airbnb/flat | airbnb-base + prettier + hz-9 rules |
@hz-9/eslint-config-airbnb/flat/airbnb-base | airbnb-base rules only |
@hz-9/eslint-config-airbnb/flat/airbnb-prettier | airbnb-base + prettier rules |
After that, you can run the ESLint fix command to automatically fix linting issues:
eslint --fix .