-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(plugin-initial-state)/prettier app.ts parse error #902
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
const enable = shouldPluginEnable(entryFile); | ||
let enable = false; | ||
|
||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
封装成一个公共方法?比如 tryCatchFriendlyParseError
,捕获 & codeFrame 逻辑写里面,外部传个函数进去执行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在各个包都是独立的,提取还是重复代码就没提取了。
after
before