Registry / devops / prettier-config-smarthr

prettier-config-smarthr

JSON →
library1.0.1jsnpmunverified

A sharable Prettier configuration package for SmartHR, version 1.0.1, stable. It provides a consistent code formatting standard for SmartHR projects. The config is minimal and intended to be extended. It is part of the tamatebako monorepo alongside eslint-config-smarthr and eslint-plugin-smarthr. Differentiator: official SmartHR config, integrates with the SmartHR toolchain.

npm install prettier-config-smarthr
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-SM
P
prettier-config-smarthr
devopsjavascriptv1.0.1
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
✓ module.exports = require('prettier-config-smarthr')
✗ import prettierConfig from 'prettier-config-smarthr'
This package exports a plain object via CommonJS. ESM import is not supported.
prettierConfig
✓ const prettierConfig = require('prettier-config-smarthr')
✗ const { prettier } = require('prettier-config-smarthr')
The export is the entire config object, not a named property.
extend in package.json
✓ "prettier": "prettier-config-smarthr"
✗ "prettier": { "extends": "prettier-config-smarthr" }
In package.json, use string value. In .prettierrc.js, use module.exports = require('prettier-config-smarthr').

Shows how to extend and override the SmartHR Prettier config in a .prettierrc.js file.

const prettierConfig = require('prettier-config-smarthr'); module.exports = { ...prettierConfig, semi: true, singleQuote: true };
Debug
Known issues
gotchaPackage is CommonJS only, ESM projects need to use a dynamic import or convert to CJS.
fix
Use require() or create a wrapper that uses createRequire.
affects: >=1.0.0
gotchaDo not forget to install Prettier as a dev dependency – this package does not include Prettier.
fix
Run npm install --save-dev prettier
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier-config-smarthr'
Package not installed or not in node_modules.
fix
Run npm install --save-dev prettier-config-smarthr
Invalid configuration: Module 'prettier-config-smarthr' was not found.
Prettier cannot resolve the config package.
fix
Ensure prettier-config-smarthr is installed and your Prettier config file correctly references it.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
Resources
prettier-config-smarthr — npm install prettier-config-smarthr · libregistry