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

Update eslint-config dependencies #27085

Closed
wants to merge 1 commit into from

Conversation

friederbluemle
Copy link
Contributor

Summary

A couple of minor and patch updates to the eslint-config package, to avoid warnings and errors with the generated code of the latest RN version templates, such as:

warning "@react-native-community/eslint-config > eslint-plugin-react@7.12.4" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0".
warning "@react-native-community/eslint-config > eslint-plugin-react-native@3.6.0" has incorrect peer dependency "eslint@^3.17.0 || ^4 || ^5".

yarn check outputs the following errors:

error "@react-native-community/eslint-config#eslint-plugin-react-native#eslint@^3.17.0 || ^4 || ^5" doesn't satisfy found match of "eslint@6.6.0"
error "@react-native-community/eslint-config#eslint-plugin-react#eslint@^3.0.0 || ^4.0.0 || ^5.0.0" doesn't satisfy found match of "eslint@6.6.0"

By adding the missing "license" field, from now on this also avoids the following warnings:

warning package.json: No license field
warning @react-native-community/eslint-config@0.0.6: No license field

Changelog

[General] [Fixed] - Fix eslint-config peer dependency warnings

Test Plan

  • Publish current master package locally (0.0.6 is not published yet!)
  • Create new RN 0.61.3 project, set eslint-config to local package, observe errors/warnings running yarn/yarn check
  • yarn lint passes cleanly
  • Update dependencies (as in this PR), republish locally
  • Update RN test project to new eslint-config package, observe no more errors
  • yarn lint still passes cleanly

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Thanks! Let me try to land this at FB.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @friederbluemle in 1353da5.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 4, 2019
@relign
Copy link

relign commented Nov 5, 2019

Thanks for update, babel-eslint@10.0.1 depend on eslint-scope@3.7.1, It causes the following problems:
eslint/eslint#12117
eslint/eslint#12055
And I think this fix can be reflected in the commit.

@friederbluemle
Copy link
Contributor Author

@relign - Sorry can you clarify what you mean by "can be reflected in the commit"?

As of today, 10.0.3 is the latest version of babel-eslint. If it depends on an outdated eslint-scope, then babel-eslint needs to be updated.

@friederbluemle friederbluemle deleted the update-eslint branch November 5, 2019 18:16
@relign
Copy link

relign commented Nov 7, 2019

@friederbluemle I think the update of babel-eslint solve these issue, should be mentioned in changelog. It can be easily find by developer.

@fabianbru
Copy link

When will version 0.0.6 of @react-native-community/eslint-config package released? Thought it will be live with RN 0.61.5... but it's still 0.0.5

@friederbluemle
Copy link
Contributor Author

@fabianbru - That's a great question. Note also that a new version of @react-native-community/eslint-config has not been published yet. So likely not before 0.62.

Maybe @TheSavior, @michalchudziak or @matt-oakes has more information?

@matt-oakes
Copy link
Contributor

@friederbluemle As far as I know, the ESLint package is not tied to a React Native release cycle and can be released at any time. I think someone just needs to run the release command manually on their machine.

@TheSavior
Copy link
Member

@hramos do you know how to do a release of this package?

@cpojer
Copy link
Contributor

cpojer commented Nov 29, 2019

@TheSavior just npm publish it.

@zfoltin
Copy link

zfoltin commented Jan 3, 2020

@matt-oakes could you do the honours, please? it looks like it's just you and mike866 who are collaborators on https://www.npmjs.com/package/@react-native-community/eslint-config

@matt-oakes
Copy link
Contributor

I think that's done.

Really, this should be moved to the react-native-community organisation so it's easier to maintain and release. However, I seem to remember there being some issues internally at Facebook as to why that can't happen. Is that still correct @cpojer?

@cpojer
Copy link
Contributor

cpojer commented Jan 6, 2020

@matt-oakes the reason I would prefer keeping it within the RN repo is that we actually use this config within RN and within FB. Externalizing it to another repo on GitHub will make our setup more complex.

@matt-oakes
Copy link
Contributor

@cpojer I think that makes sense. Maybe there needs to be a better process for ensuring changes to the config actually end up being published once a PR lands? I'm not sure what that process would actually be though. Maybe you could add me to the CODE_OWNERS file for this package so I get alerted to any PRs which relate to the package?

@cpojer
Copy link
Contributor

cpojer commented Jan 6, 2020

Sounds great, do you mind sending a PR?

@matt-oakes
Copy link
Contributor

@cpojer PR opened here #27689

facebook-github-bot pushed a commit that referenced this pull request Jan 7, 2020
Summary:
Adding myself as a code owner for the files in the ESLint package so I get email alerts for all PRs which alter the package.

This is needed because I need to manually publish updates to the package when pull requests are merged in. They are not handled by the standard React Native release cycle.

Related discussion: #27085 (comment)

## Changelog

[Internal] [Added] - Added mat-oakes as a CODEOWNER for the ESLint package
Pull Request resolved: #27689

Test Plan: N/A

Differential Revision: D19294768

Pulled By: cpojer

fbshipit-source-id: 3e3833261fc0b3c107b52b0e8232bd942a2ecaf4
osdnk pushed a commit to osdnk/react-native that referenced this pull request Mar 9, 2020
Summary:
Adding myself as a code owner for the files in the ESLint package so I get email alerts for all PRs which alter the package.

This is needed because I need to manually publish updates to the package when pull requests are merged in. They are not handled by the standard React Native release cycle.

Related discussion: facebook#27085 (comment)

## Changelog

[Internal] [Added] - Added mat-oakes as a CODEOWNER for the ESLint package
Pull Request resolved: facebook#27689

Test Plan: N/A

Differential Revision: D19294768

Pulled By: cpojer

fbshipit-source-id: 3e3833261fc0b3c107b52b0e8232bd942a2ecaf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants