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 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.
@codesandbox

This comment has been minimized.

Copy link

codesandbox 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

This comment has been minimized.

Copy link
Member

gaearon commented Jan 13, 2020

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

@sizebot

This comment has been minimized.

Copy link

sizebot commented Jan 13, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against a4ae345

@sizebot

This comment has been minimized.

Copy link

sizebot commented Jan 13, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against a4ae345

@necolas

This comment has been minimized.

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

@necolas necolas force-pushed the necolas:update-eslint branch from 9311aa1 to 910bd85 Jan 13, 2020
@necolas necolas force-pushed the necolas:update-eslint branch from 910bd85 to a4ae345 Jan 14, 2020
@gaearon

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

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
22 checks passed
22 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_and_process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: build_experimental Your tests passed on CircleCI!
Details
ci/circleci: flow Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint_build Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build Your tests passed on CircleCI!
Details
ci/circleci: test_build_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_devtools Your tests passed on CircleCI!
Details
ci/circleci: test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: test_source Your tests passed on CircleCI!
Details
ci/circleci: test_source_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_source_persistent Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
trueadm added a commit to trueadm/react that referenced this pull request Jan 17, 2020
trueadm added a commit to trueadm/react that referenced this pull request Jan 17, 2020
@necolas necolas deleted the necolas:update-eslint branch Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.