Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Add ESM support for Eslint config file #29613

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jan 14, 2025

This pull request includes changes to migrate ESLint configuration files from CommonJS (.cjs) to ECMAScript modules (.mjs) as the default.

ESLint Configuration Generation Changes

The changes also ensure consistent generated eslint configs based on the base eslint config.

  • If the workspace root has an eslint.config.cjs or eslint.config.js with module.exports. When you create a library or application it will generate an accompanying config at path {projectRoot}/eslint.config.cjs of the same format.
  • If the workspace root has an eslint.config.mjs or eslint.config.mjs with export default. When you create a library or application it will generate an accompanying config at path {projectRoot}/eslint.config.mjs.
  • If no eslint config is found at the workspace root one will be created eslint.config.mjs

@ndcunningham ndcunningham self-assigned this Jan 14, 2025
Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jan 17, 2025 2:38pm

Copy link

nx-cloud bot commented Jan 14, 2025

View your CI Pipeline Execution ↗ for commit db46958.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 35m 13s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base=bb03e... ✅ Succeeded 26s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 23s View ↗
nx documentation --no-dte ✅ Succeeded 41s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-17 15:09:06 UTC

@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch 2 times, most recently from fb3c46d to 127a1d3 Compare January 15, 2025 18:42
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch from 127a1d3 to c6bb641 Compare January 15, 2025 23:35
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch from c6bb641 to 7c42373 Compare January 16, 2025 00:07
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch 3 times, most recently from 2a78ad4 to 982ffb5 Compare January 16, 2025 14:26
@ndcunningham ndcunningham marked this pull request as ready for review January 16, 2025 14:55
@ndcunningham ndcunningham requested review from a team as code owners January 16, 2025 14:55
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch from 982ffb5 to 5b049ce Compare January 16, 2025 15:12
@ndcunningham ndcunningham changed the title feat(core): Add support for ESM config file feat(core): Add ESM support for Eslint config file Jan 16, 2025
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch 2 times, most recently from 26e015d to 0c6a6cf Compare January 17, 2025 01:18
@ndcunningham ndcunningham force-pushed the feat/eslint-esm-support branch from 0c6a6cf to de15ea4 Compare January 17, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants