eslint-plugin-jest 27.1.2 → 27.1.4

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 (112) hide show
  1. package/README.md +81 -80
  2. package/docs/rules/consistent-test-it.md +4 -11
  3. package/docs/rules/expect-expect.md +3 -4
  4. package/docs/rules/max-expects.md +1 -5
  5. package/docs/rules/max-nested-describe.md +1 -5
  6. package/docs/rules/no-alias-methods.md +8 -10
  7. package/docs/rules/no-commented-out-tests.md +3 -4
  8. package/docs/rules/no-conditional-expect.md +4 -5
  9. package/docs/rules/no-conditional-in-test.md +1 -5
  10. package/docs/rules/no-deprecated-functions.md +5 -7
  11. package/docs/rules/no-disabled-tests.md +3 -4
  12. package/docs/rules/no-done-callback.md +6 -8
  13. package/docs/rules/no-duplicate-hooks.md +1 -5
  14. package/docs/rules/no-export.md +3 -4
  15. package/docs/rules/no-focused-tests.md +5 -7
  16. package/docs/rules/no-hooks.md +1 -5
  17. package/docs/rules/no-identical-title.md +3 -4
  18. package/docs/rules/no-if.md +2 -2
  19. package/docs/rules/no-interpolation-in-snapshots.md +3 -4
  20. package/docs/rules/no-jasmine-globals.md +6 -8
  21. package/docs/rules/no-large-snapshots.md +2 -6
  22. package/docs/rules/no-mocks-import.md +3 -4
  23. package/docs/rules/no-restricted-jest-methods.md +1 -5
  24. package/docs/rules/no-restricted-matchers.md +1 -5
  25. package/docs/rules/no-standalone-expect.md +3 -4
  26. package/docs/rules/no-test-prefixes.md +6 -8
  27. package/docs/rules/no-test-return-statement.md +1 -5
  28. package/docs/rules/prefer-called-with.md +1 -5
  29. package/docs/rules/prefer-comparison-matcher.md +3 -8
  30. package/docs/rules/prefer-each.md +1 -5
  31. package/docs/rules/prefer-equality-matcher.md +3 -8
  32. package/docs/rules/prefer-expect-assertions.md +3 -10
  33. package/docs/rules/prefer-expect-resolves.md +3 -8
  34. package/docs/rules/prefer-hooks-in-order.md +1 -5
  35. package/docs/rules/prefer-hooks-on-top.md +1 -5
  36. package/docs/rules/prefer-lowercase-title.md +3 -8
  37. package/docs/rules/prefer-mock-promise-shorthand.md +3 -8
  38. package/docs/rules/prefer-snapshot-hint.md +1 -5
  39. package/docs/rules/prefer-spy-on.md +3 -10
  40. package/docs/rules/prefer-strict-equal.md +3 -10
  41. package/docs/rules/prefer-to-be.md +5 -7
  42. package/docs/rules/prefer-to-contain.md +5 -9
  43. package/docs/rules/prefer-to-have-length.md +5 -9
  44. package/docs/rules/prefer-todo.md +3 -10
  45. package/docs/rules/require-hook.md +1 -5
  46. package/docs/rules/require-to-throw-message.md +1 -7
  47. package/docs/rules/require-top-level-describe.md +1 -5
  48. package/docs/rules/unbound-method.md +2 -4
  49. package/docs/rules/valid-describe-callback.md +3 -4
  50. package/docs/rules/valid-expect-in-promise.md +4 -5
  51. package/docs/rules/valid-expect.md +3 -6
  52. package/docs/rules/valid-title.md +5 -7
  53. package/lib/index.js +8 -16
  54. package/lib/processors/snapshot-processor.js +3 -5
  55. package/lib/rules/consistent-test-it.js +1 -19
  56. package/lib/rules/expect-expect.js +0 -15
  57. package/lib/rules/max-expects.js +0 -16
  58. package/lib/rules/max-nested-describe.js +0 -13
  59. package/lib/rules/no-alias-methods.js +0 -9
  60. package/lib/rules/no-commented-out-tests.js +0 -10
  61. package/lib/rules/no-conditional-expect.js +1 -20
  62. package/lib/rules/no-conditional-in-test.js +0 -9
  63. package/lib/rules/no-deprecated-functions.js +2 -18
  64. package/lib/rules/no-disabled-tests.js +2 -18
  65. package/lib/rules/no-done-callback.js +2 -31
  66. package/lib/rules/no-duplicate-hooks.js +0 -12
  67. package/lib/rules/no-export.js +0 -12
  68. package/lib/rules/no-focused-tests.js +0 -15
  69. package/lib/rules/no-hooks.js +0 -7
  70. package/lib/rules/no-identical-title.js +0 -19
  71. package/lib/rules/no-if.js +0 -24
  72. package/lib/rules/no-interpolation-in-snapshots.js +0 -9
  73. package/lib/rules/no-jasmine-globals.js +0 -22
  74. package/lib/rules/no-large-snapshots.js +3 -21
  75. package/lib/rules/no-mocks-import.js +0 -12
  76. package/lib/rules/no-restricted-jest-methods.js +1 -11
  77. package/lib/rules/no-restricted-matchers.js +0 -11
  78. package/lib/rules/no-standalone-expect.js +7 -33
  79. package/lib/rules/no-test-prefixes.js +1 -13
  80. package/lib/rules/no-test-return-statement.js +0 -12
  81. package/lib/rules/prefer-called-with.js +0 -10
  82. package/lib/rules/prefer-comparison-matcher.js +8 -33
  83. package/lib/rules/prefer-each.js +0 -18
  84. package/lib/rules/prefer-equality-matcher.js +11 -23
  85. package/lib/rules/prefer-expect-assertions.js +4 -51
  86. package/lib/rules/prefer-expect-resolves.js +0 -12
  87. package/lib/rules/prefer-hooks-in-order.js +2 -16
  88. package/lib/rules/prefer-hooks-on-top.js +0 -9
  89. package/lib/rules/prefer-lowercase-title.js +0 -23
  90. package/lib/rules/prefer-mock-promise-shorthand.js +5 -26
  91. package/lib/rules/prefer-snapshot-hint.js +7 -31
  92. package/lib/rules/prefer-spy-on.js +0 -17
  93. package/lib/rules/prefer-strict-equal.js +0 -9
  94. package/lib/rules/prefer-to-be.js +1 -30
  95. package/lib/rules/prefer-to-contain.js +11 -21
  96. package/lib/rules/prefer-to-have-length.js +4 -16
  97. package/lib/rules/prefer-todo.js +2 -18
  98. package/lib/rules/require-hook.js +0 -22
  99. package/lib/rules/require-to-throw-message.js +0 -9
  100. package/lib/rules/require-top-level-describe.js +0 -15
  101. package/lib/rules/unbound-method.js +2 -21
  102. package/lib/rules/utils/accessors.js +6 -18
  103. package/lib/rules/utils/detectJestVersion.js +2 -7
  104. package/lib/rules/utils/followTypeAssertionChain.js +0 -4
  105. package/lib/rules/utils/index.js +0 -10
  106. package/lib/rules/utils/misc.js +2 -46
  107. package/lib/rules/utils/parseJestFnCall.js +62 -118
  108. package/lib/rules/valid-describe-callback.js +0 -17
  109. package/lib/rules/valid-expect-in-promise.js +27 -94
  110. package/lib/rules/valid-expect.js +5 -48
  111. package/lib/rules/valid-title.js +0 -33
  112. package/package.json +3 -2
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _utils = require("@typescript-eslint/utils");
9
-
10
8
  var _utils2 = require("./utils");
