-
Notifications
You must be signed in to change notification settings - Fork 63
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
Implement new processor API #138
Closed
btmills opened this issue
Feb 26, 2020
· 0 comments
· Fixed by #144 or GoogleForCreators/web-stories-wp#6765
Closed
Implement new processor API #138
btmills opened this issue
Feb 26, 2020
· 0 comments
· Fixed by #144 or GoogleForCreators/web-stories-wp#6765
Labels
Comments
This was referenced Feb 26, 2020
Closed
btmills
added a commit
that referenced
this issue
Feb 26, 2020
The new processor API first shipped in ESLint v6, which requires at least Node.js v8.10.0. Since Node.js v8 left LTS maintenance two months ago, I considered dropping support for it as well and aligning with the supported engines in ESLint v7, but I don't see a compelling reason not to support ESLint v6.
btmills
added a commit
that referenced
this issue
Feb 26, 2020
The new processor API first shipped in ESLint v6, which requires at least Node.js v8.10.0. Since Node.js v8 left LTS maintenance two months ago, I considered dropping support for it as well and aligning with the supported engines in ESLint v7, but I don't see a compelling reason not to support ESLint v6.
btmills
added a commit
that referenced
this issue
Feb 28, 2020
The new processor API first shipped in ESLint v6, which requires at least Node.js v8.10.0. Since Node.js v8 left LTS maintenance two months ago, I considered dropping support for it as well and aligning with the supported engines in ESLint v7, but I don't see a compelling reason not to support ESLint v6.
btmills
added a commit
that referenced
this issue
Mar 2, 2020
btmills
added a commit
that referenced
this issue
Mar 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new processor API, as described in RFC #3, implemented in eslint/eslint#11552, and documented at https://eslint.org/docs/user-guide/configuring#specifying-processor, will allow users to chain processors to, for example, lint Vue and TypeScript code extracted from Markdown code blocks in addition to plain JS code that this plugin extracts today.
Currently, the processor has a hard-coded list of supported code block syntaxes:
https://github.com/eslint/eslint-plugin-markdown/blob/66b565b3763c30dcbc193e4bb74aee976860335d/lib/processor.js#L12
If a code block has one of those info strings, the processor will extract the code and pass it to ESLint for linting. All other code blocks are ignored, making this plugin the gatekeeper for any additional languages.
With the new processor API, the processor will extract code from all code blocks that have a syntax set, and users will be able to configure ESLint to lint blocks of their choosing. For example, the following Markdown document would pass three code blocks to ESLint:
Users will be able to configure linting of
*.js
,*.ts
, and*.vue
files individually as described in the processor configuration documentation.ESLint v6 is the first version to contain the new processor API, so this will be a breaking change that increases the minimum supported ESLint version to v6.
This tracking issue incorporates the following feature requests:
jsx
info strings #19The text was updated successfully, but these errors were encountered: