Skip to content

Commit

Permalink
feat: deprecate multiline-comment-style & line-comment-position
Browse files Browse the repository at this point in the history
fixes #17681
  • Loading branch information
aladdin-add committed May 9, 2024
1 parent 0f5df50 commit 555a9a0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
28 changes: 13 additions & 15 deletions docs/src/_data/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,6 @@
"fixable": false,
"hasSuggestions": false
},
{
"name": "multiline-comment-style",
"description": "Enforce a particular style for multiline comments",
"recommended": false,
"fixable": true,
"hasSuggestions": false
},
{
"name": "new-cap",
"description": "Require constructor names to begin with a capital letter",
Expand Down Expand Up @@ -680,7 +673,7 @@
"description": "Disallow lexical declarations in case clauses",
"recommended": true,
"fixable": false,
"hasSuggestions": false
"hasSuggestions": true
},
{
"name": "no-console",
Expand Down Expand Up @@ -1384,13 +1377,6 @@
}
],
"layout": [
{
"name": "line-comment-position",
"description": "Enforce position of line comments",
"recommended": false,
"fixable": false,
"hasSuggestions": false
},
{
"name": "unicode-bom",
"description": "Require or disallow Unicode byte order mark (BOM)",
Expand Down Expand Up @@ -1567,6 +1553,12 @@
"fixable": true,
"hasSuggestions": false
},
{
"name": "line-comment-position",
"replacedBy": [],
"fixable": false,
"hasSuggestions": false
},
{
"name": "linebreak-style",
"replacedBy": [],
Expand Down Expand Up @@ -1605,6 +1597,12 @@
"fixable": false,
"hasSuggestions": false
},
{
"name": "multiline-comment-style",
"replacedBy": [],
"fixable": true,
"hasSuggestions": false
},
{
"name": "multiline-ternary",
"replacedBy": [],
Expand Down
7 changes: 6 additions & 1 deletion docs/src/_data/rules_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@
"fixable": "whitespace"
},
"line-comment-position": {
"deprecated": true,
"replacedBy": [],
"type": "layout",
"docs": {
"description": "Enforce position of line comments",
Expand Down Expand Up @@ -669,6 +671,8 @@
}
},
"multiline-comment-style": {
"deprecated": true,
"replacedBy": [],
"type": "suggestion",
"docs": {
"description": "Enforce a particular style for multiline comments",
Expand Down Expand Up @@ -810,7 +814,8 @@
"description": "Disallow lexical declarations in case clauses",
"recommended": true,
"url": "https://eslint.org/docs/latest/rules/no-case-declarations"
}
},
"hasSuggestions": true
},
"no-catch-shadow": {
"type": "suggestion",
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/line-comment-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 2 additions & 1 deletion lib/rules/multiline-comment-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "suggestion",

docs: {
description: "Enforce a particular style for multiline comments",
recommended: false,
Expand Down
2 changes: 0 additions & 2 deletions packages/js/src/configs/eslint-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ module.exports = Object.freeze({
"id-length": "error",
"id-match": "error",
"init-declarations": "error",
"line-comment-position": "error",
"logical-assignment-operators": "error",
"max-classes-per-file": "error",
"max-depth": "error",
Expand All @@ -53,7 +52,6 @@ module.exports = Object.freeze({
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "error",
"multiline-comment-style": "error",
"new-cap": "error",
"no-alert": "error",
"no-array-constructor": "error",
Expand Down

0 comments on commit 555a9a0

Please sign in to comment.