Skip to content

Commit

Permalink
feat!: Remove valid-jsdoc and require-jsdoc (#17694)
Browse files Browse the repository at this point in the history
* feat!: Remove valid-jsdoc

Fixes #15820

* Update rule index page

* Remove references to valid-jsdoc

* Remove reference to valid-jsdoc

* Remove reference to plugin rules

* Remove require-jsdoc

* Add require-jsdoc to the removed list

* Add back docs and add note about removal

* Add period

* Remove test files

* Update tests/lib/eslint/flat-eslint.js

Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>

---------

Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
  • Loading branch information
nzakas and mdjermanovic committed Dec 21, 2023
1 parent 595a1f6 commit bdd6ba1
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 3,224 deletions.
4 changes: 3 additions & 1 deletion conf/rule-type-list.json
Expand Up @@ -23,6 +23,8 @@
{ "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
{ "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
{ "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
{ "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
{ "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] },
{ "removed": "valid-jsdoc", "replacedBy": [] },
{ "removed": "require-jsdoc", "replacedBy": [] }
]
}
4 changes: 2 additions & 2 deletions docs/src/_data/rules.json
Expand Up @@ -652,7 +652,7 @@
"description": "Disallow `Array` constructors",
"recommended": false,
"fixable": false,
"hasSuggestions": true
"hasSuggestions": false
},
{
"name": "no-bitwise",
Expand Down Expand Up @@ -680,7 +680,7 @@
"description": "Disallow the use of `console`",
"recommended": false,
"fixable": false,
"hasSuggestions": true
"hasSuggestions": false
},
{
"name": "no-continue",
Expand Down
21 changes: 0 additions & 21 deletions docs/src/_data/rules_meta.json
Expand Up @@ -2371,16 +2371,6 @@
"url": "https://eslint.org/docs/latest/rules/require-await"
}
},
"require-jsdoc": {
"type": "suggestion",
"docs": {
"description": "Require JSDoc comments",
"recommended": false,
"url": "https://eslint.org/docs/latest/rules/require-jsdoc"
},
"deprecated": true,
"replacedBy": []
},
"require-unicode-regexp": {
"type": "suggestion",
"docs": {
Expand Down Expand Up @@ -2602,17 +2592,6 @@
"url": "https://eslint.org/docs/latest/rules/use-isnan"
}
},
"valid-jsdoc": {
"type": "suggestion",
"docs": {
"description": "Enforce valid JSDoc comments",
"recommended": false,
"url": "https://eslint.org/docs/latest/rules/valid-jsdoc"
},
"fixable": "code",
"deprecated": true,
"replacedBy": []
},
"valid-typeof": {
"type": "problem",
"docs": {
Expand Down
5 changes: 3 additions & 2 deletions docs/src/rules/require-jsdoc.md
Expand Up @@ -5,8 +5,9 @@ related_rules:
- valid-jsdoc
---


This rule was [**deprecated**](https://eslint.org/blog/2018/11/jsdoc-end-of-life) in ESLint v5.10.0.
:::important
This rule was removed in ESLint v9.0.0 and replaced by the [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) equivalent.
:::

[JSDoc](http://usejsdoc.org) is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/rules/valid-jsdoc.md
Expand Up @@ -7,9 +7,9 @@ further_reading:
- https://jsdoc.app
---



This rule was [**deprecated**](https://eslint.org/blog/2018/11/jsdoc-end-of-life) in ESLint v5.10.0.
:::important
This rule was removed in ESLint v9.0.0 and replaced by the [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) equivalent.
:::

[JSDoc](http://usejsdoc.org) generates application programming interface (API) documentation from specially-formatted comments in JavaScript code. For example, this is a JSDoc comment for a function:

Expand Down
6 changes: 4 additions & 2 deletions docs/src/use/rule-deprecation.md
Expand Up @@ -7,10 +7,12 @@ Balancing the trade-offs of improving a tool and the frustration these changes c

The ESLint team is committed to making upgrading as easy and painless as possible. To that end, the team has agreed upon the following set of guidelines for deprecating rules in the future. The goal of these guidelines is to allow for improvements and changes to be made without breaking existing configurations.

* Rules will never be removed from ESLint.
* Rules will never be removed from ESLint unless one of the following is true:
* The rule has been replaced by another core rule.
* A plugin exists with a functionally equivalent rule.
* Rules will be deprecated as needed, and marked as such in all documentation.
* After a rule has been deprecated, the team will no longer do any work on it. This includes bug fixes, enhancements, and updates to the rule's documentation. Issues and pull requests related to deprecated rule will not be accepted and will be closed.

Since deprecated rules will never be removed, you can continue to use them indefinitely if they are working for you. However, keep in mind that deprecated rules will effectively be unmaintained.
You can continue to use deprecated rules indefinitely if they are working for you. However, keep in mind that deprecated rules will effectively be unmaintained and may be removed at some point.

We hope that by following these guidelines we will be able to continue improving and working to make ESLint the best tool it can be while causing as little disruption to our users as possible during the process.
2 changes: 0 additions & 2 deletions lib/rules/index.js
Expand Up @@ -273,7 +273,6 @@ module.exports = new LazyLoadingRuleMap(Object.entries({
radix: () => require("./radix"),
"require-atomic-updates": () => require("./require-atomic-updates"),
"require-await": () => require("./require-await"),
"require-jsdoc": () => require("./require-jsdoc"),
"require-unicode-regexp": () => require("./require-unicode-regexp"),
"require-yield": () => require("./require-yield"),
"rest-spread-spacing": () => require("./rest-spread-spacing"),
Expand All @@ -296,7 +295,6 @@ module.exports = new LazyLoadingRuleMap(Object.entries({
"template-tag-spacing": () => require("./template-tag-spacing"),
"unicode-bom": () => require("./unicode-bom"),
"use-isnan": () => require("./use-isnan"),
"valid-jsdoc": () => require("./valid-jsdoc"),
"valid-typeof": () => require("./valid-typeof"),
"vars-on-top": () => require("./vars-on-top"),
"wrap-iife": () => require("./wrap-iife"),
Expand Down
122 changes: 0 additions & 122 deletions lib/rules/require-jsdoc.js

This file was deleted.

0 comments on commit bdd6ba1

Please sign in to comment.