-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ESLint Plugin/Scripts: Update ESLint and related deps to 7.1.0 #22771
Conversation
Size Change: 0 B Total Size: 1.12 MB ℹ️ View Unchanged
|
The JSDoc lint errors seem to be correct and should probably get fixed in a separate PR before the ESLint update gets merged? Some examples:
gutenberg/packages/annotations/src/store/actions.js Lines 22 to 24 in 78587c9
Syntax for optional props changed?
gutenberg/packages/block-directory/src/store/actions.js Lines 53 to 60 in 78587c9
The documentation is missing.
gutenberg/packages/block-editor/src/autocompleters/block.js Lines 84 to 94 in 78587c9
The documentation is missing. |
It looks like there are 2 rules that are more strict now based on failures from: Those rules are
I agree that it makes sense to address them separately. On the technical side of things, it might be simpler to downgrade them to warnings and bring back to errors in two follow up PRs for each rule separately. I see also that some unit tests are failing: This is very surprising but it looks like those are valid issues since the impact ESLint related logic:
Maybe, they don't need to be updated. I think it's quite common that those plugins release at their own pace. |
@gziolo Thanks for the feedback! Nice catch with the failing unit tests, looks like I focused to match on the lint errors. Fixed in 338639a.
I'm not sure, might be easier to just fix them in one in one sweep. The error report might look severe but the
Yes, I think we can release without them for now, at least there seem to be no issues. It's just about the npm warning:
|
@gziolo Okay, after fixing some issues I think we should go with your downgrade to warning idea here (5757cc9) which should make it easier to fix the errors in follow-up PRs. Switching branches isn't so efficient and only relying on the current Travis output isn't good either because there may be follow-up errors like shown in #22794. Marking this PR as ready for review and will continue with a tracking issue for the JSDoc update if you all agree with the proposed workflow. |
There is one more option for how we can approach it. Now that this branch passes, we can open another branch targeting this branch that fixes individual rules (or both together if they are tightly coupled). Otherwise, we would have to update |
It hides them only temporarily for the project until we have fixed the issues. 3rd party projects should follow the same procedure or fix them directly without the warning step since those are valid errors. So I don't think we should change the severity in the published package. |
…rrors to warnings
Related chat on Slack: https://wordpress.slack.com/archives/C5UNMSU4R/p1591107916367900 The decision was to merge this PR as is and then I'll follow-up with a tracking ticket for the new JSDoc warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as expected, there are new warnings introduced:
✖ 215 problems (0 errors, 215 warnings)
0 errors and 129 warnings potentially fixable with the `--fix` option.
Let's move forward according to the plan discussed earlier this week during the Core JS meeting 🚢
@ocean90, one interesting thing in the hint from ESLint. I executed |
Description
Fixes #22385.
Fixes #20235.
This is a first pass for updating @wordpress/eslint-plugin and @wordpress/scripts to ESLint 7.x.
What I have done:
Changelogs:
There two remaining deps which haven't got an update yet:
During the commit I got a package.lock failure:Error Details
I tried removing node_modules but that didn't solve it. What else can I try? I'm using npm 6.14.5.Manually fixed in 33b287bHow has this been tested?
wp-scripts lint-js
which produced a lot ofMissing JSDoc
andMissing @param
errors (see on Travis). Probably due to changes in eslint-plugin-jsdoc v25.0.0 https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v25.0.0.Types of changes
Breaking change
Checklist: