eslint-config-collaborne
raw JSON → 5.5.6 verified Fri May 01 auth: no javascript
ESLint shareable config used by Collaborne for their TypeScript and JavaScript projects. Current version 5.5.6 supports ESLint 8+ and requires multiple peer plugins. Release cadence is irregular, aligned with Collaborne's internal needs. Differentiates by bundling a specific set of opinionated rules (Prettier, import, promise, node, disable) and supporting multiple major versions of ESLint plugins via range peer dependencies. Active maintenance by Collaborne team.
Common errors
error ESLint couldn't find the config "collaborne" ↓
cause eslint-config-collaborne package not installed or not in node_modules.
fix
Run
npm install --save-dev eslint-config-collaborne and ensure it is in package.json. error Failed to load plugin '@typescript-eslint': Cannot find module 'eslint-plugin-disable' ↓
cause Missing peer dependency eslint-plugin-disable.
fix
Install it:
npm install --save-dev eslint-plugin-disable@^2.0.3 error Error: Cannot find module 'eslint-plugin-prettier' or 'prettier' ↓
cause eslint-plugin-prettier or prettier not installed.
fix
Install both:
npm install --save-dev eslint-plugin-prettier@^5.0.0 prettier@^3.0.0 error Configuration for rule "import/no-unresolved" is invalid ↓
cause The config assumes certain parser options or settings that may conflict with your project.
fix
Override the rule in your .eslintrc.json if needed, e.g.,
"import/no-unresolved": "off". Warnings
breaking Version 3.0.0 dropped support for ESLint 6 and earlier, requiring ESLint >= 8. ↓
fix Upgrade ESLint to version 8 or later if you are on ESLint 6/7.
breaking Peer dependencies changed between major versions: ensure @typescript-eslint/*, eslint-plugin-prettier, eslint-plugin-promise versions match the ranges in package.json. ↓
fix Use the specific peer dependency ranges listed in the latest package.json.
deprecated The package may ship with deprecated ESLint rules or configurations as ESLint and plugins evolve; review config after upgrading ESLint. ↓
fix After upgrading ESLint or plugins, run `eslint --rulesdir` to check for deprecated rules and update config accordingly.
gotcha The config expects .prettierrc to be present; missing it can cause unexpected formatting errors. ↓
fix Create a .prettierrc file as shown in the quickstart.
gotcha eslint-plugin-disable is a peer dependency; it is not officially published on npm? Actually it exists, but may be uncommon. Ensure it is installed. ↓
fix Install eslint-plugin-disable explicitly: `npm install --save-dev eslint-plugin-disable@2.0.3`
gotcha The config uses `extends: 'collaborne'` which assumes the package is named 'eslint-config-collaborne'; if you rename it, the extends value changes. ↓
fix Do not rename the package; always use `extends: 'collaborne'`.
gotcha The config presumes a TypeScript project with tsconfig.json; if not using TypeScript, you must override certain rules. ↓
fix Use overrides in .eslintrc.json to disable TypeScript-specific rules for .js files.
Install
npm install eslint-config-collaborne yarn add eslint-config-collaborne pnpm add eslint-config-collaborne Imports
- config wrong
import config from 'eslint-config-collaborne'; // Not meant to be imported as JS modulecorrect// In .eslintrc.json: { "extends": "collaborne" } - typescript wrong
require('eslint-config-collaborne'); // not a Node require; use extendscorrect// In .eslintrc.json: { "extends": "collaborne", "rules": { ... } } - Node.js require wrong
const config = require('eslint-config-collaborne'); // does not workcorrect/* No require() needed; use extends in config file */
Quickstart
// 1. Install dependencies
npm install --save-dev \
eslint-config-collaborne \
eslint@8 \
@typescript-eslint/eslint-plugin@^7.0.0 \
@typescript-eslint/parser@^7.0.0 \
eslint-plugin-disable@^2.0.3 \
eslint-plugin-import@^2.26.0 \
eslint-plugin-node@^11.1.0 \
eslint-plugin-prettier@^5.0.0 \
eslint-plugin-promise@^7.0.0 \
prettier@^3.0.0
// 2. Create .prettierrc
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"useTabs": true,
"trailingComma": "all"
}
// 3. Create .eslintrc.json
{
"extends": "collaborne"
}
// 4. Add scripts to package.json
"scripts": {
"lint": "eslint src/"
}
// 5. Run lint
npm run lint