Skip to content

Commit 64b7b7e

Browse files
authored
feat: update library for prettier@2 (#2)
BREAKING CHANGE: `prettier@2` is now supported.
1 parent 0ad00ae commit 64b7b7e

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.DS_Store
33
node_modules
44
dist
5-
coverage
5+
coverage
6+
.idea

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"minimist": ">=1.2.2"
5353
},
5454
"dependencies": {
55-
"@types/prettier": "^1.19.0",
55+
"@types/prettier": "^2.0.0",
5656
"import-sort": "^6.0.0",
5757
"import-sort-config": "^6.0.0",
5858
"import-sort-parser-typescript": "^6.0.0",
@@ -66,15 +66,15 @@
6666
"conventional-changelog-conventionalcommits": "^4.2.3",
6767
"husky": "^4.2.3",
6868
"lint-staged": "^10.0.8",
69-
"prettier": "^1.19.1",
69+
"prettier": "^2.0.0",
7070
"prettier-plugin-packagejson": "^2.0.10",
7171
"semantic-release": "^17.0.4",
7272
"tsdx": "^0.12.3",
7373
"tslib": "^1.11.1",
7474
"typescript": "^3.8.3"
7575
},
7676
"peerDependencies": {
77-
"prettier": "^1.19.1"
77+
"prettier": "^2.0.0"
7878
},
7979
"importSort": {
8080
".js,.ts,.tsx": {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import sortImports from 'import-sort';
44
import { IConfigByGlobs, getConfig } from 'import-sort-config';
55
import { Plugin } from 'prettier';
6-
import { parsers as javascriptParsers } from 'prettier/parser-babylon';
6+
import { parsers as javascriptParsers } from 'prettier/parser-babel';
77
import { parsers as typescriptParsers } from 'prettier/parser-typescript';
88
import invariant from 'tiny-invariant';
99

yarn.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,10 +1341,10 @@
13411341
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
13421342
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
13431343

1344-
"@types/prettier@^1.19.0":
1345-
version "1.19.0"
1346-
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.0.tgz#a2502fb7ce9b6626fdbfc2e2a496f472de1bdd05"
1347-
integrity sha512-gDE8JJEygpay7IjA/u3JiIURvwZW08f0cZSZLAzFoX/ZmeqvS0Sqv+97aKuHpNsalAMMhwPe+iAS6fQbfmbt7A==
1344+
"@types/prettier@^2.0.0":
1345+
version "2.0.0"
1346+
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4"
1347+
integrity sha512-/rM+sWiuOZ5dvuVzV37sUuklsbg+JPOP8d+nNFlo2ZtfpzPiPvh1/gc8liWOLBqe+sR+ZM7guPaIcTt6UZTo7Q==
13481348

13491349
"@types/resolve@0.0.8":
13501350
version "0.0.8"
@@ -7237,6 +7237,11 @@ prettier@^1.19.1:
72377237
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
72387238
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
72397239

7240+
prettier@^2.0.0:
7241+
version "2.0.5"
7242+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
7243+
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
7244+
72407245
pretty-format@^24.9.0:
72417246
version "24.9.0"
72427247
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"

0 commit comments

Comments
 (0)