Getting Started
Install the plugin:
npm install --save-dev eslint-plugin-write-good-comments-2
Enable one preset in your Flat Config:
import writeGoodComments from "eslint-plugin-write-good-comments-2";
export default [writeGoodComments.configs.recommended];
Alternative: manual scoped setup
If you prefer to apply the plugin inside your own file-scoped config object, spread the preset rules manually.
import writeGoodComments from "eslint-plugin-write-good-comments-2";
export default [
{
files: ["src/**/*.{ts,tsx,js,jsx}"],
plugins: {
"write-good-comments": writeGoodComments,
},
rules: {
...writeGoodComments.configs.recommended.rules,
},
},
];
Recommended rollout
- Start with
recommended. - Fix noisy prose comments, inclusive-language reports, and bare TODO-style task comments in small batches.
- Use per-rule options to disable individual
write-goodchecks, tune retext-based language filters, or customize thetask-comment-formatmarkers when a team has strong local conventions. - Switch to
allwhen you also want stricter extras such asno-profane-comments,spellcheck-comments, andreadability-comments.