Closed JulianCataldo closed 1 year ago
All latest
https://github.com/JulianCataldo/eslint-mdx-repro
Hello!
Here is a minimal reproduction repository I've made to illustrate this issue:
Steps to repro. are described in its README.
I've talked about it before here: https://github.com/remarkjs/remark-lint/issues/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 :)
.remarkrc.mjs loaded from both remark and eslint
.remarkrc.mjs
remark
eslint
Module JS configs are not loaded by the ESLint plugin.
https://github.com/davidtheclark/cosmiconfig#searchplaces
PR welcome to add this support at https://github.com/mdx-js/eslint-mdx/blob/a1998c787f0049ae0cd705fc51f079c63ded75b2/packages/eslint-mdx/src/worker.ts#L60-L62
Maybe we should migrate to use unified-engine instead.
unified-engine
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: https://github.com/remarkjs/remark-lint/issues/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 bothremark
andeslint
Actual behavior
Module JS configs are not loaded by the ESLint plugin.