Sick of toggling "Use Flat Config" in ESlint VSCode extension settings?

Whenever I do a JavaScript exercise (not sure about other tracks, I’m a newbie) I have to go into my VSCode ESlint extension settings and turn off “Use Flat Config” file setting (because I use a flat config for all non-exercism related projects).

Now I just run this tool from ESlint with using an alias in BASH (see below) and everything still works fine (with my “Use Flat Config” option turned ON in the ESlint extension settings).

alias eslintmigrate='npx @eslint/migrate-config .eslintrc'
2 Likes

The reason you need to do this is because the extension is written in that way. ESLint 9 can work with both, but the track still uses the older ESLint 8.

However, Switch to pnpm, ESLint 9, and helpful output by SleeplessByte · Pull Request #852 · exercism/javascript-test-runner · GitHub is coming “soon”, and then the track will be upgraded to ESLint 9, and a flat config, remove the need for this.

Until then, your alias makes perfect sense!

3 Likes