Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Add ESLint shared settings to detect React version#6675

Merged
germain-gg merged 1 commit into
developfrom
gsouquet/remove-linter-warning
Aug 25, 2021
Merged

Add ESLint shared settings to detect React version#6675
germain-gg merged 1 commit into
developfrom
gsouquet/remove-linter-warning

Conversation

@germain-gg
Copy link
Copy Markdown
Contributor

@germain-gg germain-gg commented Aug 25, 2021

When running yarn lint we would have the following output

~/dev/element/matrix-react-sdk develop
❯ yarn lint
yarn run v1.22.10
$ yarn lint:types && yarn lint:js && yarn lint:style
$ tsc --noEmit --jsx react
$ eslint --max-warnings 0 src test
Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .

Looking at the eslint-plugin-react#configuration page, we can see that we should set some ESLint shared settings to automatically detect the installed React version (17.x in our case).
Their example shows a lot more shared settings that do not apply to us as the project does not use any of the tooling it refers to (mobx, pragma, flow, styled-components, ...)

This PR will erase that Warning: in the log output


This change is marked as an internal change (Task), so will not be included in the changelog.

Preview: https://612602818d4935a27eeba5ce--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

@germain-gg germain-gg added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Aug 25, 2021
@germain-gg germain-gg requested a review from a team as a code owner August 25, 2021 08:39
@germain-gg germain-gg merged commit ee95e36 into develop Aug 25, 2021
@germain-gg germain-gg deleted the gsouquet/remove-linter-warning branch August 25, 2021 19:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants