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

@gziolo gziolo 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

@gziolo gziolo added [Type] Build Tooling Issues or PRs related to build tooling [Package] Scripts /packages/scripts [Package] ESLint plugin /packages/eslint-plugin labels Aug 6, 2019
@gziolo gziolo self-assigned this Aug 6, 2019
[ matcherName ]: createToBeCalledMatcher( `.${ matcherName }`, methodName ),
[ matcherNameWith ]: createToBeCalledWithMatcher( `.${ matcherNameWith }`, methodName ),
[ matcherName ]: createToHaveBeenCalledMatcher( `.${ matcherName }`, methodName ),
[ matcherNameWith ]: createToHaveBeenCalledWith( `.${ matcherNameWith }`, methodName ),
};
}, {} )
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@swissspidy
Copy link
Member

@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
Copy link
Member Author

gziolo 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
Copy link
Member

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

@gziolo
Copy link
Member Author

gziolo 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
Copy link
Member Author

gziolo commented Aug 7, 2019

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

@gziolo gziolo merged commit 3eb43e1 into master Aug 7, 2019
@gziolo gziolo deleted the update/eslint-packages branch August 7, 2019 13:49
@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)

* 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)

* 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
Labels
[Package] ESLint plugin /packages/eslint-plugin [Package] Scripts /packages/scripts [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants