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
chore: fix linting error on macOS #9066
Conversation
Hi sairus2k! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #9066 +/- ##
=======================================
Coverage 64.07% 64.07%
=======================================
Files 277 277
Lines 11681 11681
Branches 2864 2864
=======================================
Hits 7485 7485
Misses 3572 3572
Partials 624 624
Continue to review full report at Codecov.
|
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.
@@ -105,6 +105,7 @@ module.exports = { | |||
], | |||
}, | |||
], | |||
'import/no-unresolved': [2, {ignore: ['fsevents']}], |
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.
Yea, this fixes the issue. However, maybe it would be better to mark it as dev dependency, and remove from optionalDependencies
? Same as we use weak-napi
. cc @SimenB
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 think fsevents
should not be in devDependencies
because it might throw an error during installation on non-macOS systems.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Related issue #9015
On macOS, the 'import/no-unresolved' rule doesn't throw an error when importing 'fsevents' module. Therefore it does not need to disable this rule, because eslint throws an error when
--report-unused-disable-directives
is used. In my opinion, the best way is to ignorefsevents
import.Test plan
Linting without caching:
eslint . --report-unused-disable-directives --ext js,jsx,ts,tsx,md