govuk-design-system
govuk-design-system copied to clipboard
eslintrc.js is about to be deprecated
What
We're using an .eslintrc.js
file to configure our eslint. This is due to be deprecated in eslint 9.0.0, and has caused some issues with eslint plugins.
We should look into updating to the new eslint.config.js
style.
Who needs to work on this
Developer
Who needs to review this
Developer
Done when
- [ ] Our eslint config is in the new style.
The plugins used by our config for eslint also have to support the new 'flat config' format before we can make this upgrade. I will watch these issues and update this list when they are merged.
Library | Ready |
---|---|
eslint | ✅ |
eslint-config-standard | ❌ (need to change to new plugin) |
eslint-config-prettier | ✅ |
eslint-plugin-import | import-js/eslint-plugin-import#2948 |
eslint-plugin-n | ✅ |
eslint-plugin-promise | ✅ (if updated to latest version) |
eslint-plugin-jest | ✅ |
The latest update to this is that standard is now no longer going to be maintained and has splintered into a different plugin neo-standard. I guess this means that the eslint-config-standard is no longer maintained also and so we need to change to a different plugin.
Discovered that ESLint recently introduced a configuration migrator, taking advantage of the FlatConfig class for compatibility. This might come handy for making the jump.
neostandard is indeed like eslint-config-standard, but using ESLint 9 and Flat Config from the ground up, and more importantly: Has an open governance model
Feedback and questions are welcome 🙏
Since you use prettier as well the new option to deactivate style rules in neostandard should be welcome for you, may make eslint-config-prettier redundant
https://github.com/un-ts/eslint-plugin-import-x this is a fork of eslint-plugin-import that seemingly does support v9 (but not flat config). Could spike into updating to v9 and using this instead of plugin-import (which doesn't seem to have had any movement at all as of late).