generated from NaverPayDev/ts-monorepo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Propose Using eslint-plugin-package-json for package.json Validation
Description
Currently, our ESLint setup does not include any rules for validating package.json. This can lead to inconsistencies in dependencies, scripts, and other configurations. By integrating eslint-plugin-package-json, we can enforce consistency and catch potential issues automatically. (also see #82)
Proposal
- Add
eslint-plugin-package-jsonto our ESLint configuration. - Use its built-in rules to validate
package.jsonfields such as dependencies, scripts, and metadata. - Optionally, define custom rules if necessary to enforce project-specific guidelines.
Comparison with publint
publint is another tool that helps validate package.json, but it primarily focuses on package publishing issues, such as:
- Incorrect
exportsfield configuration - Issues with
main,module, andtypesfields - Missing files in the published package
On the other hand, eslint-plugin-package-json is more general-purpose, providing rules for consistency and correctness across all package.json fields, not just those related to package publishing.
Benefits
- Ensures consistency in
package.json. - Helps prevent dependency mismatches and missing required fields.
- Improves maintainability of the project by enforcing best practices.
- Complements
publintby focusing on broaderpackage.jsonvalidation beyond publishing concerns.
Integrating this plugin will enhance the reliability of our dependency management and project configuration.
cc @NaverPayDev/frontend
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels