Skip to content

Commit

Permalink
check for react presence in dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Javimtib92 committed Sep 14, 2024
1 parent 0883a46 commit b5aeafe
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ fn is_nested_function_inside_component_or_hook(function: &AnyJsFunctionOrMethod)
fn is_within_react_project(manifest: &Option<PackageJson>) -> bool {
manifest.as_ref().map_or(true, |package_json| {
package_json.dependencies.contains("react")
|| package_json.dev_dependencies.contains("react")
})
}

Expand Down

0 comments on commit b5aeafe

Please sign in to comment.