Skip to content

Commit

Permalink
fix(eslint-plugin): update new rules from master (#3840)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored and bradzacher committed Oct 11, 2021
1 parent b34fb7e commit d88a6b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
Expand Up @@ -28,6 +28,7 @@ export default util.createRule<
requiresTypeChecking: true,
},
fixable: 'code',
hasSuggestions: true,
messages: {
meaninglessVoidOperator:
"void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored",
Expand Down
33 changes: 17 additions & 16 deletions packages/eslint-plugin/src/rules/padding-line-between-statements.ts
Expand Up @@ -107,7 +107,7 @@ function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject {

/**
* Skips a chain expression node
* @paramnode The node to test
* @param node The node to test
* @returnsA non-chain expression
* @private
*/
Expand All @@ -119,7 +119,7 @@ function skipChainExpression(node: TSESTree.Node): TSESTree.Node {

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

/**
* Checks the given node is a CommonJS require statement
* @paramnode The node to check.
* @param node The node to check.
* @returns `true` if the node is a CommonJS require statement.
* @private
*/
Expand All @@ -169,7 +169,7 @@ function isCJSRequire(node: TSESTree.Node): boolean {
* Checks whether the given node is a block-like statement.
* This checks the last token of the node is the closing brace of a block.
* @param sourceCode The source code to get tokens.
* @paramnode The node to check.
* @param node The node to check.
* @returns `true` if the node is a block-like statement.
* @private
*/
Expand Down Expand Up @@ -209,7 +209,7 @@ function isBlockLikeStatement(

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

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

/**
* Checks the given node is a CommonJS export statement
* @paramnode The node to check.
* @param node The node to check.
* @returns `true` if the node is a CommonJS export statement.
* @private
*/
Expand Down Expand Up @@ -287,7 +287,7 @@ function isCJSExport(node: TSESTree.Node): boolean {

/**
* Check whether the given node is an expression
* @paramnode The node to check.
* @param node The node to check.
* @param sourceCode The source code object to get tokens.
* @returns `true` if the node is an expression
*/
Expand All @@ -310,7 +310,7 @@ function isExpression(
* foo()
* ;[1, 2, 3].forEach(bar)
* @param sourceCode The source code to get tokens.
* @paramnode The node to get.
* @param node The node to get.
* @returns The actual last token.
* @private
*/
Expand Down Expand Up @@ -364,8 +364,8 @@ function verifyForAny(): void {
* However, if comments exist between 2 blank lines, it does not remove those
* blank lines automatically.
* @param context The rule context to report.
* @param_ Unused. The previous node to check.
* @paramnextNode The next node to check.
* @param _ Unused. The previous node to check.
* @param nextNode The next node to check.
* @param paddingLines The array of token pairs that blank
* lines exist between the pair.
*
Expand Down Expand Up @@ -409,8 +409,8 @@ function verifyForNever(
* If the `prevNode` has trailing comments, it inserts a blank line after the
* trailing comments.
* @param context The rule context to report.
* @paramprevNode The previous node to check.
* @paramnextNode The next node to check.
* @param prevNode The previous node to check.
* @param nextNode The next node to check.
* @param paddingLines The array of token pairs that blank
* lines exist between the pair.
*
Expand Down Expand Up @@ -565,6 +565,7 @@ export default util.createRule<Options, MessageIds>({
extendsBaseRule: true,
},
fixable: 'whitespace',
hasSuggestions: true,
schema: {
definitions: {
paddingType: {
Expand Down Expand Up @@ -639,7 +640,7 @@ export default util.createRule<Options, MessageIds>({

/**
* Checks whether the given node matches the given type.
* @paramnode The statement node to check.
* @param node The statement node to check.
* @param type The statement type to check.
* @returns `true` if the statement node matched the type.
* @private
Expand Down Expand Up @@ -714,7 +715,7 @@ export default util.createRule<Options, MessageIds>({

/**
* Verify padding lines between the given node and the previous node.
* @paramnode The node to verify.
* @param node The node to verify.
*
* @private
*/
Expand Down Expand Up @@ -749,7 +750,7 @@ export default util.createRule<Options, MessageIds>({
/**
* Verify padding lines between the given node and the previous node.
* Then process to enter to new scope.
* @paramnode The node to verify.
* @param node The node to verify.
*
* @private
*/
Expand Down

0 comments on commit d88a6b4

Please sign in to comment.