4Catalyzer ESLint Config
raw JSON → 1.5.0 verified Sat Apr 25 auth: no javascript
A shared ESLint configuration used by 4Catalyzer projects. Version 1.5.0 provides a set of ESLint rules for consistent code style and quality. The package is actively maintained and serves as an internal standard, with peer dependency on eslint-plugin-import ^2.18.2. It is designed for use in JavaScript projects and relies on the Airbnb style guide as a base.
Common errors
error Failed to load plugin 'import' declared in '4catalyzer': Cannot find module 'eslint-plugin-import' ↓
cause Missing required peer dependency eslint-plugin-import.
fix
Run: npm install eslint-plugin-import --save-dev
error Configuration for rule 'no-console' is invalid: Severity should be one of the following: 0 = off, 1 = warn, 2 = error ↓
cause Possibly overriding a rule with incorrect severity value in user config.
fix
Check your .eslintrc and ensure rule severities are 0, 1, or 2.
error ESLint couldn't find the config '4catalyzer' to extend from. ↓
cause The package is not installed or misconfigured in extends field.
fix
Ensure eslint-config-4catalyzer is installed and extends uses '4catalyzer' (not full package name).
Warnings
breaking Major version bumps may include rule removals or additions that break existing code. ↓
fix Check changelog and update code to comply with new rules.
gotcha The config extends 'airbnb-base', so it inherits all Airbnb rules and might be strict. ↓
fix Override rules in your own ESLint config if needed.
gotcha Requires eslint-plugin-import as a peer dependency; missing it will cause errors. ↓
fix Install eslint-plugin-import as a dev dependency.
Install
npm install eslint-config-4catalyzer yarn add eslint-config-4catalyzer pnpm add eslint-config-4catalyzer Imports
- default
module.exports = { extends: '4catalyzer' }; - default wrong
{ "extends": "eslint-config-4catalyzer" }correct{ "extends": "4catalyzer" } - default
// In package.json "eslintConfig": { "extends": "4catalyzer" }
Quickstart
// Install dependencies
npm install eslint eslint-config-4catalyzer eslint-plugin-import --save-dev
// Create .eslintrc.js file
module.exports = {
extends: '4catalyzer',
rules: {
// Custom rules can be added here
}
};