Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f487ee7

Browse files
fix(eslint-plugin): update new rules from master (typescript-eslint#3840)
1 parent 390e1f6 commit f487ee7

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default util.createRule<
2828
requiresTypeChecking: true,
2929
},
3030
fixable: 'code',
31+
hasSuggestions: true,
3132
messages: {
3233
meaninglessVoidOperator:
3334
"void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored",

packages/eslint-plugin/src/rules/padding-line-between-statements.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject {
107107

108108
/**
109109
* Skips a chain expression node
110-
* @paramnode The node to test
110+
* @param node The node to test
111111
* @returnsA non-chain expression
112112
* @private
113113
*/
@@ -119,7 +119,7 @@ function skipChainExpression(node: TSESTree.Node): TSESTree.Node {
119119

120120
/**
121121
* Checks the given node is an expression statement of IIFE.
122-
* @paramnode The node to check.
122+
* @param node The node to check.
123123
* @returns `true` if the node is an expression statement of IIFE.
124124
* @private
125125
*/
@@ -142,7 +142,7 @@ function isIIFEStatement(node: TSESTree.Node): boolean {
142142

143143
/**
144144
* Checks the given node is a CommonJS require statement
145-
* @paramnode The node to check.
145+
* @param node The node to check.
146146
* @returns `true` if the node is a CommonJS require statement.
147147
* @private
148148
*/
@@ -169,7 +169,7 @@ function isCJSRequire(node: TSESTree.Node): boolean {
169169
* Checks whether the given node is a block-like statement.
170170
* This checks the last token of the node is the closing brace of a block.
171171
* @param sourceCode The source code to get tokens.
172-
* @paramnode The node to check.
172+
* @param node The node to check.
173173
* @returns `true` if the node is a block-like statement.
174174
* @private
175175
*/
@@ -209,7 +209,7 @@ function isBlockLikeStatement(
209209

210210
/**
211211
* Check whether the given node is a directive or not.
212-
* @paramnode The node to check.
212+
* @param node The node to check.
213213
* @param sourceCode The source code object to get tokens.
214214
* @returns `true` if the node is a directive.
215215
*/
@@ -230,7 +230,7 @@ function isDirective(
230230

231231
/**
232232
* Check whether the given node is a part of directive prologue or not.
233-
* @paramnode The node to check.
233+
* @param node The node to check.
234234
* @param sourceCode The source code object to get tokens.
235235
* @returns `true` if the node is a part of directive prologue.
236236
*/
@@ -259,7 +259,7 @@ function isDirectivePrologue(
259259

260260
/**
261261
* Checks the given node is a CommonJS export statement
262-
* @paramnode The node to check.
262+
* @param node The node to check.
263263
* @returns `true` if the node is a CommonJS export statement.
264264
* @private
265265
*/
@@ -287,7 +287,7 @@ function isCJSExport(node: TSESTree.Node): boolean {
287287

288288
/**
289289
* Check whether the given node is an expression
290-
* @paramnode The node to check.
290+
* @param node The node to check.
291291
* @param sourceCode The source code object to get tokens.
292292
* @returns `true` if the node is an expression
293293
*/
@@ -310,7 +310,7 @@ function isExpression(
310310
* foo()
311311
* ;[1, 2, 3].forEach(bar)
312312
* @param sourceCode The source code to get tokens.
313-
* @paramnode The node to get.
313+
* @param node The node to get.
314314
* @returns The actual last token.
315315
* @private
316316
*/
@@ -364,8 +364,8 @@ function verifyForAny(): void {
364364
* However, if comments exist between 2 blank lines, it does not remove those
365365
* blank lines automatically.
366366
* @param context The rule context to report.
367-
* @param_ Unused. The previous node to check.
368-
* @paramnextNode The next node to check.
367+
* @param _ Unused. The previous node to check.
368+
* @param nextNode The next node to check.
369369
* @param paddingLines The array of token pairs that blank
370370
* lines exist between the pair.
371371
*
@@ -409,8 +409,8 @@ function verifyForNever(
409409
* If the `prevNode` has trailing comments, it inserts a blank line after the
410410
* trailing comments.
411411
* @param context The rule context to report.
412-
* @paramprevNode The previous node to check.
413-
* @paramnextNode The next node to check.
412+
* @param prevNode The previous node to check.
413+
* @param nextNode The next node to check.
414414
* @param paddingLines The array of token pairs that blank
415415
* lines exist between the pair.
416416
*
@@ -565,6 +565,7 @@ export default util.createRule<Options, MessageIds>({
565565
extendsBaseRule: true,
566566
},
567567
fixable: 'whitespace',
568+
hasSuggestions: true,
568569
schema: {
569570
definitions: {
570571
paddingType: {
@@ -639,7 +640,7 @@ export default util.createRule<Options, MessageIds>({
639640

640641
/**
641642
* Checks whether the given node matches the given type.
642-
* @paramnode The statement node to check.
643+
* @param node The statement node to check.
643644
* @param type The statement type to check.
644645
* @returns `true` if the statement node matched the type.
645646
* @private
@@ -714,7 +715,7 @@ export default util.createRule<Options, MessageIds>({
714715

715716
/**
716717
* Verify padding lines between the given node and the previous node.
717-
* @paramnode The node to verify.
718+
* @param node The node to verify.
718719
*
719720
* @private
720721
*/
@@ -748,7 +749,7 @@ export default util.createRule<Options, MessageIds>({
748749
/**
749750
* Verify padding lines between the given node and the previous node.
750751
* Then process to enter to new scope.
751-
* @paramnode The node to verify.
752+
* @param node The node to verify.
752753
*
753754
* @private
754755
*/

0 commit comments

Comments
 (0)