Skip to content

feat!: migrate ESLint 3 to ESLint 9 flat config with typescript-eslint#950

Draft
kdaviduik wants to merge 1 commit intotypescript-migration-part-4from
typescript-migration-part-5
Draft

feat!: migrate ESLint 3 to ESLint 9 flat config with typescript-eslint#950
kdaviduik wants to merge 1 commit intotypescript-migration-part-4from
typescript-migration-part-5

Conversation

@kdaviduik
Copy link
Copy Markdown
Contributor

@kdaviduik kdaviduik commented Mar 12, 2026

Part of https://github.com/Shopify/developer-tools-team/issues/1195


Replaces ESLint 3.3.1 + unmaintained eslint-plugin-shopify v13 with
ESLint 9 flat config + typescript-eslint v8. This enables type-aware
linting for .ts files during the ongoing TypeScript migration.

Key decisions:

  • 22 TypeScript rules configured (12 PRD-specified + 10 additional
    safety rules including switch-exhaustiveness-check,
    prefer-nullish-coalescing, consistent-type-imports)
  • src/types/ override suppresses known any/Function debt (deferred to PR 20)
  • Test files excluded (test linting added in Phase 5)
  • src/utils/ and src/styles/ now linted (18 files previously excluded
    by .eslintignore workaround)
  • Removed redundant lint from test script (CI already runs lint separately)
  • Used fileURLToPath workaround for __dirname (Node 18 compat)

Also fixes lint violations found by expanded coverage:

  • hasOwnProperty -> Object.hasOwn() in product-set.js
  • Removed unused isObject function in merge.js
  • Removed unused element param in frame-utils.js
  • Removed unused err binding in ui.js
  • Cleaned up stale eslint-disable directives across 4 files

BREAKING CHANGE: ESLint config format changed from .eslintrc to
eslint.config.mjs. Any custom ESLint integrations must update.

@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch 2 times, most recently from 730d840 to a9c5b43 Compare March 12, 2026 20:53
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 March 13, 2026 19:18
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from ffe9ea0 to 1de124b Compare March 13, 2026 19:18
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to enable-auto-changelog March 13, 2026 19:18
@kdaviduik kdaviduik changed the base branch from enable-auto-changelog to graphite-base/950 March 13, 2026 19:44
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from 1de124b to 4296a8c Compare March 13, 2026 19:44
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 March 13, 2026 19:44
@kdaviduik kdaviduik force-pushed the typescript-migration-part-4 branch from 3bc6f43 to 17942a1 Compare March 14, 2026 22:53
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from 4296a8c to 850f5d1 Compare March 14, 2026 22:53
@kdaviduik kdaviduik force-pushed the typescript-migration-part-4 branch from 17942a1 to 6ff31cb Compare March 15, 2026 02:23
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch 2 times, most recently from f3f0e73 to f6df438 Compare March 15, 2026 02:39
@kdaviduik kdaviduik force-pushed the typescript-migration-part-4 branch from 6ff31cb to 6b5888f Compare March 15, 2026 02:39
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 22, 2026 16:12
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from f6df438 to daa1b0f Compare April 22, 2026 16:13
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 22, 2026 16:13
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 22, 2026 16:39
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from daa1b0f to 4434486 Compare April 22, 2026 17:53
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 22, 2026 17:53
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 22, 2026 18:11
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from 4434486 to 3fd13d8 Compare April 22, 2026 18:12
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 22, 2026 18:12
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 22, 2026 20:22
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from 3fd13d8 to f661cd2 Compare April 22, 2026 20:23
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 22, 2026 20:23
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 22, 2026 20:41
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from f661cd2 to 74fdc96 Compare April 22, 2026 20:41
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 22, 2026 20:41
@kdaviduik kdaviduik changed the base branch from typescript-migration-part-4 to graphite-base/950 April 23, 2026 15:30
BREAKING CHANGE: ESLint configuration now requires ESLint 9+ and uses
flat config format. Custom ESLint configs extending this project will
need to migrate to flat config.

- Replace .eslintrc with eslint.config.mjs using flat config format
- Upgrade eslint 3.19.0 → 9.22.0 (6 major versions)
- Add typescript-eslint for type-aware linting (strict + stylistic presets)
- Add eslint-plugin-prettier for formatting integration
- Replace babel-eslint with @babel/eslint-parser
- Enable languageOptions.parserOptions.projectService for typed rules
- Configure test directory overrides for relaxed test rules
- Update package.json lint script for flat config compatibility
- Add @shopify/eslint-plugin as foundation for Shopify conventions
- Configure globals for browser + node + mocha environments

Co-Authored-By: Claude <noreply@anthropic.com>
@kdaviduik kdaviduik force-pushed the typescript-migration-part-5 branch from 74fdc96 to 2259b4f Compare April 23, 2026 15:31
@kdaviduik kdaviduik changed the base branch from graphite-base/950 to typescript-migration-part-4 April 23, 2026 15:31
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