Repository navigation
refactor: migrate eslint.config to TypeScript - #3292
ValentinYoushkevich wants to merge 2 commits into
Conversation
|
There was a problem hiding this comment.
Is this called via Jiti at all?
There was a problem hiding this comment.
Yes, eslint.config.ts imports it, and when ESLint loads the config through jiti, jiti also loads everything the config imports, including this file and the rule modules it imports. With the parallel imports from master, eslint fails right away with TypeError: _index.default.wrapStylisticOrCoreRule is not a function at lib/rules/array-bracket-spacing.ts, thrown from inside jiti.
Part of #2777. As Flo suggested there, this converts the repo's own
eslint.config.mjsto TypeScript. ESLint 10 still loads.tsconfigs through jiti unless theunstable_native_nodejs_ts_configflag is passed on every run, so jiti is added as a dev dependency andnpm run lint, plainnpx eslintand editor integrations keep working without flags. jiti can return half-evaluated modules when one module is imported concurrently (unjs/jiti#484), which broke the wrapper rules thattools/lib/rules.tsimported in parallel, so it now imports them one by one.--print-configfor sample files and theeslint .output are unchanged. The config stays out oftsconfig.jsonbecause thetypings/eslintpath mapping clashes with ESLint 10's config types.