I have a Monorepo based project setup with Nx and we are updating ESLint from 8.57.0 to 9.8.0. Nx do provides a generator(@nx/eslint:convert-to-flat-config
) to automatically transform eslintrc.json
to eslint.config.js
but I would prefer ES module over cjs filetype.
- Does the said generator has option to transform to
.mjs
? - What configuration changes would I need to make to use
eslint.config.mjs
overeslint.config.js
I looked at the documentations to help with correct transformation but it is short and concise and doesn’t include reference to transforming to .mjs. I would expected a resource,example or a command option of how to convert .eslintrc.json
to eslint.config.mjs
via Nx.