Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace trimLeft/trimRight with trimStart/trimEnd #15750

Merged
merged 1 commit into from Apr 2, 2022
Merged

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

String#trimLeft/String#trimRight are defined in Annex B, for web compatibility.

We should always use String#trimStart/String#trimEnd.

What changes did you make? (Give an overview)

Replaced all occurrences of trimLeft with trimStart, and trimRight with trimEnd.

Is there anything you'd like reviewers to focus on?

The new methods should be available in all Node.js versions ESLint supports.

https://node.green/#ES2019-features-string-trimming

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing labels Apr 1, 2022
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM

@nzakas nzakas merged commit a59a4e6 into main Apr 2, 2022
@nzakas nzakas deleted the string-trim branch April 2, 2022 00:16
nzakas pushed a commit that referenced this pull request Apr 5, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 9, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.12.0` -> `8.13.0`](https://renovatebot.com/diffs/npm/eslint/8.12.0/8.13.0) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.13.0`](https://github.com/eslint/eslint/releases/v8.13.0)

[Compare Source](eslint/eslint@v8.12.0...v8.13.0)

#### Features

-   [`274acbd`](eslint/eslint@274acbd) feat: fix no-eval logic for `this` in arrow functions ([#&#8203;15755](eslint/eslint#15755)) (Milos Djermanovic)

#### Bug Fixes

-   [`97b57ae`](eslint/eslint@97b57ae) fix: invalid operator in operator-assignment messages ([#&#8203;15759](eslint/eslint#15759)) (Milos Djermanovic)

#### Documentation

-   [`c32482e`](eslint/eslint@c32482e) docs: Typo in space-infix-ops docs  ([#&#8203;15754](eslint/eslint#15754)) (kmin-jeong)
-   [`f2c2d35`](eslint/eslint@f2c2d35) docs: disambiguate types `FormatterFunction` and `LoadedFormatter` ([#&#8203;15727](eslint/eslint#15727)) (Francesco Trotta)

#### Chores

-   [`bb4c0d5`](eslint/eslint@bb4c0d5) chore: Refactor docs to work with docs.eslint.org ([#&#8203;15744](eslint/eslint#15744)) (Nicholas C. Zakas)
-   [`d36f12f`](eslint/eslint@d36f12f) chore: remove `lib/init` from eslint config ([#&#8203;15748](eslint/eslint#15748)) (Milos Djermanovic)
-   [`a59a4e6`](eslint/eslint@a59a4e6) chore: replace `trimLeft`/`trimRight` with `trimStart`/`trimEnd` ([#&#8203;15750](eslint/eslint#15750)) (Milos Djermanovic)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1296
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
srijan-deepsource pushed a commit to DeepSourceCorp/eslint that referenced this pull request May 30, 2022
srijan-deepsource added a commit to DeepSourceCorp/eslint that referenced this pull request May 30, 2022
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Sep 30, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants