Pragmatic ESLint config for robust collaboration
- Exhaustive flat configs for ESLint v9+
- Distinct severities
- Error on potential bugs, ambiguities and unsafe/legacy constructs
- Warn about incompletions and unification opportunities
- Composable entry points
Install as a dev dependency:
pnpm add -D @kripod/eslint-config
Set up ESLint with predefined global variables:
// eslint.config.js
import baseConfig from "@kripod/eslint-config/base";
import typeCheckedConfig from "@kripod/eslint-config/type-checked";
import globals from "globals";
/** @type {import("eslint").Linter.Config[]} */
export default [
{ files: ["**/*.jsx", "**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"] },
...baseConfig,
...typeCheckedConfig,
{
languageOptions: {
globals: {
...globals.node,
},
},
},
];
If using TypeScript, enable strictNullChecks
e.g. via @total-typescript/tsconfig
or the strict
compiler option.
base
— JS + TS, no framework-specific rulestype-checked
— Typed linting via project service