Skip to content
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

Merged
merged 1 commit into from Oct 24, 2019

Conversation

sairus2k
Copy link
Contributor

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 ignore fsevents import.

Test plan

Linting without caching:
eslint . --report-unused-disable-directives --ext js,jsx,ts,tsx,md

@facebook-github-bot
Copy link
Contributor

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!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@codecov-io
Copy link

Codecov Report

Merging #9066 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
packages/jest-haste-map/src/lib/FSEventsWatcher.ts 12.5% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc74b51...ed37a8e. Read the comment docs.

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

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

Awesome! @SimenB @thymikee can you check that this works for you, I don't have a Mac anymore.

@@ -105,6 +105,7 @@ module.exports = {
],
},
],
'import/no-unresolved': [2, {ignore: ['fsevents']}],
Copy link
Collaborator

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

Copy link
Contributor Author

@sairus2k sairus2k Oct 21, 2019

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.

@thymikee thymikee merged commit 164e209 into jestjs:master Oct 24, 2019
@sairus2k sairus2k deleted the fix-lint-error-fsevents branch October 26, 2019 03:51
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants