Upgrade Prettier to Prettier 1.9 (#3395)
* Upgrade to prettier@1.9.0 * Run eslint --fix * Run prettylint --fix * Fix playground with editorconfig scriptmaster
parent
35fc6a6671
commit
c7c1d2e7a4
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"proseWrap": false
|
||||
}
|
|
@ -315,7 +315,7 @@ Lots of small fixes, mainly for TypeScript.
|
|||
* [JSX] Break if opening element breaks (#942)
|
||||
* Parenthesize function expressions in expression position (#941)
|
||||
* update the README to add a pre-commit hook (#944)
|
||||
* Fix #951: properly parenthesize \** expressions (#952)
|
||||
* Fix #951: properly parenthesize \*\* expressions (#952)
|
||||
* [WIP] TypeScript Parser (#915)
|
||||
* Do not break long `describe` calls (#953)
|
||||
* Recursively find leading comments inside ReturnStatements (#955)
|
||||
|
|
|
@ -46,7 +46,7 @@ matrix(
|
|||
<div>
|
||||
{/* prettier-ignore */}
|
||||
<span ugly format='' />
|
||||
</div>;
|
||||
</div>
|
||||
```
|
||||
|
||||
## CSS
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
"eslint-plugin-react": "7.1.0",
|
||||
"jest": "21.1.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"prettier": "1.8.2",
|
||||
"prettier": "1.9.0",
|
||||
"prettylint": "1.0.0",
|
||||
"rimraf": "2.6.2",
|
||||
"rollup": "0.41.6",
|
||||
|
|
|
@ -40,21 +40,15 @@ shell.mkdir("-p", docs);
|
|||
shell.echo("Bundling docs index...");
|
||||
shell.cp(`${prettierPath}/index.js`, `${docs}/index.js`);
|
||||
shell.exec(
|
||||
`node_modules/babel-cli/bin/babel.js ${docs}/index.js --out-file ${
|
||||
docs
|
||||
}/index.js --presets=es2015`
|
||||
`node_modules/babel-cli/bin/babel.js ${docs}/index.js --out-file ${docs}/index.js --presets=es2015`
|
||||
);
|
||||
|
||||
shell.echo("Bundling docs babylon...");
|
||||
shell.exec(
|
||||
`rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-babylon.js -i ${
|
||||
prettierPath
|
||||
}/parser-babylon.js`
|
||||
`rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-babylon.js -i ${prettierPath}/parser-babylon.js`
|
||||
);
|
||||
shell.exec(
|
||||
`node_modules/babel-cli/bin/babel.js ${docs}/parser-babylon.js --out-file ${
|
||||
docs
|
||||
}/parser-babylon.js --presets=es2015`
|
||||
`node_modules/babel-cli/bin/babel.js ${docs}/parser-babylon.js --out-file ${docs}/parser-babylon.js --presets=es2015`
|
||||
);
|
||||
|
||||
for (const parser of parsers) {
|
||||
|
@ -63,9 +57,7 @@ for (const parser of parsers) {
|
|||
}
|
||||
shell.echo(`Bundling docs ${parser}...`);
|
||||
shell.exec(
|
||||
`rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-${
|
||||
parser
|
||||
}.js -i ${prettierPath}/parser-${parser}.js`
|
||||
`rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-${parser}.js -i ${prettierPath}/parser-${parser}.js`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,7 @@ for (const parser of parsers) {
|
|||
}
|
||||
shell.echo(`Bundling lib ${parser}...`);
|
||||
shell.exec(
|
||||
`rollup -c scripts/build/rollup.parser.config.js --environment parser:${
|
||||
parser
|
||||
}`
|
||||
`rollup -c scripts/build/rollup.parser.config.js --environment parser:${parser}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,7 @@ function syncTests(syncDir) {
|
|||
throw new Error(
|
||||
[
|
||||
"Couldn't find any files to copy.",
|
||||
`Please make sure that \`${
|
||||
syncDir
|
||||
}\` exists and contains the flow tests.`
|
||||
`Please make sure that \`${syncDir}\` exists and contains the flow tests.`
|
||||
].join("\n")
|
||||
);
|
||||
}
|
||||
|
|
|
@ -506,9 +506,7 @@ function getOptionWithLevenSuggestion(options, optionName) {
|
|||
if (suggestedOptionNameContainer !== undefined) {
|
||||
const suggestedOptionName = suggestedOptionNameContainer.value;
|
||||
logger.warn(
|
||||
`Unknown option name "${optionName}", did you mean "${
|
||||
suggestedOptionName
|
||||
}"?`
|
||||
`Unknown option name "${optionName}", did you mean "${suggestedOptionName}"?`
|
||||
);
|
||||
|
||||
return options[suggestedOptionNameContainer.index];
|
||||
|
@ -701,9 +699,7 @@ function normalizeConfig(type, rawConfig, options) {
|
|||
: `with value \`${rawValue}\``;
|
||||
const redirectName = getRedirectName(option, choice);
|
||||
consoleWarn(
|
||||
`\`${optionName}\` ${
|
||||
warningDescription
|
||||
} is deprecated. Prettier now treats it as: \`${redirectName}\`.`
|
||||
`\`${optionName}\` ${warningDescription} is deprecated. Prettier now treats it as: \`${redirectName}\`.`
|
||||
);
|
||||
return choice.redirect;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@ self.Buffer = {
|
|||
}
|
||||
};
|
||||
// eslint-disable-next-line
|
||||
fs = module$1 = module = path = os = crypto = {};
|
||||
module$1 = module = path = os = crypto = {};
|
||||
self.fs = { readFile: function() {} };
|
||||
// eslint-disable-next-line no-undef
|
||||
os.homedir = function() {
|
||||
return "/home/prettier";
|
||||
|
|
|
@ -3490,9 +3490,9 @@ preserve@^0.2.0:
|
|||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@1.8.2:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
|
||||
prettier@1.9.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.0.tgz#1a7205bdb6126b30cf8c0a7b2b86997162e1ee3e"
|
||||
|
||||
pretty-format@^21.1.0:
|
||||
version "21.1.0"
|
||||
|
|
Loading…
Reference in New Issue