Comments (5)
@JounQin it seems that both plugins are incompatible. I've tried to setup both with this config:
// .eslintrc.js
const markdownRecommended = require('eslint-plugin-markdown').configs.recommended;
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
],
overrides: [
{
files: ['*.mdx'],
extends: ['plugin:mdx/recommended'],
plugins: ['markdown'],
processor: 'markdown/markdown',
parserOptions: markdownRecommended.overrides[0].parserOptions,
rules: markdownRecommended.overrides[0].rules,
},
],
};
However, only errors coming from eslint-plugin-markdown
are reported. Once I comment the line with processor
, only errors coming from eslint-mdx
are reported. It seems both are incompatible.
Is there anything I'm missing?
from eslint-mdx.
@JounQin The PR at #208 removed the ability to validate JS inside code blocks, such as js
or jsx
. I would want to validate JS code inside it as well. What's the reason for removing it?
from eslint-mdx.
@JounQin The PR at #208 removed the ability to validate JS inside code blocks, such as
js
orjsx
. I would want to validate JS code inside it as well. What's the reason for removing it?
That PR has been closed.
And code block is intended to be ignored because they're not source code but something like string literal. But if you want to lint code blocks, maybe you can try eslint-plugin-markdown.
from eslint-mdx.
Let me know if you want me to create a new issue.
from eslint-mdx.
@satazor Sorry markdown code
in jsx is not supported and not going to happen in v1, but it should be possible in v2.
And I tried to fix part of this issue in #273. What means the following will be able to be parsed.
<details><summary >Override element states</summary>
The previous code sample show how to specify a custom color for a `naked` button by using a `style` attribute. It works great to provide a basic property like a `background-color`. What about [element states](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) though? You can't specify an hover state with a `style` attribute.
Here's another technique to specify a custom color by using a few CSS classes and a [CSS variable](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties). This technique leverage the ability to override a CSS variable of a stylesheet from the `style` attribute.
In the following example a React component render a button with a custom color `background-color` and a darker hover state by overriding the `--color` CSS variable from the `style` prop.
</details>
from eslint-mdx.
Related Issues (20)
- Parsing error with <img> tag HOT 3
- Parsing error mdx: Missing semicolon HOT 3
- Parsing error with Latex HOT 2
- Document usage in flat config HOT 1
- Parsing error: Expected value to be truthy HOT 4
- How can you type check React props with this plugin? HOT 3
- Please document how to make the linter fixable HOT 3
- Does not check nested code blocks (only lints top-level code blocks) HOT 6
- Research Spike: ESLint 9 compatibility HOT 6
- Incompatible w/ MDX v3? HOT 2
- There are serious issues when used with the `react/self-closing-comp` / `react/jsx-sort-props` rules. HOT 6
- `prettier/prettier` reports, but cannot be fixed automatically
- feat: use `worker.mts` for pure ESM
- feat: respect `.remarkignore`?
- Add more mdast specified nodes into estree AST
- on npm eslint-plugin-mdx v2.3.2 is tagged as latest while v3.1.3 should be HOT 2
- TypeError: Cannot use 'in' operator to search for 'start' in undefined
- maintenance: enable `strictNullChecks` option
- meta: how can we support `eslint-define-config` better? HOT 6
- mdx/code-blocks doesn't respect eslint-disable from outside of the block HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-mdx.