Set trailingComma default value to es5 #6963
Conversation
trailingComma default value to es5 trailingComma default value to es5
alexander-akait
left a comment
There was a problem hiding this comment.
/cc @prettier/core
Why don't use engines.node field from package.json for better 0CJS and keep this option as none by default?
|
@evilebottnawi come on, it's 2019, still some |
|
@fisker no, but some people can write es3 code in theory can inserting trailing commas can break code, but if we don't support es3 we can set |
# Conflicts: # tests/angular_interpolation/jsfmt.spec.js
trailingComma default value to es5 trailingComma default value to es5
|
Self checked, didn't find any wrong result. This is hard to review, but I think it's ready |
| description: | ||
| "Trailing commas where valid in ES5 (objects, arrays, etc.)" | ||
| }, | ||
| { value: "none", description: "No trailing commas." }, |
There was a problem hiding this comment.
I’d prefer if the order wasn’t changed, as that way,
es5is still implied to be betweennoneandall.
There was a problem hiding this comment.
@ExE-Boss why? after changing default to
es5, shouldn't we put it on the top?
| @@ -1,2 +1,2 @@ | |||
| run_spec(__dirname, ["typescript"], { trailingComma: "none" }); | |||
There was a problem hiding this comment.
I change the test orders to help review, snap changes should only be
optionspart
|
@evilebottnawi We already turned down #6936 so adding automatic support for ES3 here won’t make sense. I think we should keep things simple. |
|
So merginnnnn? |
|
Let's do it |
|
👍 |
* Set `trailingComma` default value to `es5` * Update `options` documentation * Update tests * style * fix js code style * change options order * update tests_integration snap * disable es5 for __ng_interpolation * fix angular tests * fix scss test * fix `css_trailing_comma` snap * fix css_scss snapshot
* 'next' of github.com:prettier/prettier: Optimize some usage of `Array#filter` (#6996) Update `jest` to v24 (#6954) Replace `trim{Left,Right}` with `trim{Start,End}` (#6994) Set `trailingComma` default value to `es5` (#6963) Fix `new` usage for builtin objects (#6968) Replace `indexOf` with `includes` (#6967) fix: tests for empty type parameters in TS (#6960) Fix MDX html parsing errors (#6949) fix: issue #6813 (Zero-based lists are broken) (#6852) Style: use async functions (#6935) Disable trailingComma for Angular internal parser (#6912) Update `snapshot-diff` to v0.6.1 (#6955) Update build scripts to target Node.js 10 (#6908)
|
@fisker I'm working on #6929 and am about to create |
|
@kachkaev I didn't wrote one, if it's required, hope someone can help me out. I'm really bad at docs and English :( |
#6910
docs/directory)changelog_unreleased/*/pr-XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