-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Improve recommended settings included in the package #17027
Conversation
… rules from the `custom` and `recommended` configs and leave them as opt-in features.
…he recommended one
add25d0
to
8a8c320
Compare
@@ -14,4 +14,26 @@ module.exports = { | |||
document: true, | |||
wp: 'readonly', | |||
}, | |||
overrides: [ |
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.
@ntwb, I was referring to this changes in #17061 (comment). I linked wrong PR 😃
@youknowriad - can we include this change in Gutenberg 6.4 release so we could batch all breaking changes related to @wordpress/scripts package and all its dependencies? |
Sure, I'd appreciate a review from someone actually using the scripts package. Maybe @swissspidy @ntwb or @nerrad |
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.
I had a question but on the whole these changes look good.
"core-js": "^3.1.4" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.0.0" | ||
}, |
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.
So does this change essentially mean that packages consuming wp-script
don't need @babel/core
as a dependency anymore?
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.
At some point, it was added as a regular dependencies so it is redundant here.
|
||
### Enhancements | ||
|
||
- Remove `@wordpress/dependency-group` and `@wordpress/gutenberg-phase` rules from the `custom` and `recommended` configs and leave them as opt-in features. |
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.
👍 This is mostly a breaking change for consumers that are using these rules. Most consumers won't want/need them so I like.
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.
Do you think it should be highlighted as breaking change? I wasn’t sure where to put it. Given that, there are other breaking changes, we can more freely move it if necessary 😃
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.
I'm not sure either. The scope of when it's considered a breaking change is fairly narrow and it's only breaking in the sense the rules won't be applied automatically anymore.
…ess#17027) * Babel Preset Default: Add missing @wordpress/element dependency * Remove `@wordpress/dependency-group` and `@wordpress/gutenberg-phase` rules from the `custom` and `recommended` configs and leave them as opt-in features. * ESLint Plugin: Extract 2 test configs and add them conditionally to the recommended one * Add missing documentation for changes applied * Scripts: Update CHANGELOG file
* Babel Preset Default: Add missing @wordpress/element dependency * Remove `@wordpress/dependency-group` and `@wordpress/gutenberg-phase` rules from the `custom` and `recommended` configs and leave them as opt-in features. * ESLint Plugin: Extract 2 test configs and add them conditionally to the recommended one * Add missing documentation for changes applied * Scripts: Update CHANGELOG file
* Babel Preset Default: Add missing @wordpress/element dependency * Remove `@wordpress/dependency-group` and `@wordpress/gutenberg-phase` rules from the `custom` and `recommended` configs and leave them as opt-in features. * ESLint Plugin: Extract 2 test configs and add them conditionally to the recommended one * Add missing documentation for changes applied * Scripts: Update CHANGELOG file
Description
Fixes #17016.
Closes #17061.
Changes Applied
@wordpress/babel-preset-default
Bug fix:
@wordpress/element
dependency which is used internally.@wordpress/eslint-plugin
Breaking changes:
test-e2e
added for end-to-end tests validation.test-unit
added for unit tests validation.Enhancement:
@wordpress/dependency-group
and@wordpress/gutenberg-phase
rules from thecustom
andrecommended
configs and leave them as opt-in features.All those changes directly influence
@wordpress/scripts
and improves the experience around its setup.How has this been tested?
npm run lint-js
Types of changes
Checklist: