Comments (2)
Input:
data: {nom: string, prenom:string}
Output:
data:{nom:string; prenom:string}
Expected:
data:{nom:string, prenom:string}
Why?
from prettier.
The issue is somewhat obscure, so Iβm not sure we can help with it. If you experience comma to semicolon conversion in typings, itβs expected behavior.
Prettier 3.2.5
Playground link
--parser typescript
Input:
const demo = (data: { nom: string, prenom: string }) => {
console.log(data)
}
Output:
const demo = (data: { nom: string; prenom: string }) => {
console.log(data);
};
Prettier 3.2.5
Playground link
--parser typescript
--no-semi
Input:
const demo = (data: { nom: string, prenom: string }) => {
console.log(data)
}
Output:
const demo = (data: { nom: string; prenom: string }) => {
console.log(data)
}
from prettier.
Related Issues (20)
- Typescript 5 const modifier on type parameters leads to SyntaxError HOT 1
- Simple template literal should break at all interpolations instead of exceeding the max line width HOT 6
- ENAMETOOLONG error when running prettier HOT 1
- [Feature Request] Add support for TS config files (`prettier.config.ts`) HOT 1
- Non-idempotent and otherwise buggy behavior around intersections and line comments
- Feature request: dark theme for https://prettier.io/ HOT 3
- Add support for `#graphql` comment for formatting GraphQL HOT 3
- Non-idempotent formatting of Angular templates (new lines being inserted on each run) HOT 1
- yaml with folded multiline string and "--prose-wrap always" improperly wraps (and is not idempotent) HOT 3
- documentation request: yaml and prose-wrap
- Enforce consistent use of file extensions in import statements HOT 1
- Unstable formatting of javascript method chains HOT 1
- Dependencies required by scripts/build/utils.js are not reflected in package.json HOT 1
- Give us the option to only apply a plugin on a file HOT 1
- Prettier breaks vue2 syntax when using filters in template
- [MDX] Does not keep indentation in multiline strings HOT 1
- Issue when running prettier for any APEX class in my project HOT 1
- Range formatting doesn't work
- VSCode prettier extension and the `prettier --write .` giving two different results HOT 2
- In less file, automatically insert space between ) and ` HOT 2
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 prettier.