{"id":20307,"library":"prettier-config-smarthr","title":"SmartHR Prettier Config","description":"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.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/kufu/tamatebako","tags":["javascript","prettier"],"install":[{"cmd":"npm install prettier-config-smarthr","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-config-smarthr","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-config-smarthr","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package exports a plain object via CommonJS. ESM import is not supported.","wrong":"import prettierConfig from 'prettier-config-smarthr'","symbol":"default","correct":"module.exports = require('prettier-config-smarthr')"},{"note":"The export is the entire config object, not a named property.","wrong":"const { prettier } = require('prettier-config-smarthr')","symbol":"prettierConfig","correct":"const prettierConfig = require('prettier-config-smarthr')"},{"note":"In package.json, use string value. In .prettierrc.js, use module.exports = require('prettier-config-smarthr').","wrong":"\"prettier\": { \"extends\": \"prettier-config-smarthr\" }","symbol":"extend in package.json","correct":"\"prettier\": \"prettier-config-smarthr\""}],"quickstart":{"code":"const prettierConfig = require('prettier-config-smarthr');\nmodule.exports = {\n  ...prettierConfig,\n  semi: true,\n  singleQuote: true\n};","lang":"javascript","description":"Shows how to extend and override the SmartHR Prettier config in a .prettierrc.js file."},"warnings":[{"fix":"Use require() or create a wrapper that uses createRequire.","message":"Package is CommonJS only, ESM projects need to use a dynamic import or convert to CJS.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run npm install --save-dev prettier","message":"Do not forget to install Prettier as a dev dependency – this package does not include Prettier.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev prettier-config-smarthr","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'prettier-config-smarthr'"},{"fix":"Ensure prettier-config-smarthr is installed and your Prettier config file correctly references it.","cause":"Prettier cannot resolve the config package.","error":"Invalid configuration: Module 'prettier-config-smarthr' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}