- Follow https://eslint.org/docs/latest/extend/shareable-configs
- No need to publish to NPM, the configuration can be fetched via Git
- Add the
@lune-climate/eslint-config
dependency to your project
yarn add --dev git+https://github.com/lune-climate/eslint-config.git#master
-
Make sure your
package.json
is in the right shape. -
Adapt your
.eslintrc
or equivalent:a. Remove configuration that is already provided by this shared configuration. b. One exception to the above is
parser
andparserOptions
. You need to define them, for example:parser: "@typescript-eslint/parser", parserOptions: { ecmaVersion: 12, sourceType: "module", // These are needed for some of the typescript-eslint type-based linting rules like // no-unnecessary-condition. "tsconfigRootDir": __dirname, "project": ["./tsconfig.json"], },
c. Add
@lune-climate
toextends
, like:extends: ["@lune-climate"],