Skip to content

Commit

Permalink
feat: deprecate multiline-comment-style & line-comment-position
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed May 9, 2024
1 parent 04e7c6e commit 96e3cbd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
26 changes: 12 additions & 14 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 @@ -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
4 changes: 4 additions & 0 deletions 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
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 96e3cbd

Please sign in to comment.