为什么 eslint 给我这个错误 Parsing error: Unexpected token < in html file? 我该如何解决这个错误?我的 .eslint.json 配置:
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": [
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"strict": "off"
}
}Run Code Online (Sandbox Code Playgroud)
Eme*_*nik 13
你需要eslint-plugin-htmllint html 文件。详细信息可以在此链接中找到:https ://www.npmjs.com/package/eslint-plugin-html
将以下内容添加到“.eslintrc.json”文件对我有用:
"ignorePatterns": [
"**/*.html"
]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7948 次 |
| 最近记录: |