Skip to content

Commit 63d85d9

Browse files
committed
chore(*): format all the code using prettier
1 parent 4d611bd commit 63d85d9

25 files changed

+765
-804
lines changed

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
printWidth: 120
22
singleQuote: true
3+
bracketSpacing: true

e2e/app.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ describe('Tree App', () => {
3131
expect(browser.isElementPresent(antiquaNode)).toBeTruthy();
3232
expect(await antiquaNode.getText()).toEqual('Antiqua');
3333

34-
const attrs = {id: 'antiqua', class: 'test'};
34+
const attrs = { id: 'antiqua', class: 'test' };
3535

3636
const expectations = Object.keys(attrs).map((key: string) => {
37-
return antiquaNode.getAttribute(key).then((value: string) => expect(value).toEqual(attrs[key]));
37+
return antiquaNode.getAttribute(key).then((value: string) => expect(value).toEqual(attrs[key]));
3838
});
3939

4040
return Promise.all(expectations as any);

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@
4949
"postversion": "git push origin master && git push --tags && npm run github-release && node publish.js",
5050
"webdriver-update": "node ./node_modules/protractor/bin/webdriver-manager update",
5151
"precommit": "pretty-quick --staged",
52-
"prettier": "prettier --write {src,test}/**/*.ts"
52+
"prettier": "prettier --write '{.,src,test}/**/*.ts'"
53+
},
54+
"husky": {
55+
"hooks": {
56+
"pre-commit": "npm run lint && pretty-quick --staged"
57+
}
5358
},
5459
"devDependencies": {
5560
"@angular/cli": "1.6.8",

0 commit comments

Comments
 (0)