Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
feat(prettier): bump bundled version to 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robwise committed Sep 15, 2017
1 parent cac91ab commit 20281be
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 38 deletions.
33 changes: 22 additions & 11 deletions dist/config-schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flow-typed/npm/prettier-eslint-cli_vx.x.x.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions flow-typed/npm/prettier_vx.x.x.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ignore": "^3.3.4",
"lodash": "^4.17.4",
"loophole": "^1.1.0",
"prettier": "^1.5.3",
"prettier": "^1.7.0",
"prettier-eslint": "^6.4.2",
"read-pkg-up": "^2.0.0"
},
Expand Down
33 changes: 22 additions & 11 deletions src/config-schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"useEslint": {
"title": "ESLint Integration",
"description": "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
"description":
"Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
"type": "boolean",
"default": false,
"order": 1
},
"useEditorConfig": {
"title": "EditorConfig Integration",
"description": "Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
"description":
"Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
"type": "boolean",
"default": true,
"order": 2
Expand Down Expand Up @@ -41,7 +43,8 @@
},
"javascriptScopes": {
"title": "JavaScript Scopes",
"description": "Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
"description":
"Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": [
"source.js",
Expand All @@ -59,7 +62,8 @@
},
"typescriptScopes": {
"title": "TypeScript Scopes",
"description": "Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
"description":
"Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": ["source.ts", "source.tsx", "source.ts.tsx"],
"items": {
Expand All @@ -69,7 +73,8 @@
},
"cssScopes": {
"title": "CSS Scopes",
"description": "Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"description":
"Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": ["source.css", "source.less", "source.css.less", "source.scss", "source.css.scss"],
"items": {
Expand All @@ -79,7 +84,8 @@
},
"jsonScopes": {
"title": "JSON Scopes",
"description": "Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"description":
"Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": ["source.json"],
"items": {
Expand All @@ -89,7 +95,8 @@
},
"graphQlScopes": {
"title": "GraphQL Scopes",
"description": "Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"description":
"Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": ["source.graphql"],
"items": {
Expand All @@ -99,21 +106,24 @@
},
"excludedGlobs": {
"title": "Exclude (list of globs)",
"description": "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
"description":
"A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
"type": "array",
"default": [],
"order": 9
},
"whitelistedGlobs": {
"title": "Include (list of globs)",
"description": "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
"description":
"A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
"type": "array",
"default": [],
"order": 10
},
"isDisabledIfNotInPackageJson": {
"title": "Only format if Prettier is found in your project's dependencies",
"description": "Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
"description":
"Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
"type": "boolean",
"default": false,
"order": 11
Expand Down Expand Up @@ -183,7 +193,8 @@
},
"parser": {
"title": "JavaScript Parser",
"description": "Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
"description":
"Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
"type": "string",
"default": "babylon",
"enum": ["babylon", "flow"],
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const safePathParse = (filePath: FilePath) =>
const getDirFromFilePath: (filePath: ?FilePath) => ?FilePath = _.flow(safePathParse, _.get('dir'));

const someGlobsMatchFilePath = (globs: Globs, filePath: ?FilePath) =>
isPresent(filePath) && ignore().add(globs).ignores(filePath);
isPresent(filePath) &&
ignore()
.add(globs)
.ignores(filePath);

const findCachedFromFilePath = (filePath: ?FilePath, name: string | Array<string>): ?FilePath =>
_.flow(
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3841,9 +3841,9 @@ prettier@^1.5.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3"

prettier@^1.5.3:
version "1.5.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.3.tgz#59dadc683345ec6b88f88b94ed4ae7e1da394bfe"
prettier@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.0.tgz#47481588f41f7c90f63938feb202ac82554e7150"

pretty-format@^20.0.3:
version "20.0.3"
Expand Down

0 comments on commit 20281be

Please sign in to comment.