Eslint: fix ignored files#49310
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
anomiex
left a comment
There was a problem hiding this comment.
Fixes lint issues in "excluded from lint" files; most were simple JSDoc lint issues
This is good, thank you!
Removes the tooling for managing
tools/eslint-excludelist.jsonwhich excluded specific files from the linter.
This fundamentally misunderstands what that tooling does. What you're removing here does a better job at the task than the replacement you're pushing in #48487.
I recommend you re-read the code you're removing from .github/workflows/linting.yml lines 410–422.
Can you elaborate which mechanisms/aspects you'd prefer to keep running in this PR? As I wrote in the description, I'm intending to add back parts in the other PR that make sense, but I'm splitting these changes into two separate PRs. If you'd prefer, I can merge everything into one (likely prune this down to just lint fix + empty |
|
Your fundamental misunderstanding is in thinking that We have two JS linting runs. One lints files normally, except those listed in eslint-changed compares the linting of the old and new versions of the file, reporting any lints that are newly added and any lints that are present on lines being changed in the PR. This has advantages and disavantages compared to the "baseline file" approach you're pushing in your other PR.
I think the advantages of the eslint-changed approach outweigh the disadvantages, particularly when most files get the "just run normal eslint" happy path to avoid all the disadvantages.
I'd prefer keeping the code for running eslint-changed, even with an empty exclusion list, so it's there if we need to use it again. For example, for your PR that enables |
|
Aight, thanks for elaborating! It was helpful since it wasn't clear from code. So I can trim this PR down to fixing the lints, and then rework the other PRs to use the existing list. I don't really have strong opinion on how you lint the repo, I care more about having the lint in first place to guide right component usage. ;-) |
Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>
c979fd2 to
00d67cd
Compare
anomiex
left a comment
There was a problem hiding this comment.
Looks reasonable, docs read ok. I don't know enough about any of this code to know if there are errors in the added docs though. 😅
Split out from another PR adding similar mechanism, see #48487 (comment)
Proposed changes
Removes the tooling for managingtools/eslint-excludelist.jsonwhich excluded specific files from the linter. In Eslint: adopt@wordpress/use-recommended-components#48487 and Lint: use recommended components instead of deprecated Jetpack components #49284 we're adding back a mechanism that lists ignored files with counters for specific issues, which is helpful for large-scale slower migrations like componentry. Some code from this PR might make its way to above PRs for CI integration if it makes sense.Related product discussion/links
Does this pull request change what data or activity we track or use?
Testing instructions