Parsing Error The Keyword import is Reserved (SublimeLinter-contrib-eslint)

后端 未结 10 1986
南笙
南笙 2021-01-31 01:14

I have a problem with eslint, it gives me [Parsing Error The keyword import is reserve] this is only occur in sublime, in atom editor work well. I have eslint

.eslintr

10条回答
  •  庸人自扰
    2021-01-31 01:57

    I found this issue while creating the vue project (Used Editor: Visual Code)

    Install babel-eslint package -> npm install babel-eslint

    Create the .eslintrc.js file and add below code

    module.exports = { root: true, parserOptions: { 'sourceType': 'module', parser: 'babel-eslint'
    } }

    => npm run serve, that error will be resolved like magic.

提交回复
热议问题