-
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
repo: add runtime-import-check
eslint rule
#10124
Conversation
7b8b527
to
95aea85
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.
I have tested it by removing some of the lint disabling lines and it works as expected 👍
The code looks good to me, with only one typo mentioned as an inline comment.
@vince-fugnitto , it would be great to raise an issue and make a reference to it in this PR i.e. to track fixes for the deviations disabled on this baseline. |
d6c5c43
to
01aeef4
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 additional changes look good to me,
I have only verified the functionality under Linux.
@colin-grant-work the error message was updated to include the list of allowed folder as requested offline. Example:
|
The commit adds a custom eslint rule to warn when we are importing from folders meant for incompatible runtimes, and enforces our code organization guidelines. When we import from such invalid runtimes we may cause downstream adopters and extensions issues, namely when they attempt to import from valid sources but our imports break them. Signed-off-by: vince-fugnitto <[email protected]> Co-authored-by: Paul Maréchal <[email protected]>
b989405
to
a6964f9
Compare
What it does
Fixes: #5873
The pull-request adds a custom eslint rule meant to check for invalid runtime imports which do not comply to our code organization guidelines. The rule will help us identify uses of invalid imports which cause downstream adopters and extenders runtime issues.
How to test
The new rule should report errors when we use invalid imports based on different runtimes.
The pull-request includes a baseline commit meant to suppress the errors currently in the codebase so we can track and fix them, while new errors from contributions should fail linting.
Review checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto [email protected]