ESLint config used at Gorrion Software House
Install the packages using npm
(or yarn
or pnpm
)
npm install --save-dev eslint @gorrion/eslint-config eslint-plugin-import eslint-config-prettier
This will allow you to use the base package.
If you are using typescript
, install the following packages:
npm install --save-dev typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
Then add the extends to your .eslintrc.js
:
module.exports = {
extends: "@gorrion",
rules: {
// your overrides
},
};
This config also exposes a few other configs that I use often and pull in as needed.
You can use them standalone:
module.exports = {
extends: "@gorrion/eslint-config-<scope>",
};
Or in combination with the base config (recommended)
module.exports = {
extends: ["@gorrion", "@gorrion/eslint-config-<scope>"],
};
If you are using react
, install the following packages:
npm install --save-dev @gorrion/eslint-config-react eslint-plugin-react eslint-plugin-react-hooks
If you want to use jsx-a11y
config, install the following packages:
npm install --save-dev @gorrion/eslint-config-jsx-a11y eslint-plugin-jsx-a11y
If you want to use security
config, install the following packages:
npm install --save-dev @gorrion/eslint-config-security eslint-plugin-security
If you want to use jest
config, install the following packages:
npm install --save-dev @gorrion/eslint-config-jest eslint-plugin-jest
MIT