Skip to content

Commit eb3909b

Browse files
committed
fix: formatting files
1 parent 43c00e0 commit eb3909b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+476
-653
lines changed

bin/cli.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,19 +326,14 @@ For more information, see https://webpack.js.org/api/cli/.`);
326326
const SIX_DAYS = 518400000;
327327
const now = new Date();
328328
if (now.getDay() === MONDAY) {
329-
const {
330-
access,
331-
constants,
332-
statSync,
333-
utimesSync,
334-
} = require("fs");
329+
const { access, constants, statSync, utimesSync } = require("fs");
335330
const lastPrint = statSync(openCollectivePath).atime;
336331
const lastPrintTS = new Date(lastPrint).getTime();
337332
const timeSinceLastPrint = now.getTime() - lastPrintTS;
338333
if (timeSinceLastPrint > SIX_DAYS) {
339334
require(openCollectivePath);
340335
// On windows we need to manually update the atime
341-
access(openCollectivePath, constants.W_OK, (e) => {
336+
access(openCollectivePath, constants.W_OK, e => {
342337
if (!e) utimesSync(openCollectivePath, now, now);
343338
});
344339
}

package-lock.json

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

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
"clean:all": "rimraf node_modules packages/*/{node_modules}",
3434
"commit": "git-cz",
3535
"docs": "typedoc",
36-
"format": "prettier-eslint ./bin/*.js ./test/**/*.js ./packages/**/*.js --write",
37-
"lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"",
38-
"lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"packages/**/!(node_modules)/*.ts\"",
36+
"format": "npm run format:js && npm run format:ts",
37+
"format:ts": "prettier-eslint ./bin/*.js ./bin/**/*.js ./test/**/*.js ./packages/**/**/*.js ./packages/**/*.js --write",
38+
"format:js": "prettier-eslint ./packages/**/**/*.ts ./packages/**/*.ts ./packages/**/**/**/*.ts --write",
39+
"lint": "eslint \"./bin/*.js\" \"./bin/**/*.js\" \"./test/**/*.js\" \"packages/**/!(node_modules)/*.ts\" \"packages/**/!(node_modules)/**/*.ts\"",
3940
"postinstall": "node ./bin/opencollective.js",
4041
"pretest": "npm run build && npm run lint",
4142
"reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov",
@@ -145,8 +146,8 @@
145146
"@commitlint/travis-cli": "^7.2.1",
146147
"@types/jest": "^23.3.14",
147148
"@types/node": "^10.12.9",
148-
"@typescript-eslint/eslint-plugin": "^1.6.0",
149-
"@typescript-eslint/parser": "^1.6.0",
149+
"@typescript-eslint/eslint-plugin": "^1.9.0",
150+
"@typescript-eslint/parser": "^1.9.0",
150151
"babel-preset-env": "^1.7.0",
151152
"babel-preset-jest": "^24.3.0",
152153
"bundlesize": "^0.17.2",

packages/generators/__tests__/add-generator.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { generatePluginName } from "../utils/plugins"
1+
import { generatePluginName } from "../utils/plugins";
22

33
describe("generatePluginName", () => {
44
it("should return webpack Standard Plugin Name for Name : extract-text-webpack-plugin", () => {
@@ -11,4 +11,3 @@ describe("generatePluginName", () => {
1111
expect(pluginName).toEqual("webpack.DefinePlugin");
1212
});
1313
});
14-

packages/generators/add-generator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import * as webpackDevServerSchema from "webpack-dev-server/lib/options.json";
1616
import * as webpackSchema from "./utils/optionsSchema.json";
1717
const PROPS: string[] = Array.from(PROP_TYPES.keys());
1818

19-
2019
/**
2120
*
2221
* Checks if the given array has a given property
@@ -91,8 +90,9 @@ export default class AddGenerator extends Generator {
9190
const done: () => {} = this.async();
9291
let action: string;
9392
const self: this = this;
94-
const manualOrListInput: (promptAction: string) => Generator.Question = (promptAction: string): Generator.Question =>
95-
Input("actionAnswer", `What do you want to add to ${promptAction}?`);
93+
const manualOrListInput: (promptAction: string) => Generator.Question = (
94+
promptAction: string
95+
): Generator.Question => Input("actionAnswer", `What do you want to add to ${promptAction}?`);
9696
let inputPrompt: Generator.Question;
9797

9898
// first index indicates if it has a deep prop, 2nd indicates what kind of
@@ -380,7 +380,7 @@ export default class AddGenerator extends Generator {
380380
(p: boolean): void => {
381381
if (p) {
382382
this.dependencies.push(answerToAction.actionAnswer);
383-
const pluginName = generatePluginName(answerToAction.actionAnswer)
383+
const pluginName = generatePluginName(answerToAction.actionAnswer);
384384
this.configuration.config.topScope.push(
385385
`const ${pluginName} = require("${answerToAction.actionAnswer}")`
386386
);

packages/generators/addon-generator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ const addonGenerator = (
3131
copyFiles: string[],
3232
copyTemplateFiles: string[],
3333
templateFn: Function
34-
): typeof Generator => class AddonGenerator extends Generator {
34+
): typeof Generator =>
35+
class AddonGenerator extends Generator {
3536
public props: Generator.Question;
3637
public copy: (value: string, index: number, array: string[]) => void;
3738
public copyTpl: (value: string, index: number, array: string[]) => void;

packages/generators/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export {
1313
loaderGenerator,
1414
pluginGenerator,
1515
removeGenerator,
16-
updateGenerator,
16+
updateGenerator
1717
};

0 commit comments

Comments
 (0)