Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeScript] Add trailing comma for only arrow functions in tsx. (#6190)
* Modify to add traling comma only for allow-function * Add tests * Update CHANGELOG.unreleased.md * Add pr number and link * Modify to improve RegExp to detect tsx file
- Loading branch information
1 parent
4cc9924
commit 8812792
Showing
4 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
const functionName1 = <T,>(arg) => false; | ||
const functionName2 = <T extends any>(arg) => false; | ||
const functionName3 = <T, S>(arg) => false; | ||
|
||
function functionName4<T>() { | ||
return false; | ||
} | ||
|
||
functionName5<T>(); | ||
|
||
interface Interface1<T> { | ||
one: "one"; | ||
} | ||
|
||
interface Interface2 { | ||
two: Two<T>; | ||
} | ||
|
||
type Type1<T> = "type1"; | ||
|
||
type Type2 = Two<T>; |