Skip to content

docs: mention prettier in eslint-config README#28930

Closed
exKAZUu wants to merge 1 commit into
facebook:masterfrom
exKAZUu:patch-1
Closed

docs: mention prettier in eslint-config README#28930
exKAZUu wants to merge 1 commit into
facebook:masterfrom
exKAZUu:patch-1

Conversation

@exKAZUu
Copy link
Copy Markdown
Contributor

@exKAZUu exKAZUu commented May 20, 2020

Summary

The combination of eslint (v7.0.0), @react-native-community/eslint-config (v1.1.0), and flow-typed (v3.1.0) causes the following error (ESLint couldn't find the plugin "eslint-plugin-prettier") because flow-typed (v3.1.0) depends on prettier: ^1.19.1 (c.f. https://github.com/flow-typed/flow-typed/blob/master/cli/package.json#L38).
To deal with the error, developers should install prettier (v2.x) directly in devDependencies.

Oops! Something went wrong! :(

ESLint: 7.0.0

ESLint couldn't find the plugin "eslint-plugin-prettier".

(The package "eslint-plugin-prettier" was not found when loaded as a Node module from the directory "/Users/exkazuu/Projects/test".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-prettier@latest --save-dev

The plugin "eslint-plugin-prettier" was referenced from the config file in ".eslintrc.js » @react-native-community/eslint-config".

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Changelog

[Internal] [Changed] - @react-native-community/eslint-config README recommends developers to install prettier directly

Test Plan

This PR changes only README, so tests are not required.

The combination of `eslint` (v7.0.0), `@react-native-community/eslint-config` (v1.1.0), and `flow-typed` (v3.1.0) causes an error where `ESLint couldn't find the plugin "eslint-plugin-prettier"` because `flow-typed` depends on `prettier: ^1.19.1` (c.f. https://github.com/flow-typed/flow-typed/blob/master/cli/package.json#L38)
@exKAZUu exKAZUu requested a review from matt-oakes as a code owner May 20, 2020 04:44
@facebook-github-bot
Copy link
Copy Markdown
Contributor

Hi @exKAZUu!

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 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 May 20, 2020
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,781,984 0
android hermes armeabi-v7a 6,446,172 0
android hermes x86 7,169,068 0
android hermes x86_64 7,060,399 0
android jsc arm64-v8a 8,949,832 0
android jsc armeabi-v7a 8,606,409 0
android jsc x86 8,780,029 0
android jsc x86_64 9,356,975 0

Base commit: c8d678a

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented May 20, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal 809,568 0

Base commit: c8d678a

@matt-oakes
Copy link
Copy Markdown
Contributor

Thanks for this. I think this makes sense. People should already be getting a warning about a missing peer dependency as the ‘eslint-plugin-prettier’ package has that defined.

@cpojer Can you merge this in?

Copy link
Copy Markdown
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.

Thank you!

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

This pull request was successfully merged by @exKAZUu in 0a2bb71.

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 May 20, 2020
@exKAZUu exKAZUu deleted the patch-1 branch May 20, 2020 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants