Registry / testing / wescfg

wescfg

JSON →
library0.0.18jsnpmunverified

A shared ESLint and Prettier configuration package by Whyhankee, intended for personal projects. Current version 0.0.18 is early-stage (newly introduced flat config), with no stable release cadence yet. Key differentiators: provides a flat ESLint config with TypeScript support and Prettier integration, plus an init script to generate configuration files. Requires Node >=18.20.3 and pnpm >=9.4. Peer dependencies are ESLint ^9.14.0 and Prettier ^3.3.3. Users must ensure peer dependencies are installed, optionally via auto-install-peers=true in .npmrc.

npm install wescfg
INSTALL
IMPORT
SIG · WESCFG
W
wescfg
testingjavascriptv0.0.18
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default (init script config generation)
npx wescfg
import wescfg from 'wescfg'
Package is not intended for programmatic import; use CLI via npx.
eslint.config.js (generated file)
import wescfg from 'wescfg'; export default wescfg;
module.exports = require('wescfg');
Generated config uses ESM syntax; CJS require will fail in ESLint flat config context.
prettier.config.js (generated file)
import wescfg from 'wescfg'; export default wescfg;
module.exports = require('wescfg');
Prettier config follows same pattern; CJS not supported with flat config.

Shows installation via npm with peer deps, init script, generated config files, and usage scripts for linting and formatting.

# .npmrc auto-install-peers=true # Install npm install wescfg # Run init npx wescfg # Generated eslint.config.js import wescfg from 'wescfg'; export default [ ...wescfg, ]; # Generated prettier.config.js import wescfg from 'wescfg'; export default wescfg; # Scripts in package.json "scripts": { "lint": "eslint . --fix", "format": "prettier --write ." } # Run lint and format npm run lint npm run format
Debug
Known issues
deprecatedPackage uses flat config (ESLint 9 style); old eslintrc format not supported.
fix
Use ESLint >=9.14.0 with flat config. Do not create .eslintrc.* files.
affects: >=0.0.0
gotchaauto-install-peers=true required in .npmrc or peer dependencies must be installed manually.
fix
Add 'auto-install-peers=true' to .npmrc or run 'npm install eslint@^9.14.0 prettier@^3.3.3'.
affects: >=0.0.0
gotchaGenerated config files use ESM; package.json must have 'type': 'module' or file extensions .mjs.
fix
Set 'type': 'module' in package.json or rename files to .mjs.
affects: >=0.0.0
gotchaInit script with -f flag overwrites existing files without confirmation.
fix
Backup existing configs before running 'npx wescfg -f'.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Failed to load config 'wescfg' from extended config
Using traditional eslintrc format with 'extends' instead of flat config import.
fix
Delete .eslintrc and use flat config as generated by npx wescfg.
Cannot find module 'wescfg'
wescfg not installed or not in node_modules.
fix
Run 'npm install wescfg' and ensure dependencies are installed.
Error: Could not find 'prettier' module
Prettier peer dependency not installed.
fix
Install prettier: 'npm install prettier@^3.3.3'
Error [ERR_REQUIRE_ESM]: require() of ES Module from CJS not supported.
Using require() to import generated ESM config file.
fix
Use import syntax or rename file to .cjs if using CommonJS.
Upgrade
Version history
0.0.18latest on npm
Audit
Dependencies
eslintrequiredRuntime peer dependency for linting; version ^9.14.0 required
prettierrequiredRuntime peer dependency for formatting; version ^3.3.3 required
Agent activity
11 hits · last 30 days
node
10
Resources
packagewescfg
wescfg — npm install wescfg · libregistry