Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch recommended to errors, and from recommended-error to recommended-warn? #1176

Open
JoshuaKGoldberg opened this issue Dec 29, 2023 · 1 comment

Comments

@JoshuaKGoldberg
Copy link
Contributor

Motivation

To my knowledge, eslint-plugin-jsdoc's recommended and recommended-typescript preset configs are the only popular ones in the ESLint community whose default severities are set to "warn" instead of "error". That means this is the only plugin whose config extends values mention severity.

(I haven't used other shared configs from this plugin, but the same thoughts apply to them)

For example, in create-typescript-app, .ts files receive the equivalent of:

extends: [
	"eslint:recommended",
	"plugin:eslint-comments/recommended",
	"plugin:n/recommended",
	"plugin:perfectionist/recommended-natural",
	"plugin:regexp/recommended",
	"plugin:vitest/recommended",
	"plugin:jsdoc/recommended-typescript-error",
	"plugin:@typescript-eslint/strict-type-checked",
	"plugin:@typescript-eslint/stylistic-type-checked",
]

Current behavior

  • plugin:jsdoc/recommended and plugin:jsdoc/recommended-typescript set rules to "warn" severity
  • plugin:jsdoc/recommended-error and plugin:jsdoc/recommended-typescript-error set rules to "error" severity

Desired behavior

As a breaking change in a new major version:

  • Switch plugin:jsdoc/recommended and plugin:jsdoc/recommended-typescript to "error" severity
  • Mark plugin:jsdoc/recommended-error and plugin:jsdoc/recommended-typescript-error as @deprecated
  • Create new plugin:jsdoc/recommended-warn and plugin:jsdoc/recommended-typescript-warn configs that set rules to "warn" severity

Alternatives considered

Keep things as they are, I suppose?

@brettz9
Copy link
Collaborator

brettz9 commented Dec 31, 2023

Any thoughts, @gajus ? Parity might be nice, but eslint-plugin-jsdoc may be different from other plugins in not being critical enough to the average project to have as errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants