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

eslint-plugin-mdx doesn't seems to load .remarkrc.mjs #436

Closed
4 tasks done
JulianCataldo opened this issue Oct 29, 2022 · 2 comments · Fixed by #461
Closed
4 tasks done

eslint-plugin-mdx doesn't seems to load .remarkrc.mjs #436

JulianCataldo opened this issue Oct 29, 2022 · 2 comments · Fixed by #461

Comments

@JulianCataldo
Copy link

JulianCataldo commented Oct 29, 2022

Initial checklist

Affected packages and versions

All latest

Link to runnable example

https://github.com/JulianCataldo/eslint-mdx-repro

Steps to reproduce

Hello!

Here is a minimal reproduction repository I've made to illustrate this issue:

https://github.com/JulianCataldo/eslint-mdx-repro

Steps to repro. are described in its README.

I've talked about it before here:
remarkjs/remark-lint#300

Was not quite sure were in the stack is the culprit (remark? eslint? eslint-mdx? cosmic-config?).

For now, creating a static config file (as YAML or JSON) seems to work fine, so ESLint is good with 100% ESMs remark plugins (through the MDX plugin).

But that means having to maintain two remark-lint config, one for MDX and one for MD.

Maybe I've overlooked something?

Many thanks :)

Expected behavior

.remarkrc.mjs loaded from both remark and eslint

Actual behavior

Module JS configs are not loaded by the ESLint plugin.

@JounQin
Copy link
Member

JounQin commented Oct 30, 2022

https://github.com/davidtheclark/cosmiconfig#searchplaces

PR welcome to add this support at

const explorer = cosmiconfig('remark', {
packageProp: 'remarkConfig',
})

@JounQin
Copy link
Member

JounQin commented May 3, 2023

Maybe we should migrate to use unified-engine instead.

JounQin added a commit that referenced this issue May 3, 2023
* feat: use unified-engine to load ESM configurations

close #436
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants