Registry / testing / eslint-config-metalab

eslint-config-metalab

JSON →
library10.1.0jsnpmunverified

ESLint shareable config for MetaLab's JavaScript style guidelines, version 10.1.0. It extends rules inspired by Airbnb with additional opinionated choices, covering ES5 (legacy), ES6 (base), and React. The config namespaces all plugin rules under `metalab/` to avoid peer dependency conflicts and multiple plugin installs. Release cadence is sporadic; major versions may introduce breaking rule changes.

npm install eslint-config-metalab
INSTALL
IMPORT
SIG · ESLINT-CONFIG-META
E
eslint-config-metalab
testingjavascriptv10.1.0
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.

metalab
extends: ['metalab']
extends: ['eslint-config-metalab']
ESLint resolves shareable configs prefixed with eslint-config- automatically. Use just 'metalab' in .eslintrc.

Install eslint and eslint-config-metalab, then configure .eslintrc with the 'metalab' preset and optional sub-presets (base, react). Copy .gitignore to .eslintignore and run eslint.

# Install dependencies npm install --save-dev eslint eslint-config-metalab # Create .eslintrc.json cat > .eslintrc.json << EOF { "extends": [ "metalab", "metalab/base", "metalab/react" ] } EOF # Alternatively, copy .gitignore to .eslintignore cp .gitignore .eslintignore # Lint all JS files eslint . # Or add to package.json scripts: # "lint": "eslint ."
Debug
Known issues
gotchaRules from plugins are namespaced under 'metalab/', so to disable a rule you must use the prefixed name, e.g., 'metalab/import/no-commonjs': 0.
fix
Use 'metalab/rule-name' instead of 'plugin/rule-name' to disable rules.
affects: >=1.0.0
breakingVersion 2.x changed extending from 'metalab' to 'metalab/base' for ES6 code. Old 'metalab' preset now targets legacy ES5.
fix
Update your .eslintrc to use 'metalab/base' for modern code or 'metalab/legacy' for ES5.
affects: >=2.0.0 <3.0.0
breakingVersion 5.0.0 dropped support for Node.js <6 and upgraded ESLint peer dependency to ^4.0.0.
fix
Update Node.js to >=6 and ESLint to ^4.
affects: >=5.0.0 <6.0.0
deprecatedThe 'metalab/legacy' preset is deprecated in favor of 'metalab/base' with a separate config for legacy code.
fix
Use 'metalab/base' for modern ES6+ code and consider a custom config for legacy ES5.
affects: >=8.0.0
gotchaThis package does not auto-install its ESLint plugins; you must manually install any plugins that rules depend on (e.g., eslint-plugin-import, eslint-plugin-react).
fix
Check the package's dependencies in node_modules/eslint-config-metalab/package.json for required plugins and install them.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'metalab': Cannot find module 'eslint-plugin-metalab'
Using 'extends: metalab' without installing eslint-config-metalab, or confusion with plugin namespacing.
fix
Ensure eslint-config-metalab is installed: npm install --save-dev eslint-config-metalab.
ESLint couldn't determine the config for 'metalab'. Check your configuration file.
Missing or incorrect .eslintrc.json; 'extends' value should be just 'metalab', not 'eslint-config-metalab'.
fix
Set 'extends': ['metalab'] in .eslintrc.json.
Error: Cannot read property 'rules' of undefined for the 'metalab/import/no-commonjs' rule.
The rule name uses the namespaced prefix 'metalab/', but the actual rule is from eslint-plugin-import.
fix
Use 'metalab/import/no-commonjs' as the rule key when disabling.
Peer dependency warning: eslint@>=5.2.0 is required but not installed.
ESLint not installed or version mismatch.
fix
Run: npm install --save-dev eslint@^5.2.0
Upgrade
Version history
10.1.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for linting. Must be installed alongside the config.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-metalab — npm install eslint-config-metalab · libregistry