Comments (3)
@hackerwins Thank you for providing usable information.
In my opinion, newline per chain call are not the problem, it seems to be affected by the printWidth
option of prettier
.
In 1.x versions, if there were more than 3 calls, a newline occurred. In the current 2.x version this has been fixed, we are using version 2.0.5.
(reference)
version 1.x playground
version 2.x playground
So I tested it with the code of the part in problem.
printWidth: 80
if (logger.isEnabled(LogLevel.Trivial)) {
logger.trivial(
changes
.map(
(change) =>
`${change
.getID()
.getAnnotatedString()}\t${change.getAnnotatedString()}`,
)
.join('\n'),
);
}
printWidth: 90
if (logger.isEnabled(LogLevel.Trivial)) {
logger.trivial(
changes
.map(
(change) =>
`${change.getID().getAnnotatedString()}\t${change.getAnnotatedString()}`,
)
.join('\n'),
);
}
printWidth: 100
if (logger.isEnabled(LogLevel.Trivial)) {
logger.trivial(
changes
.map((change) => `${change.getID().getAnnotatedString()}\t${change.getAnnotatedString()}`)
.join('\n'),
);
}
However, if we modify it and use it, it affects other parts as well.
For example
- pbSetOperation.setParentCreatedAt(
- toTimeTicket(setOperation.getParentCreatedAt()),
- );
+ pbSetOperation.setParentCreatedAt(toTimeTicket(setOperation.getParentCreatedAt()));
Looking at this, I think there is a part that we have to give up in order for use prettier.
Let me know what you think.
from yorkie-js-sdk.
For now, it would be nice to leave this issue open and wait for an update on Prettier.
from yorkie-js-sdk.
Yes. It would be nice to describe Prettier
in Contribution.md. I thought it would be nice to have Prettier run automatically before commit using a tool like husky.
However, it could not be introduced due to the line break issue below. Do you have any idea about ββthis issue?
#44 (comment)
from yorkie-js-sdk.
Related Issues (20)
- Test fails with yorkie 0.4.5 HOT 3
- Fix high and critical vulnerabilities
- Support Yarn install HOT 4
- Introduce Turborepo to manage packages HOT 3
- Dropping node.js 16 support
- Suggestion: migrate karma to a another test framework
- `debugger` is not positioned properly
- Suggestion: Publish npm package with provenance
- Next.js example is broken on GitHub Pages
- Yorkie-js-sdk api reference document link is broken HOT 1
- Add README and thumbnail on example 'simultaneous-cursors'
- Provide DevTools through Chrome extension
- Unify Error Throwing Methods
- "Not Applicable Datatype" Occurs After Updating to JS SDK v0.4.9 HOT 1
- Parsing error with single quotes in tldraw text HOT 1
- Typo error on Examples!
- Example of simultaneous-cursors not working at official website HOT 1
- Duplicate deregister in Nested Object GC
- Transition to Monorepo using Turborepo, PNPM, Changesets, and Vite
- Missing presence value in `presence-changed` event for initial presence
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yorkie-js-sdk.