gcds-components icon indicating copy to clipboard operation
gcds-components copied to clipboard

chore: Upgrade eslint and migrate to new flat config

Open radmorecameron opened this issue 1 year ago • 4 comments

Summary | Résumé

1-3 sentence description of the changed you're proposing

This PR updates eslint to use the newer flat config format. This PR also updates eslint dependencies and adds an eslint plugin for storybooks.

Test instructions | Instructions pour tester la modification

  • Run npm run eslint while in the web directory and make sure there are no errors. Some rules have been changed to warnings so that eslint passes and prettier was commented out for now (before this migration it seems like there was already a lot of failures with prettier. There should probably be a github workflow that lints files whenever a PR is opened/updated)

radmorecameron avatar Nov 29 '24 03:11 radmorecameron

@radmorecameron thanks for opening a PR! Would you mind telling us more on the background for this PR in particular? At the moment we do not have open issues to migrate our eslint to a flat config. However, we should definitely have the linter run as a GH action on open PRs, I will see if we have a ticket for that.

daine avatar Dec 05 '24 23:12 daine

@radmorecameron thanks for opening a PR! Would you mind telling us more on the background for this PR in particular? At the moment we do not have open issues to migrate our eslint to a flat config. However, we should definitely have the linter run as a GH action on open PRs, I will see if we have a ticket for that.

Hi, Eslint 8 is EOL and Eslint 9 uses flat config by default and the eslintrc config was deprecated in eslint 9 (it's still usable but not enabled by default and will be removed in a future version of eslint).

radmorecameron avatar Dec 11 '24 13:12 radmorecameron

Hi @daine would you want me to update this PR to also run the linter in another job whenever tests are ran through GitHub actions ? Thanks, Cameron

radmorecameron avatar Jul 18 '25 21:07 radmorecameron

It should now run the linter with the test pipeline now

radmorecameron avatar Nov 03 '25 12:11 radmorecameron