Skip to content

v2.1.0

Choose a tag to compare

@darkmavis1980 darkmavis1980 released this 04 Apr 10:37
· 183 commits to main since this release
c2ea587

Add Prettier Script Utility

Overview

This PR adds a new utility script that automates Prettier setup for projects using our ESLint configuration. The script simplifies the process of adding Prettier to a project by automatically configuring necessary files and adding npm scripts.

Changes

  • Added a new script utility (bin/add-prettier-scripts.js) that:
    • Adds prettier:check and prettier:write npm scripts to the project's package.json
    • Creates a .prettierrc.js file that extends our shared configuration
    • Creates a .prettierignore file with sensible defaults
    • Installs Prettier as a dependency if not already installed
  • Added a bin entry in package.json for easy script access
  • Updated README documentation with detailed instructions on using the script
  • Incremented package version to 2.1.0

How to Use

After this package is installed, users can set up Prettier by running:

npx @hs-web-team/eslint-config-node/bin/add-prettier-scripts.js

Testing

  • Manually verified script execution in a test project
  • Confirmed all generated files are created with correct content
  • Verified npm scripts properly run Prettier checks and formatting