Skip to content
eslint-config / 2.2.2

eslint-config 2.2.2

Install from the command line:
Learn more about npm packages
$ npm install @stegripe/eslint-config@2.2.2
Install via package.json:
"@stegripe/eslint-config": "2.2.2"

About this version

eslint-config

A forked ESLint shareable configuration that we used in our projects.

Install

npm install -D @stegripe/eslint-config # npm
pnpm add -D @stegripe/eslint-config # pnpm
yarn add -D @stegripe/eslint-config # yarn

This package has the required dependency installed automatically by peer dependencies by default on npm v7+, pnpm, or yarn. Install them manually if not.

Usage

This package requires ESLint Flat Configuration.

Available configurations (most relevant):

Configuration

Create an eslint.config.js file in the root of your project and add the following code:

Node.js with CJS
module.exports = (async () => {
    const { common, node, stylistic, ignores } = await import("@stegripe/eslint-config");

    return [...common, ...node, ...stylistic, ...ignores];
})();
Node.js with TypeScript
import { common, modules, node, stylistic, typescript, ignores } from "@stegripe/eslint-config";

export default [...common, ...modules, ...node, ...stylistic, ...typescript, ...ignores];
Node.js with ESM
import { common, modules, node, stylistic, ignores } from "@stegripe/eslint-config";

export default [...common, ...modules, ...node, ...stylistic, ...ignores];
Usage with Prettier
import { common, modules, node, prettier, ignores } from "@stegripe/eslint-config";

// Prettier must not be used with stylistic config, because it will conflict with each other.
export default [...common, ...modules, ...node, ...prettier, ...ignores];
Extending rules

Extending rules using the extend function is recommended.

import { common, extend, modules, node, stylistic, typescript, ignores } from "./index.js";

export default [...common, ...modules, ...node, ...stylistic, ...ignores, ...extend(typescript, [{
    rule: "typescript/no-unnecessary-condition",
    option: [
        "warn",
        {
            allowConstantLoopConditions: false
        }
    ]
    // or
    option: ["off"]
}])];

Details


Assets

  • eslint-config-2.2.2.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all