eslint “parsing error: Unexpected token {” in JSX

后端 未结 3 545
滥情空心
滥情空心 2021-02-13 00:54
const title = \'My Minimal React Webpack Babel Setups\';

const App = () => (
{title}
)
3条回答
  •  失恋的感觉
    2021-02-13 01:27

    My .eslintr has this extra configuration to enable JSX

    "parserOptions": {
        "ecmaFeatures": {
          "jsx": true
        }
      }
    

提交回复
热议问题