Skip to content

Commit

Permalink
Chore: rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
moeriki committed Jul 3, 2020
1 parent f5a28af commit a9f7474
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rules/no-magic-numbers.js
Expand Up @@ -101,7 +101,7 @@ module.exports = {
* @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node
* @returns {boolean} true if the number should be ignored
*/
function isIgnoredDefaultValue(fullNumberNode) {
function isDefaultValue(fullNumberNode) {
const parent = fullNumberNode.parent;

return parent.type === "AssignmentPattern" && parent.right === fullNumberNode;
Expand Down Expand Up @@ -198,7 +198,7 @@ module.exports = {
// Always allow radix arguments and JSX props
if (
isIgnoredValue(value) ||
(ignoreDefaultValues && isIgnoredDefaultValue(fullNumberNode)) ||
(ignoreDefaultValues && isDefaultValue(fullNumberNode)) ||
isParseIntRadix(fullNumberNode) ||
isJSXNumber(fullNumberNode) ||
(ignoreArrayIndexes && isArrayIndex(fullNumberNode, value))
Expand Down

0 comments on commit a9f7474

Please sign in to comment.