doubleyong
管理员
管理员
  • 最后登录2026-05-25
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
阅读:5214回复:0

[前端]ESLint “Unexpected tab character” when “indent” rule set to “tab”

楼主#
更多 发布于:2020-07-25 18:22
在执行npm run serve时,报如下错误:

ESLint “Unexpected tab character” when “indent” rule set to “tab”

解决方案:
1. 找到文件.eslintrc , 在rules中添加"no-tabs": 0, 代码如下:

{
    "parser": "babel-eslint",
    "extends": "airbnb",
    "plugins": [
        "react",
        "jsx-a11y",
        "import"
    ],
    "rules":{
        "indent": [2, "tab"],
        "no-tabs": 0
    }
}
参考:
https://stackoverflow.com/questions/40893518/eslint-unexpected-tab-character-when-indent-rule-set-to-tab

知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号