11
-
12
9
  /*
13
10
  * This implementation is ported from from eslint-plugin-jasmine.
14
11
  * MIT license, Tom Vincent.
@@ -25,52 +22,38 @@ const getPromiseCallExpressionNode = node => {
25
22
  if (node.type === _utils.AST_NODE_TYPES.ArrayExpression && node.parent && node.parent.type === _utils.AST_NODE_TYPES.CallExpression) {
26
23
  node = node.parent;
27
24
  }
28
-
29
25
  if (node.type === _utils.AST_NODE_TYPES.CallExpression && node.callee.type === _utils.AST_NODE_TYPES.MemberExpression && (0, _utils2.isSupportedAccessor)(node.callee.object, 'Promise') && node.parent) {
30
26
  return node;
31
27
  }
32
-
33
28
  return null;
34
29
  };
35
-
36
30
  const findPromiseCallExpressionNode = node => {
37
31
  var _node$parent;
38
-
39
32
  return (_node$parent = node.parent) !== null && _node$parent !== void 0 && _node$parent.parent && [_utils.AST_NODE_TYPES.CallExpression, _utils.AST_NODE_TYPES.ArrayExpression].includes(node.parent.type) ? getPromiseCallExpressionNode(node.parent) : null;
40
33
  };
41
-
42
34
  const getParentIfThenified = node => {
43
35
  var _node$parent2;
44
-
45
36
  const grandParentNode = (_node$parent2 = node.parent) === null || _node$parent2 === void 0 ? void 0 : _node$parent2.parent;
46
-
47
37
  if (grandParentNode && grandParentNode.type === _utils.AST_NODE_TYPES.CallExpression && grandParentNode.callee.type === _utils.AST_NODE_TYPES.MemberExpression && (0, _utils2.isSupportedAccessor)(grandParentNode.callee.property) && ['then', 'catch'].includes((0, _utils2.getAccessorValue)(grandParentNode.callee.property)) && grandParentNode.parent) {
48
38
  // Just in case `then`s are chained look one above.
49
39
  return getParentIfThenified(grandParentNode);
50
40
  }
51
-
52
41
  return node;
53
42
  };
54
-
55
43
  const isAcceptableReturnNode = (node, allowReturn) => {
56
44
  if (allowReturn && node.type === _utils.AST_NODE_TYPES.ReturnStatement) {
57
45
  return true;
58
46
  }
59
-
60
47
  if (node.type === _utils.AST_NODE_TYPES.ConditionalExpression && node.parent) {
61
48
  return isAcceptableReturnNode(node.parent, allowReturn);
62
49
  }
63
-
64
50
  return [_utils.AST_NODE_TYPES.ArrowFunctionExpression, _utils.AST_NODE_TYPES.AwaitExpression].includes(node.type);
65
51
  };
66
-
67
52
  const promiseArrayExceptionKey = ({
68
53
  start,
69
54
  end
70
55
  }) => `${start.line}:${start.column}-${end.line}:${end.column}`;
71
-
72
56
  const defaultAsyncMatchers = ['toReject', 'toResolve'];
73
-
74
57
  var _default = (0, _utils2.createRule)({
75
58
  name: __filename,
76
59
  meta: {
@@ -120,7 +103,6 @@ var _default = (0, _utils2.createRule)({
120
103
  minArgs: 1,
121
104
  maxArgs: 1
122
105
  }],
123
-
124
106
  create(context, [{
125
107
  alwaysAwait,
126
108
  asyncMatchers = defaultAsyncMatchers,
@@ -129,8 +111,8 @@ var _default = (0, _utils2.createRule)({
129
111
  }]) {
130
112
  // Context state
131
113
  const arrayExceptions = new Set();
132
-
133
114
  const pushPromiseArrayException = loc => arrayExceptions.add(promiseArrayExceptionKey(loc));
115
+
134
116
  /**
135
117
  * Promise method that accepts an array of promises,
136
118
  * (eg. Promise.all), will throw warnings for the each
@@ -138,37 +120,27 @@ var _default = (0, _utils2.createRule)({
138
120
  * multiple warnings, we check if there is a warning in
139
121
  * the given location.
140
122
  */
