eslint 8.52.0 → 8.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +1 -1
  2. package/bin/eslint.js +24 -2
  3. package/lib/rules/array-bracket-newline.js +3 -0
  4. package/lib/rules/array-bracket-spacing.js +3 -0
  5. package/lib/rules/array-element-newline.js +3 -0
  6. package/lib/rules/arrow-parens.js +3 -0
  7. package/lib/rules/arrow-spacing.js +3 -0
  8. package/lib/rules/block-spacing.js +3 -0
  9. package/lib/rules/brace-style.js +3 -0
  10. package/lib/rules/comma-dangle.js +3 -0
  11. package/lib/rules/comma-spacing.js +3 -0
  12. package/lib/rules/comma-style.js +3 -0
  13. package/lib/rules/computed-property-spacing.js +3 -0
  14. package/lib/rules/dot-location.js +3 -0
  15. package/lib/rules/eol-last.js +3 -0
  16. package/lib/rules/func-call-spacing.js +3 -0
  17. package/lib/rules/function-call-argument-newline.js +3 -0
  18. package/lib/rules/function-paren-newline.js +3 -0
  19. package/lib/rules/generator-star-spacing.js +3 -0
  20. package/lib/rules/implicit-arrow-linebreak.js +3 -0
  21. package/lib/rules/indent.js +3 -0
  22. package/lib/rules/jsx-quotes.js +3 -0
  23. package/lib/rules/key-spacing.js +3 -0
  24. package/lib/rules/keyword-spacing.js +3 -0
  25. package/lib/rules/linebreak-style.js +3 -0
  26. package/lib/rules/lines-around-comment.js +3 -0
  27. package/lib/rules/lines-between-class-members.js +3 -0
  28. package/lib/rules/max-len.js +3 -0
  29. package/lib/rules/max-statements-per-line.js +3 -0
  30. package/lib/rules/multiline-ternary.js +3 -0
  31. package/lib/rules/new-parens.js +3 -0
  32. package/lib/rules/newline-per-chained-call.js +3 -0
  33. package/lib/rules/no-confusing-arrow.js +3 -0
  34. package/lib/rules/no-extra-parens.js +3 -0
  35. package/lib/rules/no-extra-semi.js +3 -0
  36. package/lib/rules/no-floating-decimal.js +3 -0
  37. package/lib/rules/no-mixed-operators.js +3 -0
  38. package/lib/rules/no-mixed-spaces-and-tabs.js +3 -0
  39. package/lib/rules/no-multi-spaces.js +3 -0
  40. package/lib/rules/no-multiple-empty-lines.js +3 -0
  41. package/lib/rules/no-object-constructor.js +2 -2
  42. package/lib/rules/no-prototype-builtins.js +90 -2
  43. package/lib/rules/no-tabs.js +3 -0
  44. package/lib/rules/no-trailing-spaces.js +3 -0
  45. package/lib/rules/no-whitespace-before-property.js +3 -0
  46. package/lib/rules/nonblock-statement-body-position.js +3 -0
  47. package/lib/rules/object-curly-newline.js +3 -0
  48. package/lib/rules/object-curly-spacing.js +3 -0
  49. package/lib/rules/object-property-newline.js +3 -0
  50. package/lib/rules/one-var-declaration-per-line.js +3 -0
  51. package/lib/rules/operator-linebreak.js +3 -0
  52. package/lib/rules/padded-blocks.js +3 -0
  53. package/lib/rules/padding-line-between-statements.js +3 -0
  54. package/lib/rules/quote-props.js +3 -0
  55. package/lib/rules/quotes.js +3 -0
  56. package/lib/rules/rest-spread-spacing.js +3 -0
  57. package/lib/rules/semi-spacing.js +3 -0
  58. package/lib/rules/semi-style.js +3 -0
  59. package/lib/rules/semi.js +3 -0
  60. package/lib/rules/space-before-blocks.js +3 -0
  61. package/lib/rules/space-before-function-paren.js +3 -0
  62. package/lib/rules/space-in-parens.js +3 -0
  63. package/lib/rules/space-infix-ops.js +3 -0
  64. package/lib/rules/space-unary-ops.js +3 -0
  65. package/lib/rules/spaced-comment.js +3 -0
  66. package/lib/rules/switch-colon-spacing.js +3 -0
  67. package/lib/rules/template-curly-spacing.js +3 -0
  68. package/lib/rules/template-tag-spacing.js +3 -0
  69. package/lib/rules/wrap-iife.js +3 -0
  70. package/lib/rules/wrap-regex.js +3 -0
  71. package/lib/rules/yield-star-spacing.js +3 -0
  72. package/package.json +3 -13
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to disallow mixed binary operators.
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -85,6 +86,8 @@ function getChildNode(node) {
85
86
  /** @type {import('../shared/types').Rule} */
86
87
  module.exports = {
87
88
  meta: {
89
+ deprecated: true,
90
+ replacedBy: [],
88
91
  type: "suggestion",
89
92
 
90
93
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Disallow mixed spaces and tabs for indentation
3
3
  * @author Jary Niebur
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -11,6 +12,8 @@
11
12
  /** @type {import('../shared/types').Rule} */
12
13
  module.exports = {
13
14
  meta: {
15
+ deprecated: true,
16
+ replacedBy: [],
14
17
  type: "layout",
15
18
 
16
19
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Disallow use of multiple spaces.
3
3
  * @author Nicholas C. Zakas
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
14
15
  /** @type {import('../shared/types').Rule} */
15
16
  module.exports = {
16
17
  meta: {
18
+ deprecated: true,
19
+ replacedBy: [],
17
20
  type: "layout",
18
21
 
19
22
  docs: {
@@ -2,6 +2,7 @@
2
2
  * @fileoverview Disallows multiple blank lines.
3
3
  * implementation adapted from the no-trailing-spaces rule.
4
4
  * @author Greg Cochard
5
+ * @deprecated in ESLint v8.53.0
5
6
  */
6
7
  "use strict";
7
8
 
@@ -12,6 +13,8 @@
12
13
  /** @type {import('../shared/types').Rule} */
13
14
  module.exports = {
14
15
  meta: {
16
+ deprecated: true,
17
+ replacedBy: [],
15
18
  type: "layout",
16
19
 
17
20
  docs: {
@@ -35,10 +35,10 @@ const NODE_TYPES_BY_KEYWORD = {
35
35
  };
36
36
 
37
37
  /*
38
- * Before an opening parenthesis, `>` (for JSX), and postfix `++` and `--` always trigger ASI;
38
+ * Before an opening parenthesis, postfix `++` and `--` always trigger ASI;
39
39
  * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement.
40
40
  */
41
- const PUNCTUATORS = new Set([":", ";", ">", "{", "=>", "++", "--"]);
41
+ const PUNCTUATORS = new Set([":", ";", "{", "=>", "++", "--"]);
42
42
 
43
43
  /*
44
44
  * Statements that can contain an `ExpressionStatement` after a closing parenthesis.
@@ -10,6 +10,37 @@
10
10
 
11
11
  const astUtils = require("./utils/ast-utils");
12
12
 
13
+ //------------------------------------------------------------------------------
14
+ // Helpers
15
+ //------------------------------------------------------------------------------
16
+
17
+ /**
18
+ * Returns true if the node or any of the objects
19
+ * to the left of it in the member/call chain is optional.
20
+ *
21
+ * e.g. `a?.b`, `a?.b.c`, `a?.()`, `a()?.()`
22
+ * @param {ASTNode} node The expression to check
23
+ * @returns {boolean} `true` if there is a short-circuiting optional `?.`
24
+ * in the same option chain to the left of this call or member expression,
25
+ * or the node itself is an optional call or member `?.`.
26
+ */
27
+ function isAfterOptional(node) {
28
+ let leftNode;
29
+
30
+ if (node.type === "MemberExpression") {
31
+ leftNode = node.object;
32
+ } else if (node.type === "CallExpression") {
33
+ leftNode = node.callee;
34
+ } else {
35
+ return false;
36
+ }
37
+ if (node.optional) {
38
+ return true;
39
+ }
40
+ return isAfterOptional(leftNode);
41
+ }
42
+
43
+
13
44
  //------------------------------------------------------------------------------
14
45
  // Rule Definition
15
46
  //------------------------------------------------------------------------------
@@ -25,10 +56,13 @@ module.exports = {
25
56
  url: "https://eslint.org/docs/latest/rules/no-prototype-builtins"
26
57
  },
27
58
 
59
+ hasSuggestions: true,
60
+
28
61
  schema: [],
29
62
 
30
63
  messages: {
31
- prototypeBuildIn: "Do not access Object.prototype method '{{prop}}' from target object."
64
+ prototypeBuildIn: "Do not access Object.prototype method '{{prop}}' from target object.",
65
+ callObjectPrototype: "Call Object.prototype.{{prop}} explicitly."
32
66
  }
33
67
  },
34
68
 
@@ -59,7 +93,61 @@ module.exports = {
59
93
  messageId: "prototypeBuildIn",
60
94
  loc: callee.property.loc,
61
95
  data: { prop: propName },
62
- node
96
+ node,
97
+ suggest: [
98
+ {
99
+ messageId: "callObjectPrototype",
100
+ data: { prop: propName },
101
+ fix(fixer) {
102
+ const sourceCode = context.sourceCode;
103
+
104
+ /*
105
+ * A call after an optional chain (e.g. a?.b.hasOwnProperty(c))
106
+ * must be fixed manually because the call can be short-circuited
107
+ */
108
+ if (isAfterOptional(node)) {
109
+ return null;
110
+ }
111
+
112
+ /*
113
+ * A call on a ChainExpression (e.g. (a?.hasOwnProperty)(c)) will trigger
114
+ * no-unsafe-optional-chaining which should be fixed before this suggestion
115
+ */
116
+ if (node.callee.type === "ChainExpression") {
117
+ return null;
118
+ }
119
+
120
+ const objectVariable = astUtils.getVariableByName(sourceCode.getScope(node), "Object");
121
+
122
+ /*
123
+ * We can't use Object if the global Object was shadowed,
124
+ * or Object does not exist in the global scope for some reason
125
+ */
126
+ if (!objectVariable || objectVariable.scope.type !== "global" || objectVariable.defs.length > 0) {
127
+ return null;
128
+ }
129
+
130
+ let objectText = sourceCode.getText(callee.object);
131
+
132
+ if (astUtils.getPrecedence(callee.object) <= astUtils.getPrecedence({ type: "SequenceExpression" })) {
133
+ objectText = `(${objectText})`;
134
+ }
135
+
136
+ const openParenToken = sourceCode.getTokenAfter(
137
+ node.callee,
138
+ astUtils.isOpeningParenToken
139
+ );
140
+ const isEmptyParameters = node.arguments.length === 0;
141
+ const delim = isEmptyParameters ? "" : ", ";
142
+ const fixes = [
143
+ fixer.replaceText(callee, `Object.prototype.${propName}.call`),
144
+ fixer.insertTextAfter(openParenToken, objectText + delim)
145
+ ];
146
+
147
+ return fixes;
148
+ }
149
+ }
150
+ ]
63
151
  });
64
152
  }
65
153
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to check for tabs inside a file
3
3
  * @author Gyandeep Singh
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -19,6 +20,8 @@ const anyNonWhitespaceRegex = /\S/u;
19
20
  /** @type {import('../shared/types').Rule} */
20
21
  module.exports = {
21
22
  meta: {
23
+ deprecated: true,
24
+ replacedBy: [],
22
25
  type: "layout",
23
26
 
24
27
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Disallow trailing spaces at the end of lines.
3
3
  * @author Nodeca Team <https://github.com/nodeca>
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
17
18
  /** @type {import('../shared/types').Rule} */
18
19
  module.exports = {
19
20
  meta: {
21
+ deprecated: true,
22
+ replacedBy: [],
20
23
  type: "layout",
21
24
 
22
25
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to disallow whitespace before properties
3
3
  * @author Kai Cataldo
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
17
18
  /** @type {import('../shared/types').Rule} */
18
19
  module.exports = {
19
20
  meta: {
21
+ deprecated: true,
22
+ replacedBy: [],
20
23
  type: "layout",
21
24
 
22
25
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview enforce the location of single-line statements
3
3
  * @author Teddy Katz
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -13,6 +14,8 @@ const POSITION_SCHEMA = { enum: ["beside", "below", "any"] };
13
14
  /** @type {import('../shared/types').Rule} */
14
15
  module.exports = {
15
16
  meta: {
17
+ deprecated: true,
18
+ replacedBy: [],
16
19
  type: "layout",
17
20
 
18
21
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to require or disallow line breaks inside braces.
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -147,6 +148,8 @@ function areLineBreaksRequired(node, options, first, last) {
147
148
  /** @type {import('../shared/types').Rule} */
148
149
  module.exports = {
149
150
  meta: {
151
+ deprecated: true,
152
+ replacedBy: [],
150
153
  type: "layout",
151
154
 
152
155
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Disallows or enforces spaces inside of object literals.
3
3
  * @author Jamund Ferguson
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
13
14
  /** @type {import('../shared/types').Rule} */
14
15
  module.exports = {
15
16
  meta: {
17
+ deprecated: true,
18
+ replacedBy: [],
16
19
  type: "layout",
17
20
 
18
21
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to enforce placing object properties on separate lines.
3
3
  * @author Vitor Balocco
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -12,6 +13,8 @@
12
13
  /** @type {import('../shared/types').Rule} */
13
14
  module.exports = {
14
15
  meta: {
16
+ deprecated: true,
17
+ replacedBy: [],
15
18
  type: "layout",
16
19
 
17
20
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to check multiple var declarations per line
3
3
  * @author Alberto Rodríguez
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -11,6 +12,8 @@
11
12
  /** @type {import('../shared/types').Rule} */
12
13
  module.exports = {
13
14
  meta: {
15
+ deprecated: true,
16
+ replacedBy: [],
14
17
  type: "suggestion",
15
18
 
16
19
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before
3
3
  * @author Benoît Zugmeyer
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
18
19
  /** @type {import('../shared/types').Rule} */
19
20
  module.exports = {
20
21
  meta: {
22
+ deprecated: true,
23
+ replacedBy: [],
21
24
  type: "layout",
22
25
 
23
26
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview A rule to ensure blank lines within blocks.
3
3
  * @author Mathias Schreck <https://github.com/lo1tuma>
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
18
19
  /** @type {import('../shared/types').Rule} */
19
20
  module.exports = {
20
21
  meta: {
22
+ deprecated: true,
23
+ replacedBy: [],
21
24
  type: "layout",
22
25
 
23
26
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to require or disallow newlines between statements
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -383,6 +384,8 @@ const StatementTypes = {
383
384
  /** @type {import('../shared/types').Rule} */
384
385
  module.exports = {
385
386
  meta: {
387
+ deprecated: true,
388
+ replacedBy: [],
386
389
  type: "layout",
387
390
 
388
391
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to flag non-quoted property names in object literals.
3
3
  * @author Mathias Bynens <http://mathiasbynens.be/>
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -19,6 +20,8 @@ const keywords = require("./utils/keywords");
19
20
  /** @type {import('../shared/types').Rule} */
20
21
  module.exports = {
21
22
  meta: {
23
+ deprecated: true,
24
+ replacedBy: [],
22
25
  type: "suggestion",
23
26
 
24
27
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview A rule to choose between single and double quote marks
3
3
  * @author Matt DuVall <http://www.mattduvall.com/>, Brandon Payton
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -77,6 +78,8 @@ const AVOID_ESCAPE = "avoid-escape";
77
78
  /** @type {import('../shared/types').Rule} */
78
79
  module.exports = {
79
80
  meta: {
81
+ deprecated: true,
82
+ replacedBy: [],
80
83
  type: "layout",
81
84
 
82
85
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Enforce spacing between rest and spread operators and their expressions.
3
3
  * @author Kai Cataldo
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -12,6 +13,8 @@
12
13
  /** @type {import('../shared/types').Rule} */
13
14
  module.exports = {
14
15
  meta: {
16
+ deprecated: true,
17
+ replacedBy: [],
15
18
  type: "layout",
16
19
 
17
20
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Validates spacing before and after semicolon
3
3
  * @author Mathias Schreck
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
14
15
  /** @type {import('../shared/types').Rule} */
15
16
  module.exports = {
16
17
  meta: {
18
+ deprecated: true,
19
+ replacedBy: [],
17
20
  type: "layout",
18
21
 
19
22
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to enforce location of semicolons.
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -70,6 +71,8 @@ function isLastChild(node) {
70
71
  /** @type {import('../shared/types').Rule} */
71
72
  module.exports = {
72
73
  meta: {
74
+ deprecated: true,
75
+ replacedBy: [],
73
76
  type: "layout",
74
77
 
75
78
  docs: {
package/lib/rules/semi.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to flag missing semicolons.
3
3
  * @author Nicholas C. Zakas
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
18
19
  /** @type {import('../shared/types').Rule} */
19
20
  module.exports = {
20
21
  meta: {
22
+ deprecated: true,
23
+ replacedBy: [],
21
24
  type: "layout",
22
25
 
23
26
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview A rule to ensure whitespace before blocks.
3
3
  * @author Mathias Schreck <https://github.com/lo1tuma>
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -37,6 +38,8 @@ function isFunctionBody(node) {
37
38
  /** @type {import('../shared/types').Rule} */
38
39
  module.exports = {
39
40
  meta: {
41
+ deprecated: true,
42
+ replacedBy: [],
40
43
  type: "layout",
41
44
 
42
45
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to validate spacing before function paren.
3
3
  * @author Mathias Schreck <https://github.com/lo1tuma>
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
17
18
  /** @type {import('../shared/types').Rule} */
18
19
  module.exports = {
19
20
  meta: {
21
+ deprecated: true,
22
+ replacedBy: [],
20
23
  type: "layout",
21
24
 
22
25
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Disallows or enforces spaces inside of parentheses.
3
3
  * @author Jonathan Rajavuori
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
13
14
  /** @type {import('../shared/types').Rule} */
14
15
  module.exports = {
15
16
  meta: {
17
+ deprecated: true,
18
+ replacedBy: [],
16
19
  type: "layout",
17
20
 
18
21
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Require spaces around infix operators
3
3
  * @author Michael Ficarra
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -13,6 +14,8 @@ const { isEqToken } = require("./utils/ast-utils");
13
14
  /** @type {import('../shared/types').Rule} */
14
15
  module.exports = {
15
16
  meta: {
17
+ deprecated: true,
18
+ replacedBy: [],
16
19
  type: "layout",
17
20
 
18
21
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview This rule should require or disallow spaces before or after unary operations.
3
3
  * @author Marcin Kumorek
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
17
18
  /** @type {import('../shared/types').Rule} */
18
19
  module.exports = {
19
20
  meta: {
21
+ deprecated: true,
22
+ replacedBy: [],
20
23
  type: "layout",
21
24
 
22
25
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Source code for spaced-comments rule
3
3
  * @author Gyandeep Singh
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
  "use strict";
6
7
 
@@ -149,6 +150,8 @@ function createNeverStylePattern(markers) {
149
150
  /** @type {import('../shared/types').Rule} */
150
151
  module.exports = {
151
152
  meta: {
153
+ deprecated: true,
154
+ replacedBy: [],
152
155
  type: "suggestion",
153
156
 
154
157
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to enforce spacing around colons of switch statements.
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
18
19
  /** @type {import('../shared/types').Rule} */
19
20
  module.exports = {
20
21
  meta: {
22
+ deprecated: true,
23
+ replacedBy: [],
21
24
  type: "layout",
22
25
 
23
26
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to enforce spacing around embedded expressions of template strings
3
3
  * @author Toru Nagashima
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
18
19
  /** @type {import('../shared/types').Rule} */
19
20
  module.exports = {
20
21
  meta: {
22
+ deprecated: true,
23
+ replacedBy: [],
21
24
  type: "layout",
22
25
 
23
26
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to check spacing between template tags and their literals
3
3
  * @author Jonathan Wilsson
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -12,6 +13,8 @@
12
13
  /** @type {import('../shared/types').Rule} */
13
14
  module.exports = {
14
15
  meta: {
16
+ deprecated: true,
17
+ replacedBy: [],
15
18
  type: "layout",
16
19
 
17
20
  docs: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Rule to flag when IIFE is not wrapped in parens
3
3
  * @author Ilya Volodin
4
+ * @deprecated in ESLint v8.53.0
4
5
  */
5
6
 
6
7
  "use strict";
@@ -40,6 +41,8 @@ function isCalleeOfNewExpression(node) {
40
41
  /** @type {import('../shared/types').Rule} */
41
42
  module.exports = {
42
43
  meta: {
44
+ deprecated: true,
45
+ replacedBy: [],
43
46
  type: "layout",
44
47
 
45
48
  docs: {