Skip to content

chore(deps): migrate to eslint 10 and flat config - #1945

Merged
ShaneK merged 1 commit into
mainfrom
chore/eslint-10
Nov 23, 2026
Merged

ShaneK merged 1 commit into
mainfrom
chore/eslint-10

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 23, 2026

Copy link
Copy Markdown
Member

Issue URL: N/A

What is the current behavior?

Lint runs on ESLint 8 with an eslintrc config in package.json. Dependabot's ESLint 10 bump can't install, because @typescript-eslint v6 only accepts ESLint 7 or 8, and ESLint 10 dropped eslintrc support anyway.

What is the new behavior?

  • ESLint 10 with the config moved to eslint.config.mjs. The parser, parserOptions.project, plugins, the prettier/prettier rule and every ignore pattern carry over. Ignores are now **/-prefixed so they keep matching at any depth like eslintrc did.
  • @typescript-eslint/eslint-plugin and parser v6 are replaced by typescript-eslint v8. It accepts TypeScript 4.9.5, which is what ^4.7 installs, so TypeScript stays put.
  • eslint-plugin-prettier goes from v4 to v5. v4's peer range allows ESLint 10, but it calls context.getSourceCode(), which ESLint 10 removed, so every lint run crashes. v5 needs Prettier 3, which means prettier ^3 and @ionic/prettier-config ^3.1.0. I held that at 3.1 instead of 4.0 because 4.0 switches trailingComma to all and would reformat src. The 3.1 config only adds an .md override.
  • eslint-plugin-import is removed, since nothing used it.
  • --ext .ts is gone from the script. The config limits rules to **/*.ts and ignores .js/.mjs/.cjs, so it still lints the same 9 files under src as before.

Supersedes #1940.

Does this introduce a breaking change?

  • Yes
  • No

Other information

I checked it by temporarily adding a double-quoted string without a semicolon to src/utils/index.ts, and prettier/prettier flagged it. I also ran @typescript-eslint/no-floating-promises from the CLI against a floating promise to confirm the type-aware parser setup works. src:build and starters:find-redundant still pass.

@ShaneK
ShaneK requested a review from a team as a code owner November 23, 2026 19:50
@ShaneK
ShaneK requested review from brandyscarney and removed request for a team November 23, 2026 19:50

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShaneK
ShaneK merged commit ef0976b into main Nov 23, 2026
31 checks passed
@ShaneK
ShaneK deleted the chore/eslint-10 branch November 23, 2026 23:53
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.

2 participants