Shared Prettier configuration for all Trucknet projects. Version 2.1.0 is the current stable release, updated on an as-needed basis. It includes Prettier as a dependency to enforce consistent versioning across projects. Key differentiator: simple require-based usage without legacy .prettierrc JSON files; it is a drop-in shared config that ensures all team projects use identical formatting rules, reducing bikeshedding and formatting inconsistencies.
npm install prettier-config-trucknet-ioVerified import paths — ran on the pinned version, not inferred.
Shows how to set up Prettier with the shared config in a project: create a .prettierrc.js file that requires the config, then run Prettier to check formatting.
Delete .prettierrc files and remove 'prettier' from devDependencies before installing this config.
Run 'npm remove prettier && npm i -D prettier-config-trucknet-io' to avoid version conflicts.
Switch to .prettierrc.js with module.exports = require('prettier-config-trucknet-io');Run 'npm i -D prettier-config-trucknet-io'.
Remove old node_modules and package-lock.json, then reinstall: 'rm -rf node_modules package-lock.json && npm install'.