Skip to content

feat(gamut-codemods): rename the ESLint plugin prefix in scope-swap - #42

Open
dreamwasp wants to merge 4 commits into
cass-gmt-1790-scope-renamefrom
cass-gmt-1790-eslint
Open

dreamwasp wants to merge 4 commits into
cass-gmt-1790-scope-renamefrom
cass-gmt-1790-eslint

Conversation

@dreamwasp

@dreamwasp dreamwasp commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Breaking change: the ESLint plugin is now @skillsoft/eslint-plugin-gamut, so the gamut/ rule prefix becomes @skillsoft/gamut/. The rule names don't change.

Stack (split from #28, merge in order):

  1. feat(gamut-codemods): add the codemods CLI and an empty scope-swap preset #38 Scaffold, based on main
  2. feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39 Package scope rename and gamut-kit removal, based on feat(gamut-codemods): add the codemods CLI and an empty scope-swap preset #38
  3. feat(gamut-codemods): move Video imports and add Markdown video overrides #40 Video and Markdown, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  4. feat(gamut)!: promote deep imports to the root, renaming Menu and SelectDropdown elements #41 Deep imports and Menu/SelectDropdown renames, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  5. feat(gamut-codemods): rename the ESLint plugin prefix in scope-swap #42 ESLint plugin prefix, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39 👈 this PR
  6. feat(gamut-codemods): warn about esmExternals: false in next.config #43 Next.js esmExternals warning, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  7. build(deps): make @skillsoft packages easier to install #44 Simpler dependencies (independent), based on main
  8. feat(gamut-agent-tools): add the gamut-scope-swap skill #45 gamut-scope-swap skill (open last), based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39, includes feat(gamut-codemods): move Video imports and add Markdown video overrides #40–feat(gamut-codemods): warn about esmExternals: false in next.config #43
  • eslint-comments rewrites // eslint-disable-next-line gamut/x (and the other directive forms) to @skillsoft/gamut/x.
  • eslint-config updates legacy .eslintrc / .eslintrc.json: the plugin name, plugin: extends, and rule keys. It does a targeted text rewrite, because these files are often JSONC.
  • Flat configs: the prefix is whatever key the plugin is registered under (plugins: { gamut }). So eslint-comments skips itself when it finds an eslint.config.*, and the checklist explains why. Flat configs and .eslintrc.js are left for the leftovers report.
  • @skillsoft/eslint-plugin-gamut: configs.recommended uses literal 'error' severities (as const), so the plugin type-checks as an ESLint Plugin in a typed flat config.

PR Checklist

  • Related to designs: N/A
  • Related to JIRA ticket: GMT-1790
  • Changeset added
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions for the code change
  • Package previews from this PR are passing end-to-end tests in all relevant consuming repositories

Testing Instructions

  1. yarn nx test gamut-codemods (expect 71 tests) and yarn nx test eslint-plugin-gamut.

  2. Legacy config run:

    yarn nx build gamut-codemods
    mkdir -p /tmp/swap && cd /tmp/swap && git init -q
    printf "import { Box } from '@codecademy/gamut';\n// eslint-disable-next-line gamut/no-inline-style\nexport const A = () => <Box style={{}} />;\n" > a.tsx
    echo '{ "plugins": ["gamut"], "extends": ["plugin:gamut/recommended"], "rules": { "gamut/no-inline-style": "error" } }' > .eslintrc.json
    git add -A && git commit -qm init
    node <repo>/packages/gamut-codemods/dist/bin.js scope-swap .

    The directive and .eslintrc.json should both use @skillsoft/gamut.

  3. Flat config run: in a new throwaway repo with an eslint.config.js, the output starts with [eslint-comments] skipped: found flat ESLint config. Directives are left alone, and the next steps explain the plugins key.

PR Links and Envs

Repository PR Link
Mono N/A

🤖 Generated with Claude Code

eslint-comments rewrites gamut/ directives to @skillsoft/gamut/, and
eslint-config updates the plugin name, plugin: extends, and rule keys in
legacy .eslintrc files. Under a flat config the prefix is the plugins key,
so eslint-comments skips itself and the checklist explains why.

Also types eslint-plugin-gamut's recommended severities as literals, so the
plugin fits ESLint's Plugin type in a typed flat config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dreamwasp and others added 3 commits October 20, 2026 11:10
@dreamwasp
dreamwasp marked this pull request as ready for review October 20, 2026 15:59
@dreamwasp
dreamwasp requested a review from a team as a code owner October 20, 2026 15:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant