Skip to content

Commit

Permalink
prefer-exponentiation-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 27, 2021
1 parent 8158403 commit 982aabd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/svg-sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ SVGSpriter.prototype._compile = function() {
this.info('Compiling %d shapes ...', masterShapes);

// Initialize the namespace powers
while (!this._namespacePow.length || Math.pow(26, this._namespacePow.length) < masterShapes) {
this._namespacePow.unshift(Math.pow(26, this._namespacePow.length));
while (!this._namespacePow.length || 26 ** this._namespacePow.length < masterShapes) {
this._namespacePow.unshift(26 ** this._namespacePow.length);
_.invoke(this._shapes, 'resetNamespace');
}

Expand Down
2 changes: 1 addition & 1 deletion lib/svg-sprite/mode/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ SVGSpriteCss.prototype._init = function() {
// Determine if this sprite accepts displaced shape copies
this._displaceable = [this.LAYOUT_VERTICAL, this.LAYOUT_HORIZONTAL].includes(this.config.layout);

this._precision = Number(this.config.svg.precision) >= 0 ? Math.pow(10, Number(this.config.svg.precision)) : null;
this._precision = Number(this.config.svg.precision) >= 0 ? 10 ** Number(this.config.svg.precision) : null;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/svg-sprite/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function SVGShape(file, spriter) {
this.state = this.state.shift() || null;
this.master = null;
this.copies = 0;
this._precision = Math.pow(10, Number(this.config.dimension.precision));
this._precision = 10 ** Number(this.config.dimension.precision);
this._scale = 1;
this._namespaced = false;

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
"error",
"always"
],
"prefer-exponentiation-operator": "off",
"promise/prefer-await-to-then": "off",
"space-before-function-paren": [
"error",
Expand Down

0 comments on commit 982aabd

Please sign in to comment.