Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

incloud/eslint-config-incloud

Repository files navigation

eslint-config-incloud

  1. 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
  2. Create a Prettier config as described here.

  3. Create .eslintrc.js with the following content:

    • Node:
      module.exports = {
        extends: ['incloud'],
        env: {
          node: true,
        },
      };
    • React:
      module.exports = {
        extends: ['incloud/react'],
      };
      You probably want to run eslint with --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.