Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 9, 2024
1 parent 3c163ae commit 3725fa8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rules/no-array-push-push.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const {hasSideEffect, isCommaToken, isSemicolonToken} = require('@eslint-community/eslint-utils');
const {hasSideEffect, isSemicolonToken} = require('@eslint-community/eslint-utils');
const {
getCallExpressionTokens,
getCallExpressionArgumentsText,
Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function fixRequireCall(node, sourceCode) {

const {
openingParenthesisToken,
closingParenthesisToken
closingParenthesisToken,
} = getCallExpressionTokens(sourceCode, requireCall);
yield fixer.remove(openingParenthesisToken);
yield fixer.remove(closingParenthesisToken);
Expand Down
5 changes: 2 additions & 3 deletions rules/utils/get-call-expression-arguments-text.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
const getCallExpressionTokens = require('./get-call-expression-tokens.js');
const {isOpeningParenToken} = require('@eslint-community/eslint-utils');

/** @typedef {import('estree').CallExpression} CallExpression */

Expand All @@ -15,13 +14,13 @@ Get the text of the arguments list of `CallExpression`.
function getCallExpressionArgumentsText(sourceCode, callExpression) {
const {
openingParenthesisToken,
closingParenthesisToken
closingParenthesisToken,
} = getCallExpressionTokens(sourceCode, callExpression);

return sourceCode.text.slice(
openingParenthesisToken.range[1],
closingParenthesisToken.range[0],
);
};
}

module.exports = getCallExpressionArgumentsText;
2 changes: 1 addition & 1 deletion rules/utils/get-call-expression-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getCallExpressionTokens(sourceCode, callExpression) {
openingParenthesisToken,
closingParenthesisToken,
trailingCommaToken,
}
};
}

module.exports = getCallExpressionTokens;

0 comments on commit 3725fa8

Please sign in to comment.