Linting: Disable the wordpress dependency group lint rule#73616
Linting: Disable the wordpress dependency group lint rule#73616youknowriad merged 5 commits intotrunkfrom
Conversation
|
Size Change: 0 B Total Size: 2.57 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| 'builtin', // Node.js built-in modules | ||
| 'external', // npm packages | ||
| 'internal', // Aliased modules | ||
| [ 'parent', 'sibling', 'index' ], // Relative imports |
There was a problem hiding this comment.
It'd be nice to enforce the parent > sibling > index order (unwrap them from this array).
There was a problem hiding this comment.
I'd also enable the type imports as the last (or first one). Given the rule is auto-fixable, this would help with consistency.
There was a problem hiding this comment.
It'd be nice to enforce the parent > sibling > index order (unwrap them from this array).
I think it would be too annoying. I personally find the whole order thing annoying but I'm trying to compromise here :)
There was a problem hiding this comment.
A lot of people asked but I do a lot more refactoring that what people do in general and it's a bit annoying to have a big diff because you moved a file or switched from tanstack-router to @wordpress/something or something like that.
There was a problem hiding this comment.
I don't really think a consistent order bring any value to our quality.
There was a problem hiding this comment.
Not an opinion strongly held, but I do find having the same order everywhere useful to navigate and understand the code.
| * This extends the base config and adds additional rules that we want to | ||
| * enforce only on new/modified code. |
There was a problem hiding this comment.
I see the motivation here to avoid having to update a bunch of existing files, though I'm fearful that in a year we'll have a bunch of fragmentation between our "strict" and "non-strict" configurations that will be difficult to follow or reconcile.
If it's auto-fixable, maybe we could do a follow-up to rip off that bandaid to fix them all up in one pass?
There was a problem hiding this comment.
I'm happy with a follow-up, wanted to separate the change itself from the commit that updates everything (which can be added to the blame ignored refs)
1d97a90 to
18599f8
Compare
|
Flaky tests detected in 18599f8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20027683700
|
closes #73396
What?
@wordpress/dependency-groupESLint rule that enforces comment blocks above import statements.Why?
Check the discussion in the issue.