-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
feat(linter): implement unicorn/consistent-existence-index-check
lint rule
#7262
feat(linter): implement unicorn/consistent-existence-index-check
lint rule
#7262
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
414e2a6
to
4ea5760
Compare
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
* remove usage of trivias * reduce indentation by preferring let else return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! A few small comments but then I think this will be ready
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
crates/oxc_linter/src/rules/unicorn/consistent_existence_index_check.rs
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #7262 will not alter performanceComparing Summary
|
…_check.rs Co-authored-by: Cam McHenry <camchenry@users.noreply.github.com>
* move diagnostic code to diagnostic function * move fix code into the fix closure * add fail test to fix tests as well
Thanks for the feedback! think i got all yalls suggestions. I also realized I had some clippy issues so fixed those as well |
Merge activity
|
…7262) [unicorn/consistent-existence-index-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md) for #684 --------- Co-authored-by: Cam McHenry <camchenry@users.noreply.github.com>
…7262) [unicorn/consistent-existence-index-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md) for #684 --------- Co-authored-by: Cam McHenry <camchenry@users.noreply.github.com>
…7262) [unicorn/consistent-existence-index-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md) for #684 --------- Co-authored-by: Cam McHenry <camchenry@users.noreply.github.com>
## [0.12.0] - 2024-11-20 - 20d9080 linter: [**BREAKING**] Override plugins array when passed in config file (#7303) (camchenry) ### Features - 1d9f528 linter: Implement `unicorn/prefer-string-raw` lint rule (#7335) (Ryan Walker) - d445e0f linter: Implement `unicorn/consistent-existence-index-check` (#7262) (Ryan Walker) - 01ddf37 linter: Add `allowReject` option to `no-useless-promise-resolve-reject` (#7274) (no-yan) - 755a31b linter: Support bind function case for compatibility with `promise/no-return-wrap` (#7232) (no-yan) - 428770e linter: Add `import/no-namespace` rule (#7229) (Dmitry Zakharov) - 9c91151 linter: Implement typescript/no-empty-object-type (#6977) (Orenbek) - 2268a0e linter: Support `overrides` config field (#6974) (DonIsaac) - 3dcac1a linter: React/exhaustive-deps (#7151) (camc314) - d3a0119 oxlint: Add `cwd` property to `LintRunner` (#7352) (Alexander S.) ### Bug Fixes - ba0b2ff editor: Reload workspace configuration after change (#7302) (Alexander S.) - bc0e72c linter: Handle user variables correctly for import/no_commonjs (#7316) (Dmitry Zakharov) - bf839c1 linter: False positive in `jest/expect-expect` (#7341) (dalaoshu) - ff2a1d4 linter: Move `exhaustive-deps` to `react` (#7251) (camc314) - df5c535 linter: Revert unmatched rule error (#7257) (Cameron A McHenry) - c4ed230 linter: Fix false positive in eslint/no-cond-assign (#7241) (camc314) - ef847da linter: False positive in `jsx-a11y/iframe-has-title` (#7253) (dalaoshu) - 62b6327 linter: React/exhaustive-deps update span for unknown deps diagnostic (#7249) (camc314) ### Documentation - 4c124a8 editor/vscode: Update VS Code readme with installation instructions and available features (#7306) (Nicholas Rayburn) ### Refactor - c6a4868 linter: Temporarily remove unknown rules checking (#7260) (camchenry) ### Testing - 5190b7f editor: Add test setup (#7361) (Alexander S.) Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Hey all, love the project and looking to contribute. Hope this helps!
unicorn/consistent-existence-index-check. for #684