Skip to main content

words

Disallow vague or weak wording in comments.

Targeted pattern scope

This rule targets source-code comments.

What this rule reports

This rule reports weak, vague, or overly wordy phrasing in comments.

Why this rule exists

Ambiguous comment language reduces maintainability and leaves intent unclear.

❌ Incorrect

// this probably works
const value = 1;

✅ Correct

// this works for positive integers
const value = 1;

Behavior and migration notes

This rule forwards options and behavior to write-good-comments/write-good-comments.

Additional examples

// It should probably maybe work for most inputs.
// ❌ likely reported by write-good-comments checks

// Handles positive integers and returns false for negative values.
// ✅ clearer and more precise

ESLint flat config example

import etcMisc from "eslint-plugin-etc-misc";

export default [
{
plugins: { "etc-misc": etcMisc },
rules: {
"etc-misc/words": "error",
},
},
];

When not to use it

Disable this rule if your team does not want prose-quality checks for comments.

Package documentation

Rule catalog ID: R079

Further reading

Adoption resources

  • Start at warning level in CI, then move to error after cleanup.
  • Use focused codemods/autofix batches per package or directory.