question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong formatting of the trick for generics in tsx

See original GitHub issue

I’m not sure should it be solved here on at prettierx.

<T,>(props: Props<T>) => {} will be fomatted without a space: <T,>, but standard adds this space.

Related issue https://github.com/brodybits/prettierx/issues/107

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sheeruncommented, Jan 15, 2020

Sorry I’m not fluent with what prettier can do 😃

On Wed, 15 Jan 2020 at 08:43, Uladzimir Havenchyk notifications@github.com wrote:

@sheerun https://github.com/sheerun what do you think if we disable rule comma-spacing from eslint if it’s covered by prettier(x?)

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sheerun/prettier-standard/issues/94?email_source=notifications&email_token=AACHMDLZURADH4XH5BSKSM3Q525A3A5CNFSM4KGX6VN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI7LVGI#issuecomment-574536345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHMDKULVTG53Z7WIGHKLTQ525A3ANCNFSM4KGX6VNQ .

0reactions
havenchykcommented, Mar 4, 2020

Nice, thanks @sheerun, I’ll check it. I migrated my codebase to T extends unknown. See who started it 😄?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Use Generics in TypeScript - DigitalOcean
Generics appear in TypeScript code inside angle brackets, in the format < T > , where T represents a passed-in type.
Read more >
Typescript TSX and generic parameters - Stack Overflow
So I have an expression that works quite well with traditional *.ts files but no with *.tsx ones: const f = <T1>(arg1: T1)...
Read more >
Documentation - Type Checking JavaScript Files - TypeScript
In a .js file, TypeScript understands the CommonJS module format. Assignments to exports and module.exports are recognized as export declarations.
Read more >
TypeScript Arrays - TutorialsTeacher
An array in TypeScript can contain elements of different data types using a generic array type syntax, as shown below. Example: Multi Type...
Read more >
Creating an SVG Icon System with React - CSS-Tricks
... and Chris Coyier wrote another awesome article here on CSS-Tricks as well. ... with (or ourselves) that we're using props incorrectly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found