Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jun 4, 2019
1 parent 9f6a95c commit 6b276f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/getOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export default function getOptions(input = {}) {
}

if (output.target === "auto") {
if (/\btest\b/.test(output.env)) {
if ((/\btest\b/).test(output.env)) {
output.target = "node"
}
else if (/\bnode\b/.test(output.env)) {
else if ((/\bnode\b/).test(output.env)) {
output.target = "node"
}
else if (/\bbrowser\b/.test(output.env)) {
else if ((/\bbrowser\b/).test(output.env)) {
output.target = "browser"
}
else {
Expand All @@ -57,7 +57,7 @@ export default function getOptions(input = {}) {

// Auto select test target when running in test environment
if (output.transpile === "auto") {
if (/\btest\b/.test(output.env)) {
if ((/\btest\b/).test(output.env)) {
output.transpile = "current"

if (output.debug) {
Expand All @@ -73,23 +73,23 @@ export default function getOptions(input = {}) {
output.transpile = "node"
}

else if (/\bmodern\b/.test(output.env)) {
else if ((/\bmodern\b/).test(output.env)) {
output.transpile = "modern"

if (output.debug) {
console.log("- Selected 'modern' transpile based on ENV")
}
}

else if (/\besm\b/.test(output.env)) {
else if ((/\besm\b/).test(output.env)) {
output.transpile = "esm"

if (output.debug) {
console.log("- Selected 'esm' transpile based on ENV")
}
}

else if (/\bes2015\b/.test(output.env)) {
else if ((/\bes2015\b/).test(output.env)) {
output.transpile = "es2015"

if (output.debug) {
Expand Down
4 changes: 2 additions & 2 deletions src/shouldPrintComment.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default function shouldPrintComment(comment) {
// Keep pure function markers which are generated by some plugins
// See sideEffects option: https://github.com/mishoo/UglifyJS2
if (/[#@]__PURE__/.exec(comment)) {
if ((/[#@]__PURE__/).exec(comment)) {
return true
}

// Keep JSON5 magic comments used for Webpack hints
if (/^\s?webpack[A-Z][A-Za-z]+:/.exec(comment)) {
if ((/^\s?webpack[A-Z][A-Za-z]+:/).exec(comment)) {
return true
}

Expand Down

0 comments on commit 6b276f9

Please sign in to comment.