master
Lucas Duailibe 2018-05-27 15:10:56 -03:00
parent 68e24cef79
commit 8892b14d8a
5 changed files with 108 additions and 10 deletions

View File

@ -7,8 +7,8 @@ BEFORE SUBMITTING AN ISSUE:
If someone has already opened an issue for what you are experiencing, If someone has already opened an issue for what you are experiencing,
  you do not need to open a new issue — please add a 👍 reaction to the   you do not need to open a new issue — please add a 👍 reaction to the
existing issue instead. existing issue instead.
2. We get a lot of requests for adding options, but Prettier is 2. We get a lot of requests for adding options, but Prettier is
built on the principle of being opinionated about code formatting. built on the principle of being opinionated about code formatting.
This means we have a very high bar for adding new options. This means we have a very high bar for adding new options.
Find out more: https://prettier.io/docs/en/option-philosophy.html Find out more: https://prettier.io/docs/en/option-philosophy.html
@ -26,7 +26,7 @@ Tip! Don't write this stuff manually.
--> -->
**Prettier 1.12.1** **Prettier 1.13.0**
[Playground link](https://prettier.io/playground/#.....) [Playground link](https://prettier.io/playground/#.....)
```sh ```sh
# Options (if any): # Options (if any):

View File

@ -1,3 +1,9 @@
# 1.13.0
[link](https://github.com/prettier/prettier/compare/1.12.1...1.13.0)
* [Release Notes](https://prettier.io/blog/2018/05/23/1.13.0.html)
# 1.12.1 # 1.12.1
[link](https://github.com/prettier/prettier/compare/1.12.0...1.12.1) [link](https://github.com/prettier/prettier/compare/1.12.0...1.12.1)

View File

@ -1,6 +1,6 @@
{ {
"name": "prettier", "name": "prettier",
"version": "1.12.1", "version": "1.13.0",
"description": "Prettier is an opinionated code formatter", "description": "Prettier is an opinionated code formatter",
"bin": { "bin": {
"prettier": "./bin/prettier.js" "prettier": "./bin/prettier.js"

View File

@ -59,7 +59,7 @@ This option cannot be used with --range-start and --range-end.",
"type": "boolean", "type": "boolean",
}, },
"parser": Object { "parser": Object {
"default": "babylon", "default": undefined,
"description": "Which parser to use.", "description": "Which parser to use.",
"oneOf": Array [ "oneOf": Array [
Object { Object {
@ -104,6 +104,18 @@ This option cannot be used with --range-start and --range-end.",
"json", "json",
], ],
}, },
Object {
"description": "JSON5",
"enum": Array [
"json5",
],
},
Object {
"description": "JSON.stringify",
"enum": Array [
"json-stringify",
],
},
Object { Object {
"description": "GraphQL", "description": "GraphQL",
"enum": Array [ "enum": Array [
@ -124,6 +136,16 @@ This option cannot be used with --range-start and --range-end.",
}, },
], ],
}, },
"pluginSearchDirs": Object {
"default": Array [],
"description": "Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.",
"items": Object {
"type": "string",
},
"type": "array",
},
"plugins": Object { "plugins": Object {
"default": Array [], "default": Array [],
"description": "Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.", "description": "Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.",

View File

@ -395,7 +395,24 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
- First value - First value
+ Second value + Second value
@@ -27,12 +27,23 @@ @@ -7,10 +7,16 @@
\\"graphql\\",
],
\\"JSON\\": Array [
\\"json\\",
],
+ \\"JSON.stringify\\": Array [
+ \\"json-stringify\\",
+ ],
+ \\"JSON5\\": Array [
+ \\"json5\\",
+ ],
\\"JSX\\": Array [
\\"babylon\\",
\\"flow\\",
],
\\"JavaScript\\": Array [
@@ -27,12 +33,23 @@
\\"scss\\", \\"scss\\",
], ],
\\"TypeScript\\": Array [ \\"TypeScript\\": Array [
@ -419,17 +436,26 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"type\\": \\"boolean\\", \\"type\\": \\"boolean\\",
}, },
\\"cursorOffset\\": Object { \\"cursorOffset\\": Object {
@@ -65,14 +76,19 @@ @@ -63,16 +80,27 @@
\\"typescript\\",
\\"css\\",
\\"less\\", \\"less\\",
\\"scss\\", \\"scss\\",
\\"json\\", \\"json\\",
+ \\"json5\\",
+ \\"json-stringify\\",
\\"graphql\\", \\"graphql\\",
\\"markdown\\", \\"markdown\\",
+ \\"vue\\", + \\"vue\\",
], ],
\\"default\\": \\"babylon\\", - \\"default\\": \\"babylon\\",
+ \\"default\\": undefined,
\\"type\\": \\"choice\\", \\"type\\": \\"choice\\",
}, },
+ \\"pluginSearchDirs\\": Object {
+ \\"default\\": Array [],
+ \\"type\\": \\"path\\",
+ },
+ \\"plugins\\": Object { + \\"plugins\\": Object {
+ \\"default\\": Array [], + \\"default\\": Array [],
+ \\"type\\": \\"path\\", + \\"type\\": \\"path\\",
@ -439,7 +465,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
\\"range\\": Object { \\"range\\": Object {
\\"end\\": Infinity, \\"end\\": Infinity,
\\"start\\": 0, \\"start\\": 0,
@@ -80,14 +96,15 @@ @@ -80,14 +108,15 @@
}, },
\\"type\\": \\"int\\", \\"type\\": \\"int\\",
}, },
@ -528,6 +554,20 @@ exports[`CLI --support-info (stdout) 1`] = `
\\"tmScope\\": \\"source.ts\\", \\"tmScope\\": \\"source.ts\\",
\\"vscodeLanguageIds\\": [\\"typescript\\", \\"typescriptreact\\"] \\"vscodeLanguageIds\\": [\\"typescript\\", \\"typescriptreact\\"]
}, },
{
\\"aceMode\\": \\"json\\",
\\"codemirrorMimeType\\": \\"application/json\\",
\\"codemirrorMode\\": \\"javascript\\",
\\"extensions\\": [],
\\"filenames\\": [\\"package.json\\", \\"package-lock.json\\", \\"composer.json\\"],
\\"group\\": \\"JavaScript\\",
\\"linguistLanguageId\\": 174,
\\"name\\": \\"JSON.stringify\\",
\\"parsers\\": [\\"json-stringify\\"],
\\"since\\": \\"1.13.0\\",
\\"tmScope\\": \\"source.json\\",
\\"vscodeLanguageIds\\": [\\"json\\"]
},
{ {
\\"aceMode\\": \\"json\\", \\"aceMode\\": \\"json\\",
\\"codemirrorMimeType\\": \\"application/json\\", \\"codemirrorMimeType\\": \\"application/json\\",
@ -549,6 +589,20 @@ exports[`CLI --support-info (stdout) 1`] = `
\\"tmScope\\": \\"source.json\\", \\"tmScope\\": \\"source.json\\",
\\"vscodeLanguageIds\\": [\\"json\\", \\"jsonc\\"] \\"vscodeLanguageIds\\": [\\"json\\", \\"jsonc\\"]
}, },
{
\\"aceMode\\": \\"json\\",
\\"codemirrorMimeType\\": \\"application/json\\",
\\"codemirrorMode\\": \\"javascript\\",
\\"extensions\\": [\\".json5\\"],
\\"filenames\\": [\\".babelrc\\"],
\\"group\\": \\"JavaScript\\",
\\"linguistLanguageId\\": 175,
\\"name\\": \\"JSON5\\",
\\"parsers\\": [\\"json5\\"],
\\"since\\": \\"1.13.0\\",
\\"tmScope\\": \\"source.json\\",
\\"vscodeLanguageIds\\": [\\"json5\\"]
},
{ {
\\"aceMode\\": \\"css\\", \\"aceMode\\": \\"css\\",
\\"codemirrorMimeType\\": \\"text/css\\", \\"codemirrorMimeType\\": \\"text/css\\",
@ -721,17 +775,33 @@ exports[`CLI --support-info (stdout) 1`] = `
{ \\"description\\": \\"Less\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"less\\" }, { \\"description\\": \\"Less\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"less\\" },
{ \\"description\\": \\"SCSS\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"scss\\" }, { \\"description\\": \\"SCSS\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"scss\\" },
{ \\"description\\": \\"JSON\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"json\\" }, { \\"description\\": \\"JSON\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"json\\" },
{ \\"description\\": \\"JSON5\\", \\"since\\": \\"1.13.0\\", \\"value\\": \\"json5\\" },
{
\\"description\\": \\"JSON.stringify\\",
\\"since\\": \\"1.13.0\\",
\\"value\\": \\"json-stringify\\"
},
{ \\"description\\": \\"GraphQL\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"graphql\\" }, { \\"description\\": \\"GraphQL\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"graphql\\" },
{ \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" }, { \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" },
{ \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" } { \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" }
], ],
\\"default\\": \\"babylon\\",
\\"description\\": \\"Which parser to use.\\", \\"description\\": \\"Which parser to use.\\",
\\"name\\": \\"parser\\", \\"name\\": \\"parser\\",
\\"pluginDefaults\\": {}, \\"pluginDefaults\\": {},
\\"since\\": \\"0.0.10\\", \\"since\\": \\"0.0.10\\",
\\"type\\": \\"choice\\" \\"type\\": \\"choice\\"
}, },
{
\\"array\\": true,
\\"category\\": \\"Global\\",
\\"default\\": [],
\\"description\\":
\\"Custom directory that contains prettier plugins in node_modules subdirectory.\\\\nOverrides default behavior when plugins are searched relatively to the location of Prettier.\\\\nMultiple values are accepted.\\",
\\"name\\": \\"pluginSearchDirs\\",
\\"pluginDefaults\\": {},
\\"since\\": \\"1.13.0\\",
\\"type\\": \\"path\\"
},
{ {
\\"array\\": true, \\"array\\": true,
\\"category\\": \\"Global\\", \\"category\\": \\"Global\\",