Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prettier #409

Merged
merged 2 commits into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test/helpers
  • Loading branch information
danez committed Apr 21, 2017
commit 9a44bbc9737e8a77b5b3d4019cc8108e8f93e62f
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"clean": "rimraf lib/",
"build": "babel src/ --out-dir lib/",
"format": "prettier --write --trailing-comma all \"src/**/*.js\" \"test/*.test.js\" && prettier --write --trailing-comma es5 \"scripts/*.js\"",
"format": "prettier --write --trailing-comma all \"src/**/*.js\" \"test/*.test.js\" \"test/helpers/*.js\" && prettier --write --trailing-comma es5 \"scripts/*.js\"",
"lint": "eslint src test",
"precommit": "lint-staged",
"prepublish": "yarn run clean && yarn run build",
Expand Down Expand Up @@ -109,6 +109,10 @@
"prettier --trailing-comma all --write",
"git add"
],
"test/helpers/*.js": [
"prettier --trailing-comma all --write ",
"git add"
],
"package.json": [
"node ./scripts/yarn-install.js",
"git add yarn.lock"
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/createTestDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import rimraf from "rimraf";
export default function createTestDirectory(baseDirectory, testTitle, cb) {
const directory = path.join(baseDirectory, escapeDirectory(testTitle));

rimraf(directory, (err) => {
rimraf(directory, err => {
if (err) return cb(err);
mkdirp(directory, (mkdirErr) => cb(mkdirErr, directory));
mkdirp(directory, mkdirErr => cb(mkdirErr, directory));
});
}

Expand Down