question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support ESM config (.eslintrc.mjs)

See original GitHub issue

Search terms used: is:issue is:open mjs OR esm OR "es module"

cf. #12593, which was auto-closed. All of the issues/RFCs mentioned as blockers in that issue are now closed/merged.

What is the status of ES module support for config files? In the form of

  • .eslintrc.mjs or
  • .eslintrc.js where the nearest package.json includes "type": "module"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
nzakascommented, Aug 11, 2020

As a final note here: ESM config will be part of the https://github.com/eslint/rfcs/pull/9 implementation.

2reactions
nzakascommented, Jul 9, 2020

Here’s the nice thing about my approach: if I’m wrong, we can always add support for .mjs later. I’m just less inclined to add a feature that may or may not be needed because we already have nearly seven years of backwards compatibility cruft in ESLint that we really can’t remove, so I don’t want to add more unless we need it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using ES Modules (ESM) in Node.js: A Practical Guide (Part 3)
ESlint configuration for Node.js ESM #. ESlint already supports ESM well because a lot of code is already using ESM via Babel or...
Read more >
ESLint's new config system, Part 2: Introduction to flat config
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Must use import to load ES Module .eslintrc.js - Stack Overflow
In my case, I had "type": "module" in package.json and .eslintrc.cjs (to force commonJS since ESM is not yet supported) and wanted to...
Read more >
What does it take to support Node.js ESM? – The Guild
build your library into ESM Compatible modules with the extension .mjs , and keep the CommonJS version with the standard .js extension; build ......
Read more >
eslint-import-resolver-typescript - npm
imports/exports fields support in package.json. TOC. Notice; Installation; Configuration; Options from enhanced-resolve. conditionNames ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found