taro cli 2.0.4报错 React version not specified in eslint-plugin-react settings.



  • taro项目报错: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration

    .eslintrc配置内容如下:
    {
    "extends": ["taro"],
    "rules": {
    "no-unused-vars": ["error", {
    "varsIgnorePattern": "Taro"
    }],
    "react/jsx-filename-extension": [1, {
    "extensions": [".js", ".jsx", ".tsx"]
    }],
    "react/sort-comp": 0,
    "indent": ["error", 4, {
    "ignoredNodes": ["JSXElement"]
    }],

        "react/jsx-indent-props": ["error ", 4]
    
    },
    "parser": "babel-eslint",
    "plugins": [
        "react"
    ],
    "settings": {
        "react": {
            "version": "detect"
        }
    }
    

    }

    请问有谁有遇到过这个问题吗?谢谢


登录后回复