{"id":19771,"library":"eslint-plugin-gamut","title":"eslint-plugin-gamut","description":"ESLint plugin for Codecademy's Gamut design system, version 2.4.3 (stable, maintained). Provides rules and configurations tailored for Gamut applications, enforcing best practices for gamut-styles, gamut-icons, and other Codecademy libraries. Ships with TypeScript definitions. Part of the larger Gamut monorepo with regular releases. Differentiators: built-in presets for Gamut-specific patterns, seamless integration with Codecademy's design system.","status":"active","version":"2.4.3","language":"javascript","source_language":"en","source_url":"https://github.com/Codecademy/gamut","tags":["javascript","eslint","gamut","gamut-styles","styles","typescript"],"install":[{"cmd":"npm install eslint-plugin-gamut","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-gamut","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-gamut","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency, required to use ESLint plugins.","package":"eslint","optional":false}],"imports":[{"note":"ESM default export since v2. For CJS, use `const plugin = require('eslint-plugin-gamut').default`.","wrong":"const plugin = require('eslint-plugin-gamut')","symbol":"plugin","correct":"import plugin from 'eslint-plugin-gamut'"},{"note":"Named export for preset configurations. Works in ESM and CJS.","wrong":"import configs from 'eslint-plugin-gamut/configs'","symbol":"configs","correct":"import { configs } from 'eslint-plugin-gamut'"},{"note":"Named export for individual rule objects. Use this for custom rule configuration.","wrong":"import rules from 'eslint-plugin-gamut/rules'","symbol":"rules","correct":"import { rules } from 'eslint-plugin-gamut'"},{"note":"Access recommended config via configs.recommended.","wrong":"import configs from 'eslint-plugin-gamut/recommended'","symbol":"configs.recommended","correct":"import { configs } from 'eslint-plugin-gamut';\n// use configs.recommended"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['gamut'],\n  extends: ['plugin:gamut/recommended'],\n  rules: {\n    'gamut/no-deprecated-gamut-components': 'error',\n  },\n};","lang":"javascript","description":"Shows how to enable eslint-plugin-gamut in an ESLint config using recommended preset and a specific rule."},"warnings":[{"fix":"Update ESLint to 8+ and set `type: 'module'` in package.json, or use a bundler that handles ESM. For CJS projects, use dynamic import.","message":"In v2, the plugin switched from CommonJS to ESM-only exports. Requires ESLint 8+ with ESM support or bundler.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update to gamut-styles v17 and adjust rules accordingly. Remove or replace any rules targeting gamut-styles v16.","message":"Removed support for deprecated gamut-styles v16 rules. Existing configurations referencing v16-specific rules will break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace with `gamut/no-deprecated-assets` and update the configuration.","message":"Rule `gamut/no-deprecated-gamut-illustrations` is deprecated in favor of a more general rule covering all deprecated Gamut assets.","severity":"deprecated","affected_versions":">=1.5.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install eslint-plugin-gamut --save-dev` and ensure node_modules is present.","cause":"Plugin not installed or ESLint cannot resolve it.","error":"Error: Failed to load plugin 'gamut' declared in '.eslintrc': Cannot find module 'eslint-plugin-gamut'"},{"fix":"Use `const plugin = require('eslint-plugin-gamut').default;` or switch to ESM imports.","cause":"Using CJS `require` on an ESM-only package without default interop.","error":"TypeError: plugin.rules is not an iterable"},{"fix":"Use the config object: `extends: [require('eslint-plugin-gamut').configs.recommended]` or the new plugin prefix syntax: `'plugin:gamut/recommended'` if supported.","cause":"Old string-based extends syntax no longer supported since v2.3.0.","error":"ESLint: 'plugin:gamut/recommended' configuration is deprecated. Use 'extends: ['eslint-plugin-gamut/configs/recommended']'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}