Closed zhaoyao91 closed 4 years ago
Duplicate of #632. It's quite breaking and still getting bugs/patches, so TSDX will update at a later date. v0.13.x will likely focus on template improvements and perhaps some minor additions, we'll see if this is ready by v0.14
Fortunately, I found this issue. I am using private fields (TS 3.8 I believe) which prettier@v1
cannot parse. Therefore, the version of prettier somewhat relates to the TS version one can use1 (or at least to the set of useable language features). So this should be stated in the docs/README, shouldn't it?
According to the package.json the TS version is typescript@^3.7.3
...
Is there a way to override the prettier version for the lint
API? Maybe it would be possible in my case to just install prettier@^2.0.0
and change some setting of TSDX.
1 "Use" in terms of linting (not building) and committing
Sorry for delayed response, private fields actually cause some build-chain issues upstream per https://github.com/formium/tsdx/pull/679#issuecomment-631478298. I think we might be able to upgrade still according to some users, so that's may not be a blocker per se, but it blocks usage of the private fields feature.
@agilgur5 Just wandered if this will be updated at any given point or do we have any timelines? Currently i get an error
error Parsing error: 'from' expected prettier/prettier
when i use export * as something from 'something'
. I know the workaround is to import then re-export but would be good if we could bump this to v2.
Thanks is advance 😄
@MMT-LD the PR this duplicates is scoped out for v0.16.0 to go along with TS upgrades and ESLint upgrades etc since they all affect each other (one of the issues with an all-in-one library; massive API surface and easy breakage). I'm still not sure private fields are supported however, but I think otherwise it should work.
You can workaround this by adding a resolution
too.
Going to lock this as it's a duplicate.
@agilgur5 Thanks for updating me. Looking forward to that release 😉 . Thanks for maintaining such an awesome lib 👏
Current Behavior
the current tsdx uses prettier v1.19
Desired Behavior
upgrade prettier to v2
Versions