Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.35 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.35 KB

The Lune Climate shared ESLint configuration

Developing the shared configuration

Using the configuration in a project

  1. Add the @lune-climate/eslint-config dependency to your project
yarn add --dev git+https://github.com/lune-climate/eslint-config.git#master
  1. Make sure your package.json is in the right shape.

    • The dependencies that our eslint-config declares should not be present in your package.json.
    • You have to provide the peerDependencies that we expect.
  2. Adapt your .eslintrc or equivalent:

    a. Remove configuration that is already provided by this shared configuration. b. One exception to the above is parser and parserOptions. 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 to extends, like:

    extends: ["@lune-climate"],