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

Chore: Upgrade ESLint to the latest version (6.1.0) #16921

Merged
merged 13 commits into from Aug 7, 2019

Conversation

@gziolo
Copy link
Member

commented Aug 6, 2019

Description

This PR updates ESLInt to the latest version: 6.1.0. This is a major version bump.

In addition, it updates the following packages which are related to ESLint:

  • babel-eslint: "^10.0.2",
  • eslint-plugin-jsx-a11y: "^6.2.3"
  • eslint-plugin-react: "^7.14.3" (minor version bump)
  • eslint-plugin-react-hooks: "^1.6.1"

There was also this major version upgrade:

  • eslint-plugin-jest: "22.14.1"

I had to disable jest/valid-describe rule because we often create dynamic describe calls and this rule doesn't like it. Well, it's not flexible enough in my opinion.

How has this been tested?

npm run lint-js
npm run test-unit

[ matcherName ]: createToBeCalledMatcher( `.${ matcherName }`, methodName ),
[ matcherNameWith ]: createToBeCalledWithMatcher( `.${ matcherNameWith }`, methodName ),
[ matcherName ]: createToHaveBeenCalledMatcher( `.${ matcherName }`, methodName ),
[ matcherNameWith ]: createToHaveBeenCalledWith( `.${ matcherNameWith }`, methodName ),
};
}, {} )
);

This comment has been minimized.

Copy link
@ntwb

ntwb Aug 6, 2019

Member

Should the changes here for jest-console be added to the changelog?

This comment has been minimized.

Copy link
@gziolo

gziolo Aug 6, 2019

Author Member

It was part of rename operation and I figured out at the end that it's an internal change. I kept it only for consistency :)

@ntwb
ntwb approved these changes Aug 6, 2019
@swissspidy

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@gziolo Regarding jest/valid-describe, I currently see four dynamic describe() calls with template literals. All of them use forEach. Instead they should properly use Jest's describe.each syntax. Happy to amend the PR with that if wanted.

@gziolo

This comment has been minimized.

Copy link
Member Author

commented Aug 6, 2019

Regarding jest/valid-describe, I currently see four dynamic describe() calls with template literals. All of them use forEach. Instead they should properly use Jest's describe.each syntax. Happy to amend the PR with that if wanted.

That would be great, feel free to apply all necessary changes 👍

It's probably how it should work now since they introduced describe.each.

@swissspidy

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

Can someone help me fix the botched npm install I did? 😬

@gziolo

This comment has been minimized.

Copy link
Member Author

commented Aug 6, 2019

Can someone help me fix the botched npm install I did? 😬

It should be fixed now. @swissspidy, all your changes applied to PR look great. Thanks a lot. It didn't occur to me that the issue can be fixed with describe.each. Those tests read better now 👍

@gziolo gziolo force-pushed the update/eslint-packages branch from f914fd7 to 729e27a Aug 7, 2019

@gziolo

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2019

I rebased PR with master to resolve merge issues after changes to eslint-plugin related to JSDoc.

@gziolo gziolo force-pushed the update/eslint-packages branch from f691666 to 6462488 Aug 7, 2019

@gziolo gziolo force-pushed the update/eslint-packages branch from 6462488 to bb31814 Aug 7, 2019

@gziolo gziolo merged commit 3eb43e1 into master Aug 7, 2019

1 of 4 checks passed

Filter opened Filter opened
Details
Filter opened Filter opened
Details
Milestone It Milestone It
Details
Travis CI - Pull Request Build Passed
Details

@gziolo gziolo deleted the update/eslint-packages branch Aug 7, 2019

@youknowriad youknowriad added this to the Gutenberg 6.3 milestone Aug 9, 2019

gziolo added a commit that referenced this pull request Aug 29, 2019
Chore: Upgrade ESLint to the latest version (6.1.0) (#16921)
* Chore: Upgrade ESLint to the latest version (6.1.0)

* Refactor tests to use native describe.each functionality

* Enable jest/valid-describe rule again

* Use describe.each in more places

* Write describe name on one line

* Disable jest/valid-describe individually for special cases

* Fix typo

* Remove unused import

* Remove unnecessary nested describe

* Run npm install

* Chore: Fix package-lock.json file

* Fix failing e2e tests for navigable toolbar

* Fix JSDoc rule in ESLint plugin
gziolo added a commit that referenced this pull request Aug 29, 2019
Chore: Upgrade ESLint to the latest version (6.1.0) (#16921)
* Chore: Upgrade ESLint to the latest version (6.1.0)

* Refactor tests to use native describe.each functionality

* Enable jest/valid-describe rule again

* Use describe.each in more places

* Write describe name on one line

* Disable jest/valid-describe individually for special cases

* Fix typo

* Remove unused import

* Remove unnecessary nested describe

* Run npm install

* Chore: Fix package-lock.json file

* Fix failing e2e tests for navigable toolbar

* Fix JSDoc rule in ESLint plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.