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

fix(eslint-plugin): update code to use estree range instead of ts pos/end #4790

Merged
merged 2 commits into from Apr 8, 2022

Conversation

armano2
Copy link
Member

@armano2 armano2 commented Apr 6, 2022

PR Checklist

Overview

Use location data from estree instead of typescript, this change fixes fixer when used with 3th party parsers

This issue is present in any parser that modifies location data of estree nodes, eg. mdx, vue

@armano2 armano2 added bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin labels Apr 6, 2022
@nx-cloud
Copy link

nx-cloud bot commented Apr 6, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9acd7e1. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 39 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @armano2!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Apr 6, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 9acd7e1
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6250658b25133900083d50e1
😎 Deploy Preview https://deploy-preview-4790--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@armano2
Copy link
Member Author

armano2 commented Apr 6, 2022

not sure how to write proper tests for this

@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #4790 (9acd7e1) into main (c59d9d7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #4790   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files         151      151           
  Lines        8208     8210    +2     
  Branches     2670     2671    +1     
=======================================
+ Hits         7739     7741    +2     
  Misses        261      261           
  Partials      208      208           
Flag Coverage Δ
unittest 94.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-plugin/src/rules/no-unnecessary-type-assertion.ts 94.66% <ø> (ø)
.../eslint-plugin/src/rules/method-signature-style.ts 89.15% <100.00%> (+0.26%) ⬆️

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Makes sense. I'll file a followup issue to add an internal lint rule to enforce this.

@JoshuaKGoldberg JoshuaKGoldberg enabled auto-merge (squash) April 8, 2022 16:40
@JoshuaKGoldberg JoshuaKGoldberg merged commit a1e9fc4 into main Apr 8, 2022
@JoshuaKGoldberg JoshuaKGoldberg deleted the fix/use-node-range-insteadof-typescript-4723 branch April 8, 2022 17:44
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 13, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.18.0` -> `5.19.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.18.0/5.19.0) |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.18.0` -> `5.19.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.18.0/5.19.0) |

---

### Release Notes

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary>

### [`v5.19.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5190-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5180v5190-2022-04-11)

[Compare Source](typescript-eslint/typescript-eslint@v5.18.0...v5.19.0)

##### Bug Fixes

-   **eslint-plugin:** update code to use estree range instead of ts pos/end [#&#8203;4723](typescript-eslint/typescript-eslint#4723) ([#&#8203;4790](typescript-eslint/typescript-eslint#4790)) ([a1e9fc4](typescript-eslint/typescript-eslint@a1e9fc4))

##### Features

-   **eslint-plugin:** \[unified-signatures] add `ignoreDifferentlyNamedParameters` option ([#&#8203;4659](typescript-eslint/typescript-eslint#4659)) ([fdf95e0](typescript-eslint/typescript-eslint@fdf95e0))
-   **eslint-plugin:** add support for valid number and bigint intersections in restrict-plus-operands rule ([#&#8203;4795](typescript-eslint/typescript-eslint#4795)) ([19c600a](typescript-eslint/typescript-eslint@19c600a))

</details>

<details>
<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary>

### [`v5.19.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5190-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5180v5190-2022-04-11)

[Compare Source](typescript-eslint/typescript-eslint@v5.18.0...v5.19.0)

**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)

</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 these updates 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/1299
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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants