Bump prettier (#6355)

This commit is contained in:
Brian Ng
2017-09-30 08:53:52 -05:00
committed by Henry Zhu
parent 6230855b71
commit 789ce386ed
5 changed files with 77 additions and 27 deletions

View File

@@ -39,13 +39,13 @@
"husky": "^0.14.3",
"lerna": "2.0.0",
"lerna-changelog": "^0.5.0",
"lint-staged": "^4.0.4",
"lint-staged": "^4.2.3",
"lodash": "^4.2.0",
"merge-stream": "^1.0.1",
"mocha": "^3.0.0",
"nyc": "^11.0.3",
"output-file-sync": "^2.0.0",
"prettier": "^1.6.1",
"prettier": "1.7.3",
"rimraf": "^2.4.3",
"semver": "^5.0.0",
"through2": "^2.0.0",

View File

@@ -82,11 +82,10 @@ export default class ImportBuilder {
statement = t.expressionStatement(this._resultName);
this._statements.push(statement);
}
this._statements[
this._statements.length - 1
] = t.variableDeclaration("var", [
t.variableDeclarator(name, statement.expression),
]);
this._statements[this._statements.length - 1] = t.variableDeclaration(
"var",
[t.variableDeclarator(name, statement.expression)],
);
this._resultName = t.clone(name);
return this;
}

View File

@@ -144,10 +144,8 @@ export default function({ types: t }) {
// TODO: This should probably also hoist computed properties.
const decorators = (path.isClass()
? [path].concat(path.get("body.body"))
: path.get("properties")).reduce(
(acc, prop) => acc.concat(prop.node.decorators || []),
[],
);
: path.get("properties")
).reduce((acc, prop) => acc.concat(prop.node.decorators || []), []);
const identDecorators = decorators.filter(
decorator => !t.isIdentifier(decorator.expression),

View File

@@ -15,7 +15,7 @@ function isInType(path) {
}
interface State {
programPath: any,
programPath: any;
}
export default function({ types: t }) {

View File

@@ -87,7 +87,7 @@ ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.1.0:
ansi-styles@^3.1.0, ansi-styles@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
dependencies:
@@ -1347,7 +1347,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
chalk@^2.0.0, chalk@^2.1.0:
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
dependencies:
@@ -2600,6 +2600,10 @@ get-func-name@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
get-own-enumerable-property-symbols@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b"
get-pkg-repo@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
@@ -3207,7 +3211,7 @@ is-extglob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
is-extglob@^2.1.0:
is-extglob@^2.1.0, is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -3239,6 +3243,12 @@ is-glob@^3.1.0:
dependencies:
is-extglob "^2.1.0"
is-glob@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
dependencies:
is-extglob "^2.1.1"
is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -3251,7 +3261,7 @@ is-number@^3.0.0:
dependencies:
kind-of "^3.0.2"
is-obj@^1.0.0:
is-obj@^1.0.0, is-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
@@ -3299,6 +3309,10 @@ is-regex@^1.0.4:
dependencies:
has "^1.0.1"
is-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
is-relative@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5"
@@ -3424,6 +3438,19 @@ jest-docblock@^20.0.1:
version "20.0.3"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712"
jest-get-type@^21.2.0:
version "21.2.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23"
jest-validate@^21.1.0:
version "21.2.1"
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7"
dependencies:
chalk "^2.0.1"
jest-get-type "^21.2.0"
leven "^2.1.0"
pretty-format "^21.2.1"
js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
@@ -3596,6 +3623,10 @@ lerna@2.0.0:
write-pkg "^3.0.1"
yargs "^8.0.1"
leven@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580"
levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@@ -3623,19 +3654,24 @@ liftoff@^2.1.0:
rechoir "^0.6.2"
resolve "^1.1.7"
lint-staged@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.4.tgz#9ca6968b30dfbfe81365b7a763cd4f4992896553"
lint-staged@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.2.3.tgz#5a1f12256af06110b96225f109dbf215009a37a9"
dependencies:
app-root-path "^2.0.0"
chalk "^2.1.0"
cosmiconfig "^1.1.0"
execa "^0.8.0"
is-glob "^4.0.0"
jest-validate "^21.1.0"
listr "^0.12.0"
lodash.chunk "^4.2.0"
lodash "^4.17.4"
log-symbols "^2.0.0"
minimatch "^3.0.0"
npm-which "^3.0.1"
p-map "^1.1.1"
staged-git-files "0.0.4"
stringify-object "^3.2.0"
listr-silent-renderer@^1.1.1:
version "1.1.1"
@@ -3757,10 +3793,6 @@ lodash._root@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
lodash.chunk@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc"
lodash.create@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
@@ -3859,6 +3891,12 @@ log-symbols@^1.0.2:
dependencies:
chalk "^1.0.0"
log-symbols@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.1.0.tgz#f35fa60e278832b538dc4dddcbb478a45d3e3be6"
dependencies:
chalk "^2.0.1"
log-update@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1"
@@ -4565,9 +4603,16 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.6.1.tgz#850f411a3116226193e32ea5acfc21c0f9a76d7d"
prettier@1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.3.tgz#8e6974725273914b1c47439959dd3d3ba53664b6"
pretty-format@^21.2.1:
version "21.2.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36"
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
pretty-hrtime@^1.0.0:
version "1.0.3"
@@ -5204,6 +5249,14 @@ string_decoder@~1.0.3:
dependencies:
safe-buffer "~5.1.0"
stringify-object@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.1.tgz#2720c2eff940854c819f6ee252aaeb581f30624d"
dependencies:
get-own-enumerable-property-symbols "^2.0.1"
is-obj "^1.0.1"
is-regexp "^1.0.0"
stringstream@~0.0.4:
version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"