{"id":19593,"library":"eslint-config-stylelint","title":"eslint-config-stylelint","description":"Stylelint org's shareable ESLint config. Current stable version 27.0.0, released recently. This package enforces a consistent JavaScript style across Stylelint repositories. It has become a pure ESM package since v26, dropping Node <20.19.0 and ESLint 9.x support. Key differentiator: tailored for Stylelint development, includes Jest-specific config. Peer dependencies include eslint >=10.0.2 and eslint-plugin-jest >=29.15.0. The config extends @eslint/js and uses rules from @stylistic/eslint-plugin and eslint-plugin-regexp.","status":"active","version":"27.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/stylelint/eslint-config-stylelint","tags":["javascript","eslint","eslintconfig"],"install":[{"cmd":"npm install eslint-config-stylelint","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-stylelint","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-stylelint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for ESLint functionality","package":"eslint","optional":false},{"reason":"Peer dependency for Jest support","package":"eslint-plugin-jest","optional":true}],"imports":[{"note":"ESM-only since v26; CommonJS require will fail. Use the default export directly.","wrong":"const stylelintConfig = require('eslint-config-stylelint')","symbol":"stylelintConfig","correct":"import stylelintConfig from 'eslint-config-stylelint'"},{"note":"The Jest config is a subpath export; use default import (no braces). Also ESM-only.","wrong":"import { stylelintJestConfig } from 'eslint-config-stylelint/jest'","symbol":"stylelintJestConfig","correct":"import stylelintJestConfig from 'eslint-config-stylelint/jest'"},{"note":"ESLint flat config requires export default; CommonJS module.exports will not work. Spread the config arrays.","wrong":"module.exports = [...stylelintConfig]","symbol":"flat config array","correct":"export default [...stylelintConfig, ...stylelintJestConfig]"}],"quickstart":{"code":"// Install: npm install eslint-config-stylelint eslint --save-dev\nimport stylelintConfig from 'eslint-config-stylelint';\nimport stylelintJestConfig from 'eslint-config-stylelint/jest';\n\nexport default [\n  ...stylelintConfig,\n  ...stylelintJestConfig,\n];","lang":"javascript","description":"Shows installation and usage for ESLint flat config with and without Jest support."},"warnings":[{"fix":"Upgrade to Node >=20.19.0 and ESLint >=10.0.2.","message":"Dropped ESLint 9.x support and Node.js <20.19.0 support.","severity":"breaking","affected_versions":">=27.0.0"},{"fix":"Convert project to ESM or use dynamic import().","message":"Became a pure ESM package, breaking CommonJS require.","severity":"breaking","affected_versions":">=26.0.0"},{"fix":"Upgrade to ESLint 9+ and Node >=18.18.","message":"Dropped ESLint 8.x and Node.js <18.18 support.","severity":"breaking","affected_versions":">=23.0.0"},{"fix":"Formatting rules have been deprecated; use @stylistic/eslint-plugin instead.","message":"No-confusing-arrow rule removed in v22.","severity":"deprecated","affected_versions":">=22.0.0"},{"fix":"Import 'eslint-config-stylelint/jest' explicitly.","message":"Jest config requires a separate subpath import, not part of main config.","severity":"gotcha","affected_versions":">=21.0.0"}],"env_vars":null,"search_vec":"'10.0.2':59 '20.19.0':38 '27.0.0':14 '29.15.0':65 '9':41 'across':24 'becom':29 'config':3,10,54,67 'consist':21 'current':11 'depend':56 'develop':49 'differenti':45 'drop':36 'enforc':19 'eslint':2,9,40,58,62,77,81 'eslint-config-stylelint':1 'eslint-plugin-jest':61 'eslint-plugin-regexp':76 'eslint/js':69 'eslintconfig':82 'esm':32 'extend':68 'includ':50,57 'javascript':22,80 'jest':52,64 'jest-specif':51 'key':44 'node':37 'org':6 'packag':18,33 'peer':55 'plugin':63,78 'pure':31 'recent':16 'regexp':79 'releas':15 'repositori':26 'rule':72 'shareabl':8 'sinc':34 'specif':53 'stabl':12 'style':23 'stylelint':4,5,25,48 'stylistic/eslint-plugin':74 'support':43 'tailor':46 'use':71 'v26':35 'version':13 'x':42","created_at":"2026-04-25T11:18:36.909404+00:00","updated_at":"2026-04-25T11:18:36.909404+00:00","problems":[{"fix":"Replace require() with import or use dynamic import().","cause":"Package is ESM-only since v26; require() not allowed.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-stylelint/index.js not supported."},{"fix":"Ensure eslint-plugin-jest is installed and import from 'eslint-config-stylelint/jest'.","cause":"Using wrong import path or not installing eslint-plugin-jest peer dependency.","error":"Cannot find module 'eslint-config-stylelint/jest'"},{"fix":"Export an array of flat config objects as shown in quickstart.","cause":"Using old eslintrc format with flat config.","error":"ConfigError: Config array must contain only flat config objects."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/stylelint/eslint-config-stylelint","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-config-stylelint","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}