Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@doist/eslint-config

Doist1.3kMIT12.0.1TypeScript support: included

Doist global eslint config.

readme

@doist/eslint-config

Doist ESLint config.

Usage

Install

npm install --save-dev @doist/eslint-config

In .eslintrc

{
    // ...
    "extends": [
        // ...

        // Core set of rules, recommended for all projects.
        "@doist/eslint-config/recommended",

        // Additional rules requiring type information (recommended for TypeScript projects).
        "@doist/eslint-config/recommended-type-checked",

        // Additional rules for sorting/grouping import statements (optional)
        "@doist/eslint-config/simple-import-sort"

        // Recommended for projects using React.
        "@doist/eslint-config/react"
    ],

    // When using `recommended-type-checked`,
    // you need to link to `tsconfig.eslint.json` file (see section below) for the project.
    "parserOptions": {
        "project": "tsconfig.eslint.json"
    }
}

Configuring with type-checking

For type-based rules to work, project's tsconfig.json file needs to be specified in parserOptions.project. If you want to lint files not included in build, we recommend creating a separate tsconfig.eslint.json config and specifying it instead of the default one.

Release a new package

This project uses semantic versioning. A new version will be published to both npm and GitHub Package Registry when a new tag is pushed. Please make sure an entry is added to CHANGELOG.md.

git checkout main
npm version <major|minor|patch>
git push --follow-tags

changelog

12.0.1

  • Enable trusted publishing and npm provenance

12.0.0

  • Update eslint-plugin-react-hooks to v7.0.1

11.2.1

  • Update ESLint rule from @typescript-eslint/no-throw-literal to @typescript-eslint/only-throw-error

11.2.0

  • Add support for typescript-eslint v7 and 8

11.1.0

  • Add support for latest eslint-plugin-simple-import-sort v12

11.0.0

  • Update @doist/prettier-config to v4, and drops support for ESLint v7.

10.0.0

  • Update the @typescript-eslint/* dependencies to v6. This is a breaking change as it requires changing from recommended-requiring-type-checking to recommended-type-checked. This keeps the package inline with the @typescript-eslint team's naming.

9.0.0

  • This change sorts our side effects so that all external dependencies, including css, are imported before our own internal modules.

8.1.3

8.1.2

8.1.1

  • Recommend gettext-literal-arg, import-file-naming and static-path-literal-arg from eslint-plugin-doist.

8.0.1

  • Allow expressions for react/jsx-no-useless-fragment (#120)

8.0.0

  • Restrict default and wildcard React imports (#119)

7.5.0

  • Nothing changed. Trying to fix deploy process.

7.4.0

  • Nothing changed. Trying to fix deploy process.

7.3.0

  • Nothing changed. Trying to fix deploy process.

7.2.0

  • Add support for eslint-plugin-simple-import-sort@8

7.1.2

  • Fixes to work with eslint-config-prettier 8.x.

7.1.1

  • Add support for Eslint 8 (#111)
  • Add @typescript-eslint/no-useless-constructor (#107)

7.1.0

  • Add optional configuration with eslint-plugin-simple-import-sort (#106)
  • Update most dependencies to current versions (#105)

7.0.0

  • Add rule no-useless-return (#101)
  • Ignore unused vars prefixed with _. (#99)

6.0.2

  • Publish to public npm registry.

6.0.1

  • Fix: move @typescript-eslint/no-implicit-any-catch to rule to recommended-requiring-type-checking config.

6.0.0

5.0.1

  • Fix: move no-throw-literal to rule to recommended-requiring-type-checking config.

5.0.0

4.0.0

3.0.0

2.0.0

  • First stable release.