prettier-config-kwork
raw JSON → 0.0.34 verified Sat Apr 25 auth: no javascript deprecated
A deprecated Prettier configuration package for KnowledgeWork's projects, last version 0.0.34. It provides a shared set of Prettier formatting rules intended for use across multiple projects. The package is no longer maintained and users should migrate to another Prettier config. It is published on npm and can be installed as a devDependency, then referenced in package.json using the string "prettier-config-kwork". The deprecation warning is clearly stated in the readme.
Common errors
error Error: Cannot find module 'prettier-config-kwork' ↓
cause The package is not installed or not in node_modules.
fix
Run npm install --save-dev prettier-config-kwork
error [prettier] Invalid configuration file: Unexpected token ↓
cause Using a self-referencing config incorrectly. The prettier field might be set to an invalid path.
fix
Set prettier field to exactly "prettier-config-kwork" without file extension.
error Prettier could not load configuration because the configuration file is not valid JSON ↓
cause The .prettierrc file contains JSON syntax errors.
fix
Ensure .prettierrc contains just the string "prettier-config-kwork" or an object with a key like prettierConfig.
Warnings
deprecated This package is deprecated and no longer maintained. Please migrate to another Prettier configuration. ↓
fix Use an alternative Prettier config, such as @trivago/prettier-plugin-sort-imports or @ianvs/prettier-plugin-sort-imports, or create your own.
breaking Prettier v3 changed the config resolution; string configs must be the exact package name. ↓
fix Ensure prettier field is exactly "prettier-config-kwork", not a relative file path.
gotcha The package does not export a function; using require() in a config file returns the config object, but in .prettierrc JSON you must use a string. ↓
fix In .prettierrc, use a string. In a JS config file, use module.exports = require('prettier-config-kwork');
Install
npm install prettier-config-kwork yarn add prettier-config-kwork pnpm add prettier-config-kwork Imports
- prettier-config-kwork wrong
import * as config from 'prettier-config-kwork'correct{ "prettier": "prettier-config-kwork" } - prettierrc.cjs wrong
module.exports = 'prettier-config-kwork';correctmodule.exports = require('prettier-config-kwork'); - .prettierrc wrong
require('prettier-config-kwork')correct"prettier-config-kwork"
Quickstart
{
"name": "my-project",
"version": "1.0.0",
"devDependencies": {
"prettier": "^3",
"prettier-config-kwork": "^0.0.34"
},
"prettier": "prettier-config-kwork"
}