Skip to content

Conversation

@fisker
Copy link
Member

@fisker fisker commented Nov 18, 2019

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

@fisker
Copy link
Member Author

fisker commented Nov 18, 2019

trimLeft is alias of trimStart, shouldn't prefer trimStart?

String.prototype.trimLeft.name === 'trimStart' // in some engine

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimLeft
(redirect to trimStart)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 What do you think open issue about a new rule in eslint-plugin-unicorn for this cases?

@fisker
Copy link
Member Author

fisker commented Nov 18, 2019

go ahead

@lydell lydell merged commit 596f55e into prettier:next Nov 18, 2019
@fisker fisker deleted the trim-end branch November 18, 2019 23:54
sosukesuzuki pushed a commit to sosukesuzuki/prettier that referenced this pull request Jan 2, 2020
lipis added a commit that referenced this pull request Jan 8, 2020
* '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)
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 17, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants