fix(plugin-initial-state)/prettier app.ts parse error#902
Closed
stormslowly wants to merge 6 commits intomasterfrom
Closed
fix(plugin-initial-state)/prettier app.ts parse error#902stormslowly wants to merge 6 commits intomasterfrom
stormslowly wants to merge 6 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #902 +/- ##
==========================================
- Coverage 44.41% 43.92% -0.50%
==========================================
Files 67 67
Lines 1727 1760 +33
Branches 474 478 +4
==========================================
+ Hits 767 773 +6
- Misses 951 978 +27
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PeachScript
reviewed
Sep 9, 2022
| const enable = shouldPluginEnable(entryFile); | ||
| let enable = false; | ||
|
|
||
| try { |
Member
There was a problem hiding this comment.
封装成一个公共方法?比如 tryCatchFriendlyParseError,捕获 & codeFrame 逻辑写里面,外部传个函数进去执行
Member
Author
There was a problem hiding this comment.
现在各个包都是独立的,提取还是重复代码就没提取了。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
after
ERROR parse /Users/example/git/problem/umi3-project/src/app.ts Failed 5 | if(true){ 6 | console.log('yes') > 7 | }, | ^ 8 | console.trace('xxxxxxxxxxxxytyyyyyyyyy') 9 | } 10 | Unexpected token (7:3) SyntaxError: Unexpected token (7:3) at Object._raise (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:28077:17) at Object.raiseWithData (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:28070:17) at Object.raise (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:28031:17) at Object.unexpected (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:37201:16) at Object.parseExprAtom (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:38603:20) at Object.parseExprSubscripts (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:38174:23) at Object.parseUpdate (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:38154:21) at Object.parseMaybeUnary (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:38132:23) at Object.parseMaybeUnary (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:34863:20) at Object.parseExprOps (/Users/example/git/plugins/node_modules/@umijs/deps/compiled/babel/bundle.js:37989:23)before
Unexpected token (7:3) SyntaxError: Unexpected token (7:3) at instantiate (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:26189:32) at constructor (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:26476:12) at Object.raise (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:29456:19) at Object.unexpected (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:29494:16) at Object.parseExprAtom (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:39240:22) at Object.parseExprSubscripts (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:38765:23) at Object.parseUpdate (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:38744:21) at Object.parseMaybeUnary (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:38715:23) at Object.parseMaybeUnary (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:36917:20) at Object.parseMaybeUnaryOrPrivate (/Users/example/git/umi3/packages/deps/compiled/babel/bundle.js:38509:61)