Registry / devops / prettier-config-trucknet-io

prettier-config-trucknet-io

JSON →
library2.1.0jsnpmunverified

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-io
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-TR
P
prettier-config-trucknet-io
devopsjavascriptv2.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export
✓ module.exports = require('prettier-config-trucknet-io');
✗ module.exports = require('prettier-config-trucknet-io').default;
Use CommonJS require() in .prettierrc.js; the package does not export an ES module.
default export (ESM)
✓ import config from 'prettier-config-trucknet-io';
✗ import { config } from 'prettier-config-trucknet-io';
If using ES modules, import the default export; named exports are not available.
extend in .prettierrc (JSON)
✓ "prettier-config-trucknet-io"
✗ "prettier-config-trucknet-io/index"
In .prettierrc, use the string 'prettier-config-trucknet-io' as the value for the 'extends' key. The full package name is required.

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.

// .prettierrc.js module.exports = require('prettier-config-trucknet-io'); // Then run: npx prettier --check .
Debug
Known issues
gotchaRequires removing any existing .prettierrc or prettier fields from package.json before usage.
fix
Delete .prettierrc files and remove 'prettier' from devDependencies before installing this config.
affects: >=1.0.0
breakingVersion 2.0.0 switched from a peer dependency on prettier to a direct dependency; users must update their install commands.
fix
Run 'npm remove prettier && npm i -D prettier-config-trucknet-io' to avoid version conflicts.
affects: >=2.0.0
deprecatedUsing .prettierrc with JSON format is deprecated in favor of .prettierrc.js for clarity and consistency.
fix
Switch to .prettierrc.js with module.exports = require('prettier-config-trucknet-io');
affects: >=1.0.0
Errors
Common errors & fixes
Error: Could not resolve 'prettier-config-trucknet-io'
Package not installed or missing from node_modules.
fix
Run 'npm i -D prettier-config-trucknet-io'.
Error: Cannot find module 'prettier'
Prettier is no longer a separate dep since v2; this config includes it, but if user removed it and still has old lockfile, conflict may arise.
fix
Remove old node_modules and package-lock.json, then reinstall: 'rm -rf node_modules package-lock.json && npm install'.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
prettierrequiredPeer dependency for formatting; the config requires Prettier to be installed.
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-config-trucknet-io — npm install prettier-config-trucknet-io · libregistry