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 babel-eslint and eslint packages #17829

Merged
merged 1 commit into from
Jan 14, 2020
Merged

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Jan 13, 2020

Summary

We need to update our eslint dependencies as they have fallen behind.

This patch updates the main eslint package and adds eslint-config-prettier to silence errors related to formatting, which prettier manages.

Test Plan

yarn lint.

Notes

This diff does not update eslint plugin packages, because adding the following results in yarn lint failing with the attached error message.

diff --git a/package.json b/package.json
index d64d53a6a..a3159d8b4 100644
--- a/package.json
+++ b/package.json
@@ -47,12 +47,13 @@
     "danger": "^9.1.8",
     "error-stack-parser": "^2.0.2",
     "eslint": "^6.8.0",
-    "eslint-config-fbjs": "^1.1.1",
+    "eslint-config-fbjs": "^3.1.1",
     "eslint-plugin-babel": "^5.3.0",
     "eslint-plugin-flowtype": "^2.25.0",
     "eslint-plugin-jest": "^22.15.0",
+    "eslint-plugin-jsx-a11y": "^6.2.3",
     "eslint-plugin-no-for-of-loops": "^1.0.0",
-    "eslint-plugin-react": "^6.7.1",
+    "eslint-plugin-react": "^7.17.0",
     "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
     "fbjs-scripts": "^0.8.3",
     "filesize": "^3.5.6",
export * from './src/ReactIs';
^^^^^^

SyntaxError: Unexpected token export
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/necolas/OpenSource/github/facebook/react/node_modules/prop-types/index.js:9:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
error Command failed with exit code 1.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 13, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 13, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a4ae345:

Sandbox Source
hungry-dew-nr4iv Configuration

@gaearon
Copy link
Collaborator

gaearon commented Jan 13, 2020

What's up with the commas? Did we change Prettier config, or how does this work?

@sizebot
Copy link

sizebot commented Jan 13, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against a4ae345

@sizebot
Copy link

sizebot commented Jan 13, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against a4ae345

@necolas
Copy link
Contributor Author

necolas commented Jan 13, 2020

Oh yeah I forgot none of the lint/format commands automatically run on-commit in this repo.

What's up with the commas? Did we change Prettier config, or how does this work?

Running yarn lint produced a lot of errors about missing trailing commas

@gaearon
Copy link
Collaborator

gaearon commented Jan 14, 2020

Here's what I don't understand. Presumably, yarn prettier would have removed those commas (because Prettier doesn't know about our ESLint config). But why didn't CLI fail? Our CI should fail when yarn prettier produces a change.

@necolas
Copy link
Contributor Author

necolas commented Jan 14, 2020

IIRC CI did fail over prettier producing changes

@necolas necolas merged commit 50eafef into facebook:master Jan 14, 2020
trueadm pushed a commit to trueadm/react that referenced this pull request Jan 17, 2020
trueadm pushed a commit to trueadm/react that referenced this pull request Jan 17, 2020
@necolas necolas deleted the update-eslint branch January 22, 2020 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants