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

Support async processing #203

Closed
wooorm opened this issue Apr 28, 2020 · 7 comments · Fixed by #307
Closed

Support async processing #203

wooorm opened this issue Apr 28, 2020 · 7 comments · Fixed by #307
Labels
🗄 area/interface This affects the public interface 🏡 area/internal This affects the hidden internals 🌊 blocked/upstream This cannot progress before something external happens first external known issue from external, can't do much by ourselves 👀 no/external This makes more sense somewhere else 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have

Comments

@wooorm
Copy link
Member

wooorm commented Apr 28, 2020

Subject of the issue

eslint-mdx uses .processSync instead of .process, causing async plugins to fail.

Error: `processSync` finished async. Use `process` instead
Occurred while linting /Users/tilde/Code/oss/mdx/packages/remark-mdx/readme.md:1
    at assertDone (/Users/tilde/Code/oss/mdx/node_modules/unified/index.js:469:11)
    at Function.processSync (/Users/tilde/Code/oss/mdx/node_modules/unified/index.js:401:5)
    at Program (/Users/tilde/Code/oss/mdx/node_modules/eslint-plugin-mdx/lib/cjs.js:361:44)
    at /Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
    at NodeEventGenerator.applySelectors (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
    at NodeEventGenerator.enterNode (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
    at CodePathAnalyzer.enterNode (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23)

Your environment

  • OS: osx latest
  • Packages:
  • Env: node 13.10, 6.14, yarn 1.22

Steps to reproduce

yarn format in mdx-js/mdx (with changes on a branch)

Expected behaviour

Support async plugins:

const file = remarkProcessor.processSync(

Actual behaviour

Crash.


P.S. aside: you may be interested in vfile-to-eslint

@wooorm wooorm added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Apr 28, 2020
@JounQin
Copy link
Member

JounQin commented Apr 29, 2020

Yes, it is a known issue, and that's why validate-links rule is disabled in mdx-js/mdx.

As I know asynchronous rule is not supported by ESLint itself right now, or is there any workaround to support?

Related: #73 and eslint/rfcs#4

@wooorm
Copy link
Member Author

wooorm commented Apr 29, 2020

Ahh okay, didn’t know ESLint didn’t support that 🤔

@karlhorky
Copy link

Looks like ESLint is getting parallel processing support: eslint/rfcs#42

(eslint/rfcs#4 is closed now)

@JounQin JounQin added external known issue from external, can't do much by ourselves 🌊 blocked/upstream This cannot progress before something external happens first 👀 no/external This makes more sense somewhere else 🙅 no/wontfix This is not (enough of) an issue for this project and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Feb 21, 2021
@JounQin JounQin closed this as completed Feb 21, 2021
@JounQin
Copy link
Member

JounQin commented Feb 21, 2021

Cannot do much before ESLint changes.

@JounQin JounQin reopened this Apr 27, 2021
@JounQin JounQin added 🏡 area/internal This affects the hidden internals 🦋 type/enhancement This is great to have 🧒 semver/minor This is backwards-compatible change 🗄 area/interface This affects the public interface and removed 🙅 no/wontfix This is not (enough of) an issue for this project labels Apr 27, 2021
@karlhorky
Copy link

Wow, this is great! Does this mean that the validate-links rule will be enabled again for Markdown / MDX?

Is there anywhere where we can follow along with this?

@JounQin
Copy link
Member

JounQin commented Apr 29, 2021

@karlhorky

Yes! You can try it with latest codesandbox build right now.

https://ci.codesandbox.io/status/mdx-js/eslint-mdx/pr/309/builds/125085

@JounQin
Copy link
Member

JounQin commented Apr 29, 2021

v1.13.0 has been released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 🏡 area/internal This affects the hidden internals 🌊 blocked/upstream This cannot progress before something external happens first external known issue from external, can't do much by ourselves 👀 no/external This makes more sense somewhere else 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging a pull request may close this issue.

3 participants