feat!: upgrade to ESLint 10 @W-23474795@ - #412
Open
WillieRuemmele wants to merge 7 commits into
Open
Conversation
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.
- @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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@W-23474795@
Summary
eslint-plugin-importwitheslint-plugin-import-x(ESLint 10 compatible fork)eslint-plugin-headerwith@tony.ganchev/eslint-plugin-header(proper schema for ESLint 10's strict validation)eslint-plugin-jsdoc(^50→^63),eslint-plugin-unicorn(^56→^72),typescript-eslint(^8.0→^8.65),@eslint/js(^9→^10)member-delimiter-style,quotes,type-annotation-spacing) — Prettier handles theseeslintrc*.cjstemplate files fromfiles/standardize-files.jsto also remove.eslintignoreand.eslintrc.jsonfrom consuming reposwrite-dependencies.jsto ban the replaced plugins from consuming repospreserve-caught-error)Breaking Changes
Consuming repos will need:
eslint@^10.4.0as a devDependencyeslint.config.mjs(auto-distributed bysf-install)eslint-disablecomments referencingimport/rules updated toimport-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 lintpasses clean with ESLint 10.8.0npm testpassessf-installon a consuming repo to verify config distribution