---
title: "ESLint flat config with EcmaScript modules (mjs) in an NX workspace"
url: https://daily.dev/posts/eslint-flat-config-with-ecmascript-modules-mjs-in-an-nx-workspace-zpjtixyeh
source_url: https://timdeschryver.dev/blog/eslint-flat-config-with-ecmascript-modules-mjs-in-an-nx-workspace
type: article
source: "Tim Deschryver"
author: "Tim Deschryver"
published: 2026-05-31T07:47:16.169Z
updated: 2026-06-01T04:01:55.987Z
tags: ["webdev", "javascript", "typescript", "angular"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ESLint flat config with EcmaScript modules (mjs) in an NX workspace

**[Tim Deschryver](https://daily.dev/sources/timdeschryver)** · [@timdeschryver](https://daily.dev/timdeschryver) · 2 min read · 0 upvotes · 0 comments

## Summary

ESLint v9 introduced the flat config format, but using it with EcmaScript modules (.mjs files) in an NX workspace has a caveat: the NX linter doesn't recognize the .mjs extension. A practical workaround is to use a CommonJS bridge file (eslint.config.cjs) that loads and re-exports the flat config from the .mjs file. The post documents this approach based on lessons learned migrating Angular Testing Library to ESLint v9 flat config in an NX monorepo.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://timdeschryver.dev/blog/eslint-flat-config-with-ecmascript-modules-mjs-in-an-nx-workspace>

## Similar posts on daily.dev

- [ESLint v10: Flat Config Completion and JSX Tracking](https://daily.dev/posts/eslint-v10-flat-config-completion-and-jsx-tracking-muqydccwu) · InfoQ · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript), [#typescript](https://daily.dev/tags/typescript), [#angular](https://daily.dev/tags/angular)

[View this post on daily.dev](https://daily.dev/posts/eslint-flat-config-with-ecmascript-modules-mjs-in-an-nx-workspace-zpjtixyeh)
