{"id":19624,"library":"eslint-config-wikimedia","title":"eslint-config-wikimedia","description":"ESLint shareable config following Wikimedia coding conventions. Current stable version is 0.32.3, released November 2025, with Node.js >=20 <25 required. It provides profiles for client, server, MediaWiki extensions, jQuery, QUnit, Mocha, Selenium, Vue, and TypeScript. Distinct from other ESLint configs by enforcing Wikimedia-specific rules (e.g., MediaWiki message documentation, no self-closing Vue tags) and evolving target ES versions (ES2017 for client, ES2022 for server).","status":"active","version":"0.32.3","language":"javascript","source_language":"en","source_url":"https://github.com/wikimedia/eslint-config-wikimedia","tags":["javascript","style guide","eslint","eslintconfig","wikimedia"],"install":[{"cmd":"npm install eslint-config-wikimedia","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-wikimedia","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-wikimedia","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; required as the linting engine","package":"eslint","optional":false}],"imports":[{"note":"In .eslintrc.json, use the short name 'wikimedia' not the full package name.","wrong":"{\n  \"extends\": \"eslint-config-wikimedia\"\n}","symbol":"eslint-config-wikimedia","correct":"{\n  \"extends\": \"wikimedia\"\n}"},{"note":"Since 0.30.0, compound profile aliases like client-common are deprecated; use client/common (in version-specific sub-profiles) or just 'client'.","wrong":"{\n  \"extends\": \"wikimedia/client-common\"\n}","symbol":"client profile","correct":"{\n  \"extends\": \"wikimedia/client\"\n}"},{"note":"Typically combined with a client or server profile. mediawiki alone may not set proper language environment.","wrong":"{\n  \"extends\": \"wikimedia/mediawiki\"\n}","symbol":"mediawiki profile","correct":"{\n  \"extends\": [\"wikimedia/client\", \"wikimedia/mediawiki\"]\n}"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"root\": true,\n  \"extends\": [\n    \"wikimedia/client\",\n    \"wikimedia/jquery\"\n  ],\n  \"env\": {\n    \"browser\": true,\n    \"jquery\": true\n  },\n  \"globals\": {\n    \"$\": \"readonly\"\n  },\n  \"rules\": {\n    \"no-console\": \"warn\"\n  }\n}","lang":"javascript","description":"Basic ESLint config using Wikimedia client profile with jQuery support and custom global symbols."},"warnings":[{"fix":"Update configs that extend 'wikimedia/es5' or similar. No ES5 profiles are available; use a different base.","message":"Remove ES5 configs in v0.29.0","severity":"breaking","affected_versions":">=0.29.0"},{"fix":"Replace 'client-common' with 'client/common', 'mediawiki-qunit' with 'mediawiki/qunit', etc.","message":"Drop deprecated compound profile aliases in v0.30.0","severity":"breaking","affected_versions":">=0.30.0"},{"fix":"Use vue3 profiles instead; Vue2 is no longer supported.","message":"Delete vue2 configs in v0.30.0","severity":"breaking","affected_versions":">=0.30.0"},{"fix":"Upgrade Node.js to >=20.0.0.","message":"Node.js minimum version increased to 20 in v0.32.0","severity":"breaking","affected_versions":">=0.32.0"},{"fix":"Use the sub-profile path (e.g., 'client/es6').","message":"Compound profile aliases (e.g., 'client-es6') deprecated since v0.30.0","severity":"deprecated","affected_versions":">=0.30.0"},{"fix":"Always combine with at least 'wikimedia/client' or 'wikimedia/server' and an ES level profile.","message":"Extending 'wikimedia' alone does not set any environment or ES version","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure TypeScript files are compiled before linting, as the config assumes transpiled code.","message":"TypeScript files are automatically linted but require a compile step","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Remove custom array-bracket-newline rule or adjust to match Wikimedia's preset.","cause":"Incompatible rule setup when mixing custom rules with Wikimedia config","error":"Configuration for rule \"array-bracket-newline\" is invalid"},{"fix":"Use 'wikimedia/client/es6' (still valid) or 'wikimedia/client/common/es6'.","cause":"Profile aliases changed; es6 subprofile now under client/common/es6","error":"Cannot read config 'wikimedia/client/es6'","affected_versions":">=0.30.0"},{"fix":"Run npm install --save-dev eslint-config-wikimedia","cause":"eslint-config-wikimedia not installed or missing from node_modules","error":"ESLint couldn't find the config \"wikimedia\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}