Print trailing comma for TS type parameters but not type arguments (#10353)
This commit is contained in:
1 parent
04988c3aa0
commit
aef9277ada
7 files changed
+210
-55
No files matched your search
+3
-3
@@ -110,13 +110,13 @@ Use single quotes instead of double quotes in JSX.
|
||||
|
||||
_Default value changed from `none` to `es5` in v2.0.0_
|
||||
|
||||
Print trailing commas wherever possible when multi-line. (A single-line array, for example, never gets trailing commas.)
|
||||
Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.)
|
||||
|
||||
Valid options:
|
||||
|
||||
- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.)
|
||||
- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.). No trailing commas in type parameters in TypeScript.
|
||||
- `"none"` - No trailing commas.
|
||||
- `"all"` - Trailing commas wherever possible (including [trailing commas in function parameter lists and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). This requires node 8 or a modern browser that supports ES2017 or transform with [babel](https://babeljs.io/docs/en/index).
|
||||
- `"all"` - Trailing commas wherever possible (including [function parameters and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). To run, JavaScript code formatted this way needs an engine that supports ES2017 (Node.js 8+ or a modern browser) or [downlevel compilation](https://babeljs.io/docs/en/index). This also enables trailing commas in type parameters in TypeScript (supported since TypeScript 2.7 released in January 2018).
|
||||
|
||||
| Default | CLI Override | API Override |
|
||||
| ------- | ------------------------------------------------------ | ------------------------------------------------------ |
|
||||
|
||||
Reference in new issue
Block a user