Registry / testing / wttj-config

wttj-config

JSON →
library3.1.5jsnpmunverified

wttj-config (v3.1.5) is a shared front-end lint and formatting config used by WTTJ. It provides preconfigured ESLint (React, TypeScript, Cypress), Prettier, Stylelint, and TypeScript configs. Active development with regular releases. Key differentiator: opinionated all-in-one config from a larger company, including i18n sorting scripts and release-it automation.

npm install wttj-config
INSTALL
IMPORT
SIG · WTTJ-CONFIG
W
wttj-config
testingjavascriptv3.1.5
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.

ESLint config
extends: './node_modules/wttj-config/lib/eslint'
extends: 'wttj-config/lib/eslint'
Use a relative path from the .eslintrc.js file due to ESLint resolution constraints.
Prettier config
module.exports = require('wttj-config/lib/prettier')
Use require('wttj-config/lib/prettier') in prettier.config.js. No default export.
TypeScript config
"extends": "wttj-config/lib/tsconfig/tsconfig.json"
"extends": "wttj-config/tsconfig.json"
The tsconfig extends must point to the nested path under lib/tsconfig/.
Stylelint config
extends: './node_modules/wttj-config/lib/stylelint'
extends: 'wttj-config/lib/stylelint'
Similar to ESLint, use a relative path to avoid resolution issues.

Shows installation and configuration for ESLint, Prettier, Stylelint, and TypeScript using wttj-config.

yarn add --dev wttj-config # In .eslintrc.js: module.exports = { extends: './node_modules/wttj-config/lib/eslint', } # In prettier.config.js: module.exports = require('wttj-config/lib/prettier') # In stylelint.config.js: module.exports = { extends: './node_modules/wttj-config/lib/stylelint', } # In tsconfig.json: { "extends": "wttj-config/lib/tsconfig/tsconfig.json", "compilerOptions": { "baseUrl": "src" }, "include": ["src"] }
wttj-config --version
Debug
Known issues
breakingVersion 3.0.0 upgraded all dependencies and added `eslint-plugin-typescript-sort-keys` rule. Existing ESLint configurations may break if they override rules that now conflict with this plugin.
fix
Review your ESLint overrides for any conflicts with typescript-sort-keys rules; adjust or disable if necessary.
affects: >=3.0.0
gotchaESLint and Stylelint extends must use relative paths (e.g., './node_modules/wttj-config/lib/eslint') rather than package name paths to avoid resolution failures in some CRA or monorepo setups.
fix
Use `'./node_modules/wttj-config/lib/eslint'` instead of `'wttj-config/lib/eslint'`.
affects: >=3.0.0
gotchaThe TypeScript config file path is 'wttj-config/lib/tsconfig/tsconfig.json', not 'wttj-config/tsconfig.json'.
fix
Use `"extends": "wttj-config/lib/tsconfig/tsconfig.json"` in your tsconfig.json.
affects: >=2.0.0
gotchaPrettier config uses `require('wttj-config/lib/prettier')` and expects a module.exports, not a default export.
fix
Use `module.exports = require('wttj-config/lib/prettier')` in your prettier.config.js.
affects: >=1.0.0
gotchaThe pre-commit hook in wttj-config (via husky) may ignore diffs when path_to_ignore option is set. Fixed in 3.1.4.
fix
Upgrade to wttj-config@3.1.4 or later to fix the pre-commit diff issue.
affects: >=3.0.0 <3.1.4
Errors
Common errors & fixes
Cannot find module 'wttj-config/lib/prettier'
The package is installed but the require path is incorrect or the package is not installed properly.
fix
Run `yarn add --dev wttj-config` (or npm install) and ensure the require path is exactly 'wttj-config/lib/prettier'.
ESLint: Failed to load config 'wttj-config/lib/eslint' to extend from.
Using package name path instead of relative path, or ESLint cannot resolve the module.
fix
Change extends to './node_modules/wttj-config/lib/eslint'. If still failing, check that wttj-config is in devDependencies and installed.
Parsing error: Cannot read file 'tsconfig.json'.
The tsconfig extends path is wrong or the tsconfig.json is missing.
fix
Ensure tsconfig.json has `"extends": "wttj-config/lib/tsconfig/tsconfig.json"` and that wttj-config is installed.
stylelint: Unknown rule order/properties-order
Stylelint version mismatch or stylelint-config-standard not installed.
fix
Ensure stylelint and stylelint-config-standard are installed. wttj-config may rely on specific peer dependencies.
Upgrade
Version history
3.1.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Resources
wttj-config — npm install wttj-config · libregistry