Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enforcement of .js extensions for require()
DEFRA/water-abstraction-team#115 Recently, we [overhauled our project linting](#1476). We moved to ESLint v9 and its new flat file config, switched to Prettier to handle our 'style' conventions, and replaced StandardJS with Neostandard. On that last point, the one rule we could not migrate at the time, was enforcement of `.js` extensions when requiring modules. We know Node.js will handle this for us: the extension is not required. But eventually we intend to migrate to ESM modules and from previous attempts, having the `.js` in place reduces the amount of work this requires. We are now happy to report that in v0.12.0 [Neostandard](https://github.com/neostandard/neostandard) has adopted [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) so we can add the rule back in, which is handy, as we've spotted new instances of folks forgetting to do this!
- Loading branch information