For js-only projects:
File: eslint.config.js (or eslint.config.mjs if you're in a project with
type "commonjs"):
import mocha from "@peggyjs/eslint-config/flat/mocha.js";
// Use commonjs if you're in an older project
import module from "@peggyjs/eslint-config/flat/module.js";
import ts from "@peggyjs/eslint-config/flat/ts.js";
export default [
...module,
...ts,
...mocha,
];If you include the ts config, you'll need to add dependencies:
npm install -D typescript typescript-eslintIf you include the mocha config, you'll need to add dependencies:
npm install -D eslint-plugin-mocha