Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): [ban-types] update message to suggestobject instead ofRecord<string, unknown>#6079

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bradzacher merged 19 commits intotypescript-eslint:mainfromkmin-jeong:feat/5949
Dec 7, 2022

Conversation

@kmin-jeong
Copy link
Contributor

@kmin-jeongkmin-jeong commentedNov 24, 2022
edited by JoshuaKGoldberg
Loading

PR Checklist

Overview

Updates the report message to mentionobject first instead ofRecord<string, never>.

Co-authored-by:@RyanCavanaugh

Tan11Tan reacted with thumbs up emoji
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@kmin-jeong!

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 onhttps://opencollective.com/typescript-eslint.

@nx-cloud
Copy link

nx-cloudbot commentedNov 24, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit6a22bef. 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 47 targets

Sent with 💌 fromNxCloud.

@netlify
Copy link

netlifybot commentedNov 24, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit6a22bef
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/638a171a28d6e60008c9ded3
😎 Deploy Previewhttps://deploy-preview-6079--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 yourNetlify site settings.

@Josh-Cena
Copy link
Member

Are we un-suggestingRecord<string, never> orRecord<string, unknown>? To me the former is more problematic, but this PR is not changing the right thing.

@kmin-jeong
Copy link
ContributorAuthor

@Josh-Cena@JoshuaKGoldberg I changed the part of the message according to the proposal in the issue and sent a pr draft. I saw the issue and understood that the object was used instead of 'Record<string, unknown>'. Did I get it wrong? I haven't worked on the code and the test code yet.

@bradzacher
Copy link
Member

