Skip to content

feat!: upgrade to ESLint 10 @W-23474795@ - #412

Merged
WillieRuemmele merged 9 commits into
mainfrom
wr/eslint-10-upgrade
Aug 10, 2026
Merged

feat!: upgrade to ESLint 10 @W-23474795@#412
WillieRuemmele merged 9 commits into
mainfrom
wr/eslint-10-upgrade

Conversation

@WillieRuemmele

@WillieRuemmeleWillieRuemmele commented Aug 6, 2026

Copy link
Copy Markdown
Member

@W-23474795@

Summary

  • Upgrades ESLint from 9 to 10.4+ (breaking change → v12.0.0)
  • Replaces eslint-plugin-import with eslint-plugin-import-x (ESLint 10 compatible fork)
  • Replaces eslint-plugin-header with @tony.ganchev/eslint-plugin-header (proper schema for ESLint 10's strict validation)
  • Bumps eslint-plugin-jsdoc (^50→^63), eslint-plugin-unicorn (^56→^72), typescript-eslint (^8.0→^8.65), @eslint/js (^9→^10)
  • Removes 3 deprecated typescript-eslint formatting rules (member-delimiter-style, quotes, type-annotation-spacing) — Prettier handles these
  • Deletes all legacy eslintrc*.cjs template files from files/
  • Updates standardize-files.js to also remove .eslintignore and .eslintrc.json from consuming repos
  • Updates write-dependencies.js to ban the replaced plugins from consuming repos
  • Fixes pre-existing lint errors surfaced by ESLint 10 (unused catch vars, preserve-caught-error)

Breaking Changes

Consuming repos will need:

  1. eslint@^10.4.0 as a devDependency
  2. The new eslint.config.mjs (auto-distributed by sf-install)
  3. Any inline eslint-disable comments referencing import/ rules updated to import-x/

Follow-up (Phase 2)

Sweep 33 plugins + 7 libraries to remove committed-but-dead legacy eslint config files (.eslintrc.cjs, test/.eslintrc.cjs, .eslintignore).

Test plan

  • npm run lint passes clean with ESLint 10.8.0
  • npm test passes
  • CI passes
  • Run sf-install on a consuming repo to verify config distribution

BREAKING CHANGE: ESLint 9 -> 10.4+
- eslint-plugin-import -> eslint-plugin-import-x
- eslint-plugin-header -> @tony.ganchev/eslint-plugin-header
- eslint-plugin-jsdoc ^50 -> ^63
- eslint-plugin-unicorn ^56 -> ^72
- typescript-eslint ^8.0 -> ^8.65
- @eslint/js ^9 -> ^10
- Remove deprecated ts-eslint formatting rules
- Delete legacy eslintrc.cjs config files
- standardize-files.js removes .eslintignore/.eslintrc.json
- write-dependencies.js bans replaced plugins
- Fix pre-existing lint errors
- Version bump to 12.0.0
Move full config into sfEslintConfig.mjs and sfEslintConfig-strict.mjs
at the package root, exported via package.json exports field. Consumer
repos get a thin re-export wrapper that resolves plugins through
dev-scripts' own node_modules.
Also adds @typescript-eslint/no-unused-expressions: off to test
overrides (the TS extension rule fires independently in v8+).
Remove deprecated formatting rules (brace-style, eol-last, max-len,
new-parens, no-multiple-empty-lines, no-trailing-spaces, quote-props)
that Prettier already handles via eslint-config-prettier. Remove dead
no-return-await (replaced by @typescript-eslint/return-await). Rename
id-blacklist to id-denylist.
Add no-unsafe-function-type and no-unsafe-assignment to test overrides
since tests commonly use Function type for stubs and assign any.
Change ignore patterns from *.js/*.cjs/*.mjs to **/*.js/**/*.cjs/**/*.mjs
so nested JS fixtures in test directories are properly excluded from
type-checked linting.
Add eslint to requiredDeps so consumers that previously got it
transitively (via eslint-config-salesforce-typescript) will have it
added to their devDependencies during sf-install.
The repos migrated to Apache 2.0 but the eslint header rule still
enforced the old BSD 3-Clause pattern, causing false positives on every
file.
@WillieRuemmeleWillieRuemmele changed the title feat!: upgrade to ESLint 10feat!: upgrade to ESLint 10 @W-23474795@Aug 6, 2026
svc-cli-botand others added 3 commits August 6, 2026 21:12
- @salesforce/prettier-config: ^0.0.3 → ^0.0.4
- linkinator: ^6.1.2 → ^6.3.0
- typedoc: ^0.26.5 → ^0.26.11
- nyc: ^17.0.0 → ^17.1.0
- chai: ^4.3.10 → ^4.5.0
- @types/chai: ^4.3.14 → ^4.3.17
Comment threadutils/sf-config.js
Comment threadutils/write-dependencies.js Outdated
Comment threadpackage.json
Comment thread.eslintrc.js
…rules
- Replace inlined eslint config with re-export from eslint-config-salesforce-typescript@6
- Remove direct deps on eslint plugins (now provided transitively)
- Update files/ templates to import from eslint-config-salesforce-typescript
- Add eslint-config-salesforce-typescript to requiredDeps for consumer repos
- Keep @eslint/js, globals, eslint-config-prettier, header plugin for dev-scripts own config
Comment threadbin/sf-prepack.js
// eslint-disable-next-line no-console
console.log(
chalk.yellow('Warning:'),
// eslint-disable-next-line max-len

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.

is there a reason these went away? did the lint rules change in an unexpected way as part of this pr? or not get applied to bin or something?

@WillieRuemmele
WillieRuemmele merged commit 046d159 into mainAug 10, 2026
13 checks passed
Sign up for freeto 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.

4 participants

@WillieRuemmele@jfeingold35@mshanemc@svc-cli-bot