Closed m1rn closed 1 week ago
You need both the @html-eslint/parser
and @html-eslint/eslint-plugin
to make it work. Ex:
import html from "eslint-plugin-html"
import htmlEslint from '@html-eslint/eslint-plugin'
import PARSER_HTML from '@html-eslint/parser'
export default [
{
files: ["**/*.html"],
plugins: {
html,
"@html-eslint": htmlEslint,
},
languageOptions: {
parser: PARSER_HTML
},
rules: {
'no-console': 2
}
}
]
See the @html-eslint default config: https://github.com/yeonjuan/html-eslint/blob/main/packages/eslint-plugin/lib/index.js#L18-L24
Description
According to the documentation,
eslint-plugin-html
should be compatible with@html-eslint
. However, when I tried using both in my project, I noticed thateslint-plugin-html
stops working. It seems like the issue is caused by@html-eslint/parser
.Here are the details:
eslint-plugin-html
on its own, it works perfectly fine.@html-eslint
and its parser,eslint-plugin-html
no longer functions.I’d like to know if this is a known issue or if there's any way to make these two plugins work together.
Thanks!
Setup configuration