You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugSomething isn't workingciCI, build pipeline, test hygienehygieneToil, but its useful to get get too behind on itjavascriptPull requests that update Javascript code
createConfig() in eslint.config.shared.js returns the module-level baseConfig object by reference and writes the caller's project into it, and it appends 'eslint.*.js' to the caller's ignorePatterns array in place.
If two packages' configs were ever built in one process, the last project would win for both, and each call adds another 'eslint.*.js' to the caller's array.
Why it matters
Latent only.
ESLint loads one package config per process today, and each package passes a fresh array literal, so nothing is wrong now.
It would bite silently (a package linted against another package's tsconfig) if anything composed several package configs, such as a root config or a programmatic ESLint run over the monorepo.
Fix
Build baseConfig and reactConfig inside createConfig() (or behind small factory functions), set parserOptions.project on the local object, and use [...options.ignorePatterns, 'eslint.*.js'] instead of push.
A few lines; do it with #896, which touches the same file.
bugSomething isn't workingciCI, build pipeline, test hygienehygieneToil, but its useful to get get too behind on itjavascriptPull requests that update Javascript code
Activity
[-]build: eslint.config.shared.js mutates module-level shared objects (cross-call clobbering, fragile index lookup)[/-][+]build: shared eslint config mutates module-level objects[/+]