-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add support for recognizing Vue components in .md files #2576
Comments
This is indeed out of scope for eslint-plugin-vue. That the Vue parser chokes on Markdown files is expected. However, you can indeed use |
@FloEdelmann thanks for your response, I understand that we can use the # Vue script in `.md` files aren't linted
some markdown content
<LintedComponent />
```ts
console.warn(`code blocks can be linted`)
```
<script setup lang="ts">
import { ref } from 'vue'
import LintedComponent from './components/linted.vue'
console.warn("Vue script in `.md` files aren't linted")
const lorem = ref('ipsum')
</script> |
|
I've never heard about this use case. Is it supported/endorsed specifically by Vitepress, or do you know of other frameworks that allow/execute/transform |
Vitepress brings the ability to use Vue component logic in Vitepress - Using Vue in Markdown
|
@ota-meshi Do you think this is worth supporting? |
I am not sure if it's worth mentioning that
It would be great to have both IntelliSense and linting support for |
Not sure if this is in the scope of
eslint-plugin-vue
or is more a responsibility ofvitepress
itself, but there is no mention on the docs of how to lint.md
files when you are usingvitepress
Checklist
Tell us about your environment
^9.12.0
^9.28.0
^3.5.11
^1.4.0
v20.17.0
Microsoft Windows 11 Pro Version 10.0.22631 Build 22631
Please show your full configuration:
What did you do?
I use the custom parser config example, but the plugin ignores all the
.md
files, if I add the.md
globs to the files config, the lint script throws anerror Parsing error: Invalid character
type of errorNot sure if I could use and set a custom parser from
@eslint/markdown
ormarked
for this use case.All the
.ts
and.vue
files are correctly lintedWhat did you expect to happen?
The
eslint-plugin-vue
should be able to lint the vue components in.md
filesWhat actually happened?
Repository to reproduce this issue
https://github.com/salazarr-js/vitepress-eslint
The text was updated successfully, but these errors were encountered: