Skip to content

Commit 62765cc

Browse files
authored
style(prettier): prettify codebase (#27)
1 parent 409e99a commit 62765cc

File tree

14 files changed

+1445
-1049
lines changed

14 files changed

+1445
-1049
lines changed

dangerfile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import jest from './dist'
1+
import jest from "./dist";
22

3-
jest()
3+
jest();

package.json

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"description": "Danger plugin for Jest",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
7-
"files": [
8-
"dist"
9-
],
7+
"files": ["dist"],
108
"scripts": {
119
"precommit": "lint-staged",
1210
"prepush": "npm run test",
@@ -19,17 +17,14 @@
1917
"docs:serve": "npm run docs && serve docs",
2018
"docs:deploy": "npm run docs && node scripts/deploy-docs.js",
2119
"prepublish": "npm run build",
22-
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
20+
"semantic-release":
21+
"semantic-release pre && npm publish && semantic-release post"
2322
},
2423
"repository": {
2524
"type": "git",
2625
"url": "https://github.com/macklinu/danger-plugin-jest.git"
2726
},
28-
"keywords": [
29-
"danger",
30-
"danger-plugin",
31-
"jest"
32-
],
27+
"keywords": ["danger", "danger-plugin", "jest"],
3328
"author": "Macklin Underdown <macklinu@gmail.com>",
3429
"license": "MIT",
3530
"bugs": {
@@ -49,9 +44,11 @@
4944
"husky": "^0.13.3",
5045
"jest": "^20.0.3",
5146
"lint-staged": "^3.4.2",
47+
"prettier": "^1.7.4",
5248
"semantic-release": "^6.3.6",
5349
"ts-jest": "^20.0.4",
5450
"tslint": "^5.0.0",
51+
"tslint-config-prettier": "^1.5.0",
5552
"typedoc": "^0.7.1",
5653
"typedoc-plugin-external-module-name": "^1.0.9",
5754
"typescript": "^2.3.3",
@@ -65,20 +62,15 @@
6562
"transform": {
6663
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
6764
},
68-
"moduleFileExtensions": [
69-
"ts",
70-
"js"
71-
]
65+
"moduleFileExtensions": ["ts", "js"]
7266
},
7367
"config": {
7468
"commitizen": {
7569
"path": "cz-conventional-changelog"
7670
}
7771
},
7872
"lint-staged": {
79-
"src/**/*.ts": [
80-
"tslint -c tslint.json -p tsconfig.json --fix",
81-
"git add"
82-
]
73+
"src/**/*.ts": ["prettier --write", "git add"],
74+
"*.json": ["prettier --write", "git add"]
8375
}
8476
}

scripts/deploy-docs.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
'use strict'
1+
"use strict";
22

3-
const ghpages = require('gh-pages')
3+
const ghpages = require("gh-pages");
44

5-
const docsDir = 'docs'
5+
const docsDir = "docs";
66
const options = {
77
user: {
8-
name: 'Macklin Underdown',
9-
email: 'macklinu@users.noreply.github.com'
10-
},
11-
}
12-
const callback = (err) => {
8+
name: "Macklin Underdown",
9+
email: "macklinu@users.noreply.github.com"
10+
}
11+
};
12+
const callback = err => {
1313
if (err) {
14-
console.error(err)
14+
console.error(err);
1515
} else {
16-
console.log('🚀 Docs deployed to GitHub Pages')
16+
console.log("🚀 Docs deployed to GitHub Pages");
1717
}
18-
}
18+
};
1919

20-
ghpages.publish(docsDir, options, callback)
20+
ghpages.publish(docsDir, options, callback);

0 commit comments

Comments
 (0)