npm-package-json-lint-config-tc
raw JSON → 10.0.2 verified Fri May 01 auth: no javascript
Shareable configuration for npm-package-json-lint (v10) enforcing TC's project conventions on package.json files. Current stable version: 10.0.2. Release cadence: follows major versions of underlying linter. Key differentiators: opinionated rules optimized for TC projects, strict requirements on license, version, and repository fields. Requires Node >=22 and npm-package-json-lint as a peer dependency.
Common errors
error Error: Cannot find module 'npm-package-json-lint-config-tc' ↓
cause Missing or incorrect peer dependency npm-package-json-lint or config not installed.
fix
Run: npm install --save-dev npm-package-json-lint npm-package-json-lint-config-tc
error Error: Configuration for rule "valid-values-author" is invalid ↓
cause Override rule syntax is wrong; must be a valid npm-package-json-lint rule.
fix
Check rule names in npm-package-json-lint docs and ensure your .npmpackagejsonlintrc.json has correct structure.
error The "extends" value "npm-package-json-lint-config-tc" is not a valid string or array. ↓
cause Config file may be misformatted or missing quotes.
fix
Ensure .npmpackagejsonlintrc.json is valid JSON and contains: { "extends": "npm-package-json-lint-config-tc" }
error npm ERR! code ERESOLVE npm ERR! Could not resolve dependency: peer npm-package-json-lint@"^10.0.0" ↓
cause Installed npm-package-json-lint version does not satisfy peer dependency.
fix
Install compatible version: npm install npm-package-json-lint@^10.0.0
Warnings
breaking Node 18 dropped in v10.0.0 ↓
fix Upgrade Node.js to v22 or later.
breaking Peer dependency npm-package-json-lint must be v10.x for config v10 ↓
fix Ensure npm-package-json-lint@^10.0.0 is installed.
breaking Node 16 dropped in v8.0.0 ↓
fix Upgrade Node.js to v18 or later for v8-v9, v20+ for v10.
breaking Node 14 dropped in v7.0.0 ↓
fix Upgrade Node.js to v16 or later (v18+ recommended).
deprecated Using require() in CJS is still supported but may be deprecated in future ↓
fix Use ESM imports if possible, or stick to 'extends' in config file.
gotcha Config only works with .npmpackagejsonlintrc.json, not .js or .yaml ↓
fix Use JSON format for the config file.
Install
npm install npm-package-json-lint-config-tc yarn add npm-package-json-lint-config-tc pnpm add npm-package-json-lint-config-tc Imports
- config wrong
require('npm-package-json-lint-config-tc')correctextends: 'npm-package-json-lint-config-tc' in .npmpackagejsonlintrc.json - config wrong
const config = require('npm-package-json-lint-config-tc')correctimport config from 'npm-package-json-lint-config-tc' - rules wrong
Modifying the config object directlycorrectUse 'rules' in .npmpackagejsonlintrc.json to override specific rules
Quickstart
// .npmpackagejsonlintrc.json
{
"extends": "npm-package-json-lint-config-tc"
}
// Then run:
// npx npm-package-json-lint . --config .npmpackagejsonlintrc.json