eslint-config-pretty-strict
A strict ESLint config.
Any style guide written in English is either so brief that it’s ambiguous, or so long that no one reads it.
—Bob Nystrom
This config provides reasonable ESLint rules to detect possible problems and suggest best practices. It includes all the recommended rules from @eslint/js and more.
Installing
npm install --save-dev eslint-config-pretty-strict eslint
Using
Import this config in your eslint.config.js file:
import prettyStrict from "eslint-config-pretty-strict";
export default [...prettyStrict];
Then, run ESLint via the command line interface with:
npx eslint .
npx eslint . --fix
Usually, you want to run ESLint from a "lint"
npm script, both locally and in CI.
You may want to install an ESLint plugin for your text editor, so that you can see and fix style problems directly in your editor.
Configuring
What if I don't agree with some rule?
You can configure ESLint settings and rules.
Sometimes, you may want to disable a rule only on some file or line of code by using configuration comments.