Skip to content

Commit 4b08819

Browse files
Merge pull request #925 from anshumanv/prettier/format
chore(format): fix formatting using prettier
2 parents 434eab4 + ae4260a commit 4b08819

File tree

25 files changed

+109
-77
lines changed

25 files changed

+109
-77
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
2-
extends: ["eslint:recommended"],
2+
extends: ["eslint:recommended", "plugin:prettier/recommended"],
3+
plugins: ["prettier"],
34
env: {
45
node: true,
56
es6: true,

bin/cli.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
106106
* When --silent flag is present, an object with a no-op write method is
107107
* used in place of process.stout
108108
*/
109-
const stdout = argv.silent
110-
? {
111-
write: () => {}
112-
} // eslint-disable-line
113-
: process.stdout;
109+
const stdout = argv.silent ? { write: () => {} } : process.stdout;
114110

115111
function ifArg(name, fn, init) {
116112
if (Array.isArray(argv[name])) {
@@ -127,7 +123,8 @@ For more information, see https://webpack.js.org/api/cli/.`);
127123
if (typeof options.then === "function") {
128124
options.then(processOptions).catch(function(err) {
129125
console.error(err.stack || err);
130-
process.exit(1); // eslint-disable-line
126+
// eslint-disable-next-line no-process-exit
127+
process.exit(1);
131128
});
132129
return;
133130
}

bin/config/config-yargs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ module.exports = function(yargs) {
349349
},
350350
p: {
351351
type: "boolean",
352-
describe: "shortcut for --optimize-minimize --define process.env.NODE_ENV=\"production\"",
352+
// eslint-disable-next-line quotes
353+
describe: 'shortcut for --optimize-minimize --define process.env.NODE_ENV="production"',
353354
group: BASIC_GROUP
354355
},
355356
silent: {

bin/utils/convert-argv.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module.exports = function(...args) {
2424
}
2525
if (argv.p) {
2626
argv["optimize-minimize"] = true;
27-
argv["define"] = [].concat(argv["define"] || []).concat("process.env.NODE_ENV=\"production\"");
27+
// eslint-disable-next-line quotes
28+
argv["define"] = [].concat(argv["define"] || []).concat('process.env.NODE_ENV="production"');
2829
if (!argv.mode) {
2930
argv.mode = "production";
3031
}

package-lock.json

Lines changed: 38 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@
167167
"conventional-changelog-cli": "^2.0.11",
168168
"cz-customizable": "^5.3.0",
169169
"eslint": "^5.9.0",
170-
"eslint-config-prettier": "^4.1.0",
170+
"eslint-config-prettier": "^4.3.0",
171171
"eslint-plugin-node": "^8.0.0",
172+
"eslint-plugin-prettier": "^3.1.0",
172173
"esm": "^3.2.14",
173174
"execa": "^1.0.0",
174175
"husky": "^1.1.4",

test/binCases/config-location/find-recursively/packages/foo/find-recursively.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test("find-recursively", () => {
99
"--output-chunk-filename",
1010
"[id].chunk.js",
1111
"--target",
12-
"async-node",
12+
"async-node"
1313
]);
1414
expect(code).toBe(0);
1515
expect(stdout).toEqual(expect.anything());

test/binCases/config-location/not-found/not-found.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test("not-found", () => {
1111
"--target",
1212
"async-node",
1313
"--mode",
14-
"production",
14+
"production"
1515
]);
1616
expect(code).toBe(0);
1717
expect(stdout).toContain("./src/index.js");

test/binCases/config-location/set-explicitly/set-explicitly.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test("set-explicitly", () => {
1313
"--output-chunk-filename",
1414
"[id].chunk.js",
1515
"--target",
16-
"async-node",
16+
"async-node"
1717
]);
1818
expect(code).toBe(0);
1919
expect(stdout).toEqual(expect.anything());

test/binCases/config-location/set-implicitly/set-implicitly.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test("set-implicitly", () => {
99
"--output-chunk-filename",
1010
"[id].chunk.js",
1111
"--target",
12-
"async-node",
12+
"async-node"
1313
]);
1414
expect(code).toBe(0);
1515
expect(stdout).toEqual(expect.anything());

0 commit comments

Comments
 (0)