wttj-config

raw JSON →
3.1.5 verified Fri May 01 auth: no javascript

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.

error Cannot find module 'wttj-config/lib/prettier'
cause 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'.
error ESLint: Failed to load config 'wttj-config/lib/eslint' to extend from.
cause 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.
error Parsing error: Cannot read file 'tsconfig.json'.
cause 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.
error stylelint: Unknown rule order/properties-order
cause 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.
breaking Version 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.
gotcha ESLint 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'`.
gotcha The 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.
gotcha Prettier 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.
gotcha The 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.
npm install wttj-config
yarn add wttj-config
pnpm add wttj-config

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"]
}