Skip to content

Commit

Permalink
chore: Apply prettier 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bebraw committed Nov 12, 2020
1 parent 33c3768 commit 57ec295
Show file tree
Hide file tree
Showing 16 changed files with 641 additions and 631 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ merge.smart(
loaders: [
{
test: /\.js$/,
loaders: ["babel"]
}
]
loaders: ["babel"],
},
],
},
{
loaders: [
{
test: /\.js$/,
loaders: ["react-hot", "babel"]
}
]
loaders: ["react-hot", "babel"],
},
],
}
);
// will become
Expand All @@ -137,8 +137,8 @@ merge.smart(
{
test: /\.js$/,
// order of second argument is respected
loaders: ["react-hot", "babel"]
}
loaders: ["react-hot", "babel"],
},
];
}
```
Expand Down Expand Up @@ -199,10 +199,10 @@ const output = merge.smartStrategy(

```javascript
const a = {
entry: ["foo"]
entry: ["foo"],
};
const b = {
entry: []
entry: [],
};

merge(a, b); // Yields a result, not b like before.
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ const output = mergeWithCustomize({
customizeArray: unique(
"plugins",
["HotModuleReplacementPlugin"],
plugin => plugin.constructor && plugin.constructor.name
)
(plugin) => plugin.constructor && plugin.constructor.name
),
})(
{
plugins: [new webpack.HotModuleReplacementPlugin()]
plugins: [new webpack.HotModuleReplacementPlugin()],
},
{
plugins: [new webpack.HotModuleReplacementPlugin()]
plugins: [new webpack.HotModuleReplacementPlugin()],
}
);

Expand All @@ -182,10 +182,10 @@ const a = {
rules: [
{
test: /\.css$/,
use: [{ loader: "style-loader" }, { loader: "sass-loader" }]
}
]
}
use: [{ loader: "style-loader" }, { loader: "sass-loader" }],
},
],
},
};
const b = {
module: {
Expand All @@ -196,13 +196,13 @@ const b = {
{
loader: "style-loader",
options: {
modules: true
}
}
]
}
]
}
modules: true,
},
},
],
},
],
},
};
const result = {
module: {
Expand All @@ -213,14 +213,14 @@ const result = {
{
loader: "style-loader",
options: {
modules: true
}
modules: true,
},
},
{ loader: "sass-loader" }
]
}
]
}
{ loader: "sass-loader" },
],
},
],
},
};

assert.deepStrictEqual(
Expand All @@ -230,10 +230,10 @@ assert.deepStrictEqual(
test: "match",
use: {
loader: "match",
options: "replace"
}
}
}
options: "replace",
},
},
},
})(a, b),
result
);
Expand Down
Loading

0 comments on commit 57ec295

Please sign in to comment.