-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: fix eslint-plugin runtime import check rule #10667
fix: fix eslint-plugin runtime import check rule #10667
Conversation
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.
Thank you for your contribution @ohmyide 👍
In order to accept your changes please be sure to sure to sign the eclipse contributor agreement (eca) with the same email as your authorship.
Can you describe a use-case that the rule fails today, it was not clear in your description.
8ce5ca9
to
4cec0e3
Compare
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.
The changes look good, it looks like you were able to identify another issue in the codebase.
We will need to suppress it for the time being so we can then fix it (error).
You can suppress it like other instances, using:
packages/plugin-ext/src/common/plugin-api-rpc.ts
// eslint-disable-next-line @theia/runtime-import-check
import { PickOptions, QuickInputButtonHandle, QuickPickItem, WidgetOpenerOptions } from '@theia/core/lib/browser';
@ohmyide I understand the fix :) I confirmed that it works and you actually helped identify an issue which would need to be suppressed for the time being like I commented in #10667 (review) (else the CI checks fail) 👍 |
ok, thanks for your prompt reply |
a1c2e0b
to
bf908bb
Compare
@vince-fugnitto |
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.
The changes look good to me, thank you for your contribution 👍
@paul-marechal do you have any objections?
dev-packages/private-eslint-plugin/rules/runtime-import-check.js
Outdated
Show resolved
Hide resolved
bf908bb
to
ffebaf6
Compare
…ble-next-line in plugin-api-rpc.ts Signed-off-by: chuanjin wang <[email protected]>
ffebaf6
to
9e56bfa
Compare
What it does
fix eslint-plugin runtime import check rule
How to test
run: yarn lint
case:
in a common folder like: src/common/**.ts ,the rule only matched /browser/, unmatched /browser;:
if (matchedImportRule.restricted.some(restricted => module.includes(
/${restricted}/
))) {Review checklist
Reminder for reviewers
Signed-off-by: ohmyide [email protected]