This is the correct fix (it's just a re-creation of#5018).

@kmin-jeongkmin-jeong marked this pull request as ready for reviewNovember 29, 2022 08:06
@kmin-jeongkmin-jeong changed the titlefix(eslint-plugin): suggest object, not Record<string, never>fix(eslint-plugin): use object instead of Record<string, never>Nov 29, 2022
@kmin-jeong
Copy link
ContributorAuthor

@bradzacher@Josh-Cena@JoshuaKGoldberg
I fixed the part in the record. I add the short test code, and converted the draft into a pr. If I understand something wrong or there is something wrong with the code, I will correct it.

Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

looks like you've introduced some type errors

@kmin-jeong
Copy link
ContributorAuthor

@bradzacher I add type Types and type checkrequiredTypes to fix lint errors.

@kmin-jeong
Copy link
ContributorAuthor

kmin-jeong commentedDec 1, 2022
edited
Loading

After looking at this issue and the discussion mentioned in the issue, I added the test code and requested the pr. I don't know the range where I shouldn't use type Record <string, never>. if I just need to modify the message to 'use object instead', or if I need to modify the code in the type Record <string, never> and let the message 'use object instead' come out.@JoshuaKGoldberg and@bradzacher, Are there any other issues or discursions that mention the scope of use of Record?
If think it's unnecessary pr, I'll close it.

  • There was a misspelling part, so I modified it.
  • there was a vague part I was correct it.

@bradzacher
Copy link
Member

@kmin-jeong the fix we're looking for here is to update the message so that it suggests usingobject.
You're first commit (f679c99) was the correct fix!

@bradzacherbradzacher added the awaiting responseIssues waiting for a reply from the OP or another party labelDec 2, 2022
@kmin-jeong
Copy link
ContributorAuthor

@bradzacher I vaguely thought I should fix the code, too. I modified ban-types.ts again like Commit (f679c99).

@JoshuaKGoldberg
Copy link
Member

Psst - you don't have to keep @ tagging us. We'll see the updates come in and reply when we can. 🙂

JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesDec 2, 2022
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

The code changes look good, thanks! I'll take care of the test revert.

I also filled out theOverview in the PR.

@JoshuaKGoldbergJoshuaKGoldbergenabled auto-merge (squash)December 2, 2022 15:19
@Josh-Cena
Copy link
Member

Josh-Cena commentedDec 2, 2022
edited
Loading

Shouldn't the PR title say "instead ofRecord<string, unknown> then? Also, there's minor difference between aRecord and anobject (the latter has no index signatures and you can access nothing on it directly), but maybe that doesn't matter much, and it's probably safer to suggestobject anyway.

JoshuaKGoldberg reacted with thumbs up emoji

@JoshuaKGoldbergJoshuaKGoldberg changed the titlefix(eslint-plugin): use object instead of Record<string, never>fix(eslint-plugin): use object instead of Record<string, unknown>Dec 2, 2022
@JoshuaKGoldberg
Copy link
Member

Ah thanks, good catch on the title - updated.

And yeah they're notquite the same butobject is close enough for most cases.

@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelDec 7, 2022
@bradzacherbradzacher changed the titlefix(eslint-plugin): use object instead of Record<string, unknown>fix(eslint-plugin): [ban-types] update message to suggestobject instead ofRecord<string, unknown>Dec 7, 2022
@bradzacherbradzacher merged commitd91a5fc intotypescript-eslint:mainDec 7, 2022
@kmin-jeongkmin-jeong deleted the feat/5949 branchDecember 10, 2022 06:26
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull requestDec 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.44.0` -> `5.46.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.44.0/5.46.0) || [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.44.0` -> `5.46.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.44.0/5.46.0) |---### Release Notes<details><summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary>### [`v5.46.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5460-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5451v5460-2022-12-08)[Compare Source](typescript-eslint/typescript-eslint@v5.45.1...v5.46.0)##### Bug Fixes-   **eslint-plugin:** \[ban-types] update message to suggest `object` instead of `Record<string, unknown>` ([#&#8203;6079](typescript-eslint/typescript-eslint#6079)) ([d91a5fc](typescript-eslint/typescript-eslint@d91a5fc))##### Features-   **eslint-plugin:** \[prefer-nullish-coalescing] logic and test for strict null checks ([#&#8203;6174](typescript-eslint/typescript-eslint#6174)) ([8a91cbd](typescript-eslint/typescript-eslint@8a91cbd))#### [5.45.1](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) (2022-12-05)##### Bug Fixes-   **eslint-plugin:** \[keyword-spacing] unexpected space before/after in `import type` ([#&#8203;6095](typescript-eslint/typescript-eslint#6095)) ([98caa92](typescript-eslint/typescript-eslint@98caa92))-   **eslint-plugin:** \[no-shadow] add call and method signatures to `ignoreFunctionTypeParameterNameValueShadow` ([#&#8203;6129](typescript-eslint/typescript-eslint#6129)) ([9d58b6b](typescript-eslint/typescript-eslint@9d58b6b))-   **eslint-plugin:** \[prefer-optional-chain] collect MetaProperty type ([#&#8203;6083](typescript-eslint/typescript-eslint#6083)) ([d7114d3](typescript-eslint/typescript-eslint@d7114d3))-   **eslint-plugin:** \[sort-type-constituents, sort-type-union-intersection-members] handle some required parentheses cases in the fixer ([#&#8203;6118](typescript-eslint/typescript-eslint#6118)) ([5d49d5d](typescript-eslint/typescript-eslint@5d49d5d))### [`v5.45.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5451-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5450v5451-2022-12-05)[Compare Source](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1)##### Bug Fixes-   **eslint-plugin:** \[keyword-spacing] unexpected space before/after in `import type` ([#&#8203;6095](typescript-eslint/typescript-eslint#6095)) ([98caa92](typescript-eslint/typescript-eslint@98caa92))-   **eslint-plugin:** \[no-shadow] add call and method signatures to `ignoreFunctionTypeParameterNameValueShadow` ([#&#8203;6129](typescript-eslint/typescript-eslint#6129)) ([9d58b6b](typescript-eslint/typescript-eslint@9d58b6b))-   **eslint-plugin:** \[prefer-optional-chain] collect MetaProperty type ([#&#8203;6083](typescript-eslint/typescript-eslint#6083)) ([d7114d3](typescript-eslint/typescript-eslint@d7114d3))-   **eslint-plugin:** \[sort-type-constituents, sort-type-union-intersection-members] handle some required parentheses cases in the fixer ([#&#8203;6118](typescript-eslint/typescript-eslint#6118)) ([5d49d5d](typescript-eslint/typescript-eslint@5d49d5d))### [`v5.45.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#&#8203;5450-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5440v5450-2022-11-28)[Compare Source](typescript-eslint/typescript-eslint@v5.44.0...v5.45.0)##### Bug Fixes-   **eslint-plugin:** \[array-type] --fix flag removes parentheses from type ([#&#8203;5997](typescript-eslint/typescript-eslint#5997)) ([42b33af](typescript-eslint/typescript-eslint@42b33af))-   **eslint-plugin:** \[keyword-spacing] prevent crash on no options ([#&#8203;6073](typescript-eslint/typescript-eslint#6073)) ([1f19998](typescript-eslint/typescript-eslint@1f19998))-   **eslint-plugin:** \[member-ordering] support private fields ([#&#8203;5859](typescript-eslint/typescript-eslint#5859)) ([f02761a](typescript-eslint/typescript-eslint@f02761a))-   **eslint-plugin:** \[prefer-readonly] report if a member's property is reassigned ([#&#8203;6043](typescript-eslint/typescript-eslint#6043)) ([6e079eb](typescript-eslint/typescript-eslint@6e079eb))##### Features-   **eslint-plugin:** \[member-ordering] add a required option for required vs. optional member ordering ([#&#8203;5965](typescript-eslint/typescript-eslint#5965)) ([2abadc6](typescript-eslint/typescript-eslint@2abadc6))</details><details><summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary>### [`v5.46.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5460-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5451v5460-2022-12-08)[Compare Source](typescript-eslint/typescript-eslint@v5.45.1...v5.46.0)**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)#### [5.45.1](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) (2022-12-05)##### Bug Fixes-   **parser:** remove the jsx option requirement for automatic jsx pragma resolution ([#&#8203;6134](typescript-eslint/typescript-eslint#6134)) ([e777f5e](typescript-eslint/typescript-eslint@e777f5e))### [`v5.45.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5451-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5450v5451-2022-12-05)[Compare Source](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1)##### Bug Fixes-   **parser:** remove the jsx option requirement for automatic jsx pragma resolution ([#&#8203;6134](typescript-eslint/typescript-eslint#6134)) ([e777f5e](typescript-eslint/typescript-eslint@e777f5e))### [`v5.45.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#&#8203;5450-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5440v5450-2022-11-28)[Compare Source](typescript-eslint/typescript-eslint@v5.44.0...v5.45.0)**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - 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, check this box---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40Mi4wIiwidXBkYXRlZEluVmVyIjoiMzQuNTEuMCJ9-->Co-authored-by: cabr2-bot <cabr2.help@gmail.com>Reviewed-on:https://codeberg.org/Calciumdibromid/CaBr2/pulls/1666Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsDec 18, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@bradzacherbradzacherAwaiting requested review from bradzacher

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: [ban-types] Should suggest object, not Record<string, never>

4 participants

@kmin-jeong@Josh-Cena@bradzacher@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp