-
Notifications
You must be signed in to change notification settings - Fork 28
feat!: refactor plugin export to conform to latest conventions #957
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
Conversation
This change refactors the plugin's exports to conform to the latest standards recommended by the ESLint team. The plugin is still the default export, but it now has configs attached to it as well, but the legacy rc-based config (now called `'legacy-recommended'`) and the `recommended` flat-config. For users of the flat config, you'll need to make the following changes. ```diff - import packageJson from "eslint-plugin-package-json/configs/recommended"; + import packageJson from "eslint-plugin-package-json"; export default [ - packageJson, + packageJson.configs.recommended, ]; ``` For users of the legacy config, you'll need to make the following changes. ```diff module.exports = { overrides: [ { - extends: ["plugin:package-json/recommended"], + extends: ["plugin:package-json/legacy-recommended"], files: ["package.json"], parser: "jsonc-eslint-parser", }, ], }; ``` BREAKING CHANGE
9879219
to
b85c967
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #957 +/- ##
==========================================
+ Coverage 98.77% 99.50% +0.73%
==========================================
Files 21 20 -1
Lines 1222 1221 -1
Branches 142 142
==========================================
+ Hits 1207 1215 +8
+ Misses 15 6 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This change refactors the plugin's exports to conform to the latest standards recommended by the ESLint team. The plugin is still the default export, but it now has configs attached to it as well, but the legacy rc-based config (now called `'legacy-recommended'`) and the `recommended` flat-config. For users of the flat config, you'll need to make the following changes. ```js - import packageJson from "eslint-plugin-package-json/configs/recommended"; + import packageJson from "eslint-plugin-package-json"; export default [ - packageJson, + packageJson.configs.recommended, ]; ``` For users of the legacy config, you'll need to make the following changes. ```js module.exports = { overrides: [ { - extends: ["plugin:package-json/recommended"], + extends: ["plugin:package-json/legacy-recommended"], files: ["package.json"], parser: "jsonc-eslint-parser", }, ], }; ``` BREAKING CHANGE
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 included in version v0.26.4 🎉 The release is available on: Cheers! 📦🚀 |
PR Checklist
status: accepting prs
Overview
This change refactors the plugin's exports to conform to the latest standards recommended by the ESLint team.
The plugin is still the default export, but it now has configs attached to it as well, but the legacy rc-based config (now called
'legacy-recommended'
) and therecommended
flat-config.For users of the flat config, you'll need to make the following changes.
For users of the legacy config, you'll need to make the following changes.
BREAKING CHANGE
Closes #752