-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Can't disable a rule with mdx-js/eslint-mdx and remake-lint #205
Comments
@DanielFerrariR Please provide a minimal and runnable reproduction like a GitHub repository with https://www.gitpod.io/. |
Did you try to add a blank line after |
Thanks for your reply! https://github.com/DanielFerrariR/mdx-eslint-example Couldn't make eslint work on gitpod.io. Maybe because extensions is on beta phase there. Install dependencies with yarn and see the readme file warnings. Can't disable them even using it correctly. |
@DanielFerrariR Thanks for reporting, and I can reproduce it locally now. But it seems a bug of <!-- README.md -->
<!--lint disable no-literal-urls-->
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting const fs = require('fs')
const remark = require('remark')
const remarkMdx = require('remark-mdx')
const remarkLint = require('remark-lint')
const noLiteralUrls = require('remark-lint-no-literal-urls')
const report = require('vfile-reporter')
const file = remark()
.use(remarkLint)
.use(noLiteralUrls)
.use(remarkMdx)
.processSync(fs.readFileSync('README.md', 'utf8'))
console.log(report(file))
But if I use @wooorm Any idea? Maybe related: remarkjs/remark-lint#47 |
OK, I found out that whenever I add So it should be an issue of What means |
Weird. For a quick fix for now, adding this plugin right after remark-mdx should do the trick @JounQin: https://github.com/mdx-js/mdx/blob/master/packages/mdx/md-ast-to-mdx-ast.js That’s a step MDX takes right before applying In the v2 branch, I removed that step: https://github.com/mdx-js/mdx/tree/next/packages/mdx |
@wooorm I don't know whether I understand correctly but I tried like following: const fs = require('fs')
const toMDXAST = require('@mdx-js/mdx/md-ast-to-mdx-ast')
const remark = require('remark')
const remarkMdx = require('remark-mdx')
const remarkLint = require('remark-lint')
const noLiteralUrls = require('remark-lint-no-literal-urls')
const report = require('vfile-reporter')
const file = remark()
.use(remarkLint)
.use(remarkMdx)
.use(toMDXAST)
.use(noLiteralUrls)
.processSync(fs.readFileSync('README.md', 'utf8'))
console.log(report(file)) There will be a fetal error:
|
Gosh, that’s a pity. |
so that it could be used to disable the rule
so that it could be used to disable the rule
@wooorm Please help to publish a new release, it should be fixed. |
Published! Weird: I have a |
Can't disable remake-lint rules while using it with mdx-js/eslint-mdx (on a .md file). Tried:
I can disable mdx rules in .mdx files just fine, but it doesn't work for .md ones.
Also, seems pretty bad to have to reload my vscode to update disabled rules from .remarkrc file. Is there any better way to use these rules with eslint?
package.json
.eslintrc
.remarkrc
The text was updated successfully, but these errors were encountered: