Skip to content

Commit

Permalink
fix (deps): add explicitly eslint config to dependencies (#35192)
Browse files Browse the repository at this point in the history
Summary:
Basically since this change #34423 everything worked ok because in the main branch where the monorepo has the workspace section and everything, `react-native-community/eslint-config` was getting pulled in as a node_module anyway - but when moving to a stable branch and wanting to do a release, as we are now with 0.71, because of what the final package.json looks like for react-native and [the modifications that it goes through](f0054e1#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519) (ex. the `workspace` section disappears), the fact that it's not directly listed as dependency makes [the CI fails](https://app.circleci.com/pipelines/github/facebook/react-native/17124/workflows/54a4162d-f466-4eab-94ba-ec9fe77e2ecf/jobs/339643) with `Error: Failed to load config "react-native-community" to extend from.`

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - add explicitly eslint config to dependencies

Pull Request resolved: #35192

Test Plan: In 0.71, add the deps to see the error disappear (it gets replaced by a different one though, looking into that)

Reviewed By: jacdebug, cortinico

Differential Revision: D40988407

Pulled By: cipolleschi

fbshipit-source-id: 38f433a0b4b47a7cb61b59e887459d11182a5b4b
  • Loading branch information
kelset authored and Riccardo Cipolleschi committed Nov 4, 2022
1 parent e59cf2d commit 49278df
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/eslint-config-react-native-community/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")

yarn_workspace(
name = "yarn-workspace",
srcs = glob(
["**/*.js"],
exclude = [
"**/__fixtures__/**",
"**/__flowtests__/**",
"**/__mocks__/**",
"**/__server_snapshot_tests__/**",
"**/__tests__/**",
"**/node_modules/**",
"**/node_modules/.bin/**",
"**/.*",
"**/.*/**",
"**/.*/.*",
"**/*.xcodeproj/**",
"**/*.xcworkspace/**",
],
),
visibility = ["PUBLIC"],
)
1 change: 1 addition & 0 deletions repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@definitelytyped/dtslint": "^0.0.127",
"@react-native-community/eslint-config": "*",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": "^0.71.1",
"@reactions/component": "^2.0.2",
Expand Down

0 comments on commit 49278df

Please sign in to comment.