-
Install the package:
-
Using npm:
npm i -D eslint-config-incloud
With npm < v7 you also need to manually install peer dependencies:
npx install-peerdeps -d eslint-config-incloud
-
Using yarn:
yarn add -D eslint-config-incloud npx install-peerdeps -d --yarn eslint-config-incloud
-
-
Create a Prettier config as described here.
-
Create
.eslintrc.js
with the following content:- Node:
module.exports = { extends: ['incloud'], env: { node: true, }, };
- React:
You probably want to run eslint with
module.exports = { extends: ['incloud/react'], };
--max-warnings 0
as many of the react-app rules we depend on are only warnings, which is not desirable when checking against them in CI.
- Node: