Registry / devops / eslint-config-mdcs

eslint-config-mdcs

JSON →
library5.0.0jsnpmunverified

ESLint shareable config for Mr.doob's Code Style™, the coding style used by three.js and other mrdoob projects. Current stable version is 5.0.0, released Apr 2020. The config enforces Mr.doob's conventions via ESLint with ES2020 support. This package is part of the mrdoobapproves browser-based code style checker/formatter. The config has evolved from a modified JSCS to now rely entirely on ESLint. Major differentiator: it's the official style for contributing to three.js, simplifying PR submission by validating adherence to Mr.doob's Code Style.

npm install eslint-config-mdcs
INSTALL
IMPORT
SIG · ESLINT-CONFIG-MDCS
E
eslint-config-mdcs
devopsjavascriptv5.0.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.

eslint-config-mdcs
✓ extends: 'mdcs' in .eslintrc
✗ extends: 'eslint-config-mdcs'
ESLint resolves shareable configs automatically without the 'eslint-config-' prefix in the extends field.

Install and configure eslint-config-mdcs in a JavaScript project. Shows npm install and ESLint config setup.

// Install the config npm install --save-dev eslint-config-mdcs // Create .eslintrc.json { "extends": "mdcs" } // Or in package.json "eslintConfig": { "extends": "mdcs" }
Debug
Known issues
breakingVersion 5.0 removes legacy JSCS support entirely. If you rely on JSCS rules, do not upgrade.
fix
Stay on version 4.0.0 or migrate to ESLint-only setup.
affects: >=5.0.0
deprecatedThe rule 'no-space-before-semicolon' is deprecated in favor of 'semi-style'.
fix
Update your config to use 'semi-style': ['error', 'last'] instead.
affects: >= 5.0.0
gotchaThe config enforces ES2020 syntax features (like optional chaining). Using this config with an older ESLint version may cause parsing errors.
fix
Make sure your ESLint version is >= 7.0.0 and parser options support ES2020.
affects: >=5.0.0
gotchaThe 'mdcs' extends value is case-sensitive and must be lowercase. 'MDCS' or 'Mdcs' will not work.
fix
Use exactly 'mdcs' in the extends field.
affects: all
Errors
Common errors & fixes
Error: Failed to load config "mdcs" to extend from.
The eslintrc extends field contains 'mdcs' but eslint-config-mdcs is not installed or is missing.
fix
Run 'npm install --save-dev eslint-config-mdcs' and ensure the package is in your devDependencies.
Parsing error: Unexpected token .
The config uses ES2020 features (e.g., optional chaining with ?.) but the parser or ESLint version does not support them.
fix
Update ESLint to version 7.0.0 or later, and ensure your ESLint configuration does not override parserOptions with an earlier ecmaVersion.
Configuration for rule 'no-space-before-semicolon' is invalid: has been removed.
Using a deprecated rule that was removed in ESLint 5.0 or later.
fix
Remove 'no-space-before-semicolon' from your rules and use 'semi-style' instead.
Upgrade
Version history
5.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-mdcs — npm install eslint-config-mdcs · libregistry