141
-
142
-
143
123
  const promiseArrayExceptionExists = loc => arrayExceptions.has(promiseArrayExceptionKey(loc));
144
-
145
124
  const findTopMostMemberExpression = node => {
146
125
  let topMostMemberExpression = node;
147
126
  let {
148
127
  parent
149
128
  } = node;
150
-
151
129
  while (parent) {
152
130
  if (parent.type !== _utils.AST_NODE_TYPES.MemberExpression) {
153
131
  break;
154
132
  }
155
-
156
133
  topMostMemberExpression = parent;
157
134
  parent = parent.parent;
158
135
  }
159
-
160
136
  return topMostMemberExpression;
161
137
  };
162
-
163
138
  return {
164
139
  CallExpression(node) {
165
140
  const jestFnCall = (0, _utils2.parseJestFnCallWithReason)(node, context);
166
-
167
141
  if (typeof jestFnCall === 'string') {
168
142
  var _node$parent3;
169
-
170
143
  const reportingNode = ((_node$parent3 = node.parent) === null || _node$parent3 === void 0 ? void 0 : _node$parent3.type) === _utils.AST_NODE_TYPES.MemberExpression ? findTopMostMemberExpression(node.parent).property : node;
171
-
172
144
  if (jestFnCall === 'matcher-not-found') {
173
145
  context.report({
174
146
  messageId: 'matcherNotFound',
@@ -176,14 +148,12 @@ var _default = (0, _utils2.createRule)({
176
148
  });
177
149
  return;
178
150
  }
179
-
180
151
  if (jestFnCall === 'matcher-not-called') {
181
152
  context.report({
182
153
  messageId: (0, _utils2.isSupportedAccessor)(reportingNode) && _utils2.ModifierName.hasOwnProperty((0, _utils2.getAccessorValue)(reportingNode)) ? 'matcherNotFound' : 'matcherNotCalled',
183
154
  node: reportingNode
184
155
  });
185
156
  }
186
-
187
157
  if (jestFnCall === 'modifier-unknown') {
188
158
  context.report({
189
159
  messageId: 'modifierUnknown',
@@ -191,20 +161,16 @@ var _default = (0, _utils2.createRule)({
191
161
  });
192
162
  return;
193
163
  }
194
-
195
164
  return;
196
165
  } else if ((jestFnCall === null || jestFnCall === void 0 ? void 0 : jestFnCall.type) !== 'expect') {
197
166
  return;
198
167
  }
199
-
200
168
  const {
201
169
  parent: expect
202
170
  } = jestFnCall.head.node;
203
-
204
171
  if ((expect === null || expect === void 0 ? void 0 : expect.type) !== _utils.AST_NODE_TYPES.CallExpression) {
205
172
  return;
206
173
  }
207
-
208
174
  if (expect.arguments.length < minArgs) {
209
175
  const expectLength = (0, _utils2.getAccessorValue)(jestFnCall.head.node).length;
210
176
  const loc = {
@@ -227,7 +193,6 @@ var _default = (0, _utils2.createRule)({
227
193
  loc
228
194
  });
229
195
  }
230
-
231
196
  if (expect.arguments.length > maxArgs) {
232
197
  const {
233
198
  start
@@ -252,13 +217,11 @@ var _default = (0, _utils2.createRule)({
252
217
  loc
253
218
  });
254
219
  }
255
-
256
220
  const {
257
221
  matcher
258
222
  } = jestFnCall;
259
223
  const parentNode = matcher.parent.parent;
260
224
  const shouldBeAwaited = jestFnCall.modifiers.some(nod => (0, _utils2.getAccessorValue)(nod) !== 'not') || asyncMatchers.includes((0, _utils2.getAccessorValue)(matcher));
261
-
262
225
  if (!(parentNode !== null && parentNode !== void 0 && parentNode.parent) || !shouldBeAwaited) {
263
226
  return;
264
227
  }
@@ -266,8 +229,6 @@ var _default = (0, _utils2.createRule)({
266
229
  * If parent node is an array expression, we'll report the warning,
267
230
  * for the array object, not for each individual assertion.
268
231
  */
269
-
270
-
271
232
  const isParentArrayExpression = parentNode.parent.type === _utils.AST_NODE_TYPES.ArrayExpression;
272
233
  const orReturned = alwaysAwait ? '' : ' or returned';
273
234
  /**
@@ -275,12 +236,12 @@ var _default = (0, _utils2.createRule)({
275
236
  * In that case our target CallExpression node is the one with
276
237
  * the last `then` or `catch` statement.
277
238
  */
278
-
279
239
  const targetNode = getParentIfThenified(parentNode);
280
240
  const finalNode = findPromiseCallExpressionNode(targetNode) || targetNode;
281
-
282
- if (finalNode.parent && // If node is not awaited or returned
283
- !isAcceptableReturnNode(finalNode.parent, !alwaysAwait) && // if we didn't warn user already
241
+ if (finalNode.parent &&
242
+ // If node is not awaited or returned
243
+ !isAcceptableReturnNode(finalNode.parent, !alwaysAwait) &&
244
+ // if we didn't warn user already
284
245
  !promiseArrayExceptionExists(finalNode.loc)) {
285
246
  context.report({
286
247
  loc: finalNode.loc,
@@ -290,16 +251,12 @@ var _default = (0, _utils2.createRule)({
290
251
  messageId: finalNode === targetNode ? 'asyncMustBeAwaited' : 'promisesWithAsyncAssertionsMustBeAwaited',
291
252
  node
292
253
  });
293
-
294
254
  if (isParentArrayExpression) {
295
255
  pushPromiseArrayException(finalNode.loc);
296
256
  }
297
257
  }
298
258
  }
299
-
300
259
  };
301
260
  }
302
-
303
261
  });
304
-
305
262
  exports.default = _default;
@@ -4,32 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _utils = require("@typescript-eslint/utils");
9
-
10
8
  var _utils2 = require("./utils");
11
-
12
9
  const trimFXprefix = word => ['f', 'x'].includes(word.charAt(0)) ? word.substr(1) : word;
13
-
14
10
  const doesBinaryExpressionContainStringNode = binaryExp => {
15
11
  if ((0, _utils2.isStringNode)(binaryExp.right)) {
16
12
  return true;
17
13
  }
18
-
19
14
  if (binaryExp.left.type === _utils.AST_NODE_TYPES.BinaryExpression) {
20
15
  return doesBinaryExpressionContainStringNode(binaryExp.left);
21
16
  }
22
-
23
17
  return (0, _utils2.isStringNode)(binaryExp.left);
24
18
  };
25
-
26
19
  const quoteStringValue = node => node.type === _utils.AST_NODE_TYPES.TemplateLiteral ? `\`${node.quasis[0].value.raw}\`` : node.raw;
27
-
28
20
  const compileMatcherPattern = matcherMaybeWithMessage => {
29
21
  const [matcher, message] = Array.isArray(matcherMaybeWithMessage) ? matcherMaybeWithMessage : [matcherMaybeWithMessage];
30
22
  return [new RegExp(matcher, 'u'), message];
31
23
  };
32
-
33
24
  const compileMatcherPatterns = matchers => {
34
25
  if (typeof matchers === 'string' || Array.isArray(matchers)) {
35
26
  const compiledMatcher = compileMatcherPattern(matchers);
@@ -39,14 +30,12 @@ const compileMatcherPatterns = matchers => {
39
30
  it: compiledMatcher
40
31
  };
41
32
  }
42
-
43
33
  return {
44
34
  describe: matchers.describe ? compileMatcherPattern(matchers.describe) : null,
45
35
  test: matchers.test ? compileMatcherPattern(matchers.test) : null,
46
36
  it: matchers.it ? compileMatcherPattern(matchers.it) : null
47
37
  };
48
38
  };
49
-
50
39
  const MatcherAndMessageSchema = {
51
40
  type: 'array',
52
41
  items: {
@@ -56,7 +45,6 @@ const MatcherAndMessageSchema = {
56
45
  maxItems: 2,
57
46
  additionalItems: false
58
47
  };
59
-
60
48
  var _default = (0, _utils2.createRule)({
61
49
  name: __filename,
62
50
  meta: {
@@ -116,7 +104,6 @@ var _default = (0, _utils2.createRule)({
116
104
  ignoreTypeOfDescribeName: false,
117
105
  disallowedWords: []
118
106
  }],
119
-
120
107
  create(context, [{
121
108
  ignoreTypeOfDescribeName,
122
109
  disallowedWords = [],
@@ -129,34 +116,26 @@ var _default = (0, _utils2.createRule)({
129
116
  return {
130
117
  CallExpression(node) {
131
118
  const jestFnCall = (0, _utils2.parseJestFnCall)(node, context);
132
-
133
119
  if ((jestFnCall === null || jestFnCall === void 0 ? void 0 : jestFnCall.type) !== 'describe' && (jestFnCall === null || jestFnCall === void 0 ? void 0 : jestFnCall.type) !== 'test') {
134
120
  return;
135
121
  }
136
-
137
122
  const [argument] = node.arguments;
138
-
139
123
  if (!argument) {
140
124
  return;
141
125
  }
142
-
143
126
  if (!(0, _utils2.isStringNode)(argument)) {
144
127
  if (argument.type === _utils.AST_NODE_TYPES.BinaryExpression && doesBinaryExpressionContainStringNode(argument)) {
145
128
  return;
146
129
  }
147
-
148
130
  if (argument.type !== _utils.AST_NODE_TYPES.TemplateLiteral && !(ignoreTypeOfDescribeName && jestFnCall.type === 'describe')) {
149
131
  context.report({
150
132
  messageId: 'titleMustBeString',
151
133
  loc: argument.loc
152
134
  });
153
135
  }
154
-
155
136
  return;
156
137
  }
157
-
158
138
  const title = (0, _utils2.getStringValue)(argument);
159
-
160
139
  if (!title) {
161
140
  context.report({
162
141
  messageId: 'emptyTitle',
@@ -167,10 +146,8 @@ var _default = (0, _utils2.createRule)({
167
146
  });
168
147
  return;
169
148
  }
170
-
171
149
  if (disallowedWords.length > 0) {
172
150
  const disallowedMatch = disallowedWordsRegexp.exec(title);
173
-
174
151
  if (disallowedMatch) {
175
152
  context.report({
176
153
  data: {
@@ -182,7 +159,6 @@ var _default = (0, _utils2.createRule)({
182
159
  return;
183
160
  }
184
161
  }
185
-
186
162
  if (title.trim().length !== title.length) {
187
163
  context.report({
188
164
  messageId: 'accidentalSpace',
@@ -190,10 +166,8 @@ var _default = (0, _utils2.createRule)({
190
166
  fix: fixer => [fixer.replaceTextRange(argument.range, quoteStringValue(argument).replace(/^([`'"]) +?/u, '$1').replace(/ +?([`'"])$/u, '$1'))]
191
167
  });
192
168
  }
193
-
194
169
  const unprefixedName = trimFXprefix(jestFnCall.name);
195
170
  const [firstWord] = title.split(' ');
196
-
197
171
  if (firstWord.toLowerCase() === unprefixedName) {
198
172
  context.report({
199
173
  messageId: 'duplicatePrefix',
@@ -201,10 +175,8 @@ var _default = (0, _utils2.createRule)({
201
175
  fix: fixer => [fixer.replaceTextRange(argument.range, quoteStringValue(argument).replace(/^([`'"]).+? /u, '$1'))]
202
176
  });
203
177
  }
204
-
205
178
  const jestFunctionName = unprefixedName;
206
179
  const [mustNotMatchPattern, mustNotMatchMessage] = mustNotMatchPatterns[jestFunctionName] ?? [];
207
-
208
180
  if (mustNotMatchPattern) {
209
181
  if (mustNotMatchPattern.test(title)) {
210
182
  context.report({
@@ -219,9 +191,7 @@ var _default = (0, _utils2.createRule)({
219
191
  return;
220
192
  }
221
193
  }
222
-
223
194
  const [mustMatchPattern, mustMatchMessage] = mustMatchPatterns[jestFunctionName] ?? [];
224
-
225
195
  if (mustMatchPattern) {
226
196
  if (!mustMatchPattern.test(title)) {
227
197
  context.report({
@@ -237,10 +207,7 @@ var _default = (0, _utils2.createRule)({
237
207
  }
238
208
  }
239
209
  }
240
-
241
210
  };
242
211
  }
243
-
244
212
  });
245
-
246
213
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest",
3
- "version": "27.1.2",
3
+ "version": "27.1.4",
4
4
  "description": "ESLint rules for Jest",
5
5
  "keywords": [
6
6
  "eslint",
@@ -29,7 +29,7 @@
29
29
  "prettier:write": "prettier --write 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
30
30
  "postpublish": "pinst --enable",
31
31
  "test": "jest",
32
- "tools:regenerate-docs": "ts-node -T tools/regenerate-docs",
32
+ "tools:regenerate-docs": "yarn prepack && eslint-doc-generator --ignore-config all --rule-doc-title-format desc-parens-name --rule-doc-section-include \"Rule details\" --rule-list-columns name,description,configsError,configsWarn,configsOff,fixable,hasSuggestions,deprecated --split-by meta.docs.requiresTypeChecking --url-configs \"https://github.com/jest-community/eslint-plugin-jest/blob/main/README.md#shareable-configurations\" && yarn prettier:write",
33
33
  "typecheck": "tsc -p ."
34
34
  },
35
35
  "commitlint": {
@@ -121,6 +121,7 @@
121
121
  "dedent": "^0.7.0",
122
122
  "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0",
123
123
  "eslint-config-prettier": "^8.3.0",
124
+ "eslint-doc-generator": "^0.19.0",
124
125
  "eslint-plugin-eslint-comments": "^3.1.2",
125
126
  "eslint-plugin-eslint-plugin": "^5.0.6",
126
127
  "eslint-plugin-import": "^2.25.1",