4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Parsing error: The keyword 'import' is reserved の解決法

Posted at

解決法

eslintから怒られているので、.eslintrcに怒られないようにこちらを追記してください。

{
    ...
    "parserOptions": {
        "ecmaVersion": 7, 
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true
        }
    }
   ...
}

参考
https://github.com/yannickcr/eslint-plugin-react/issues/447#issuecomment-208625730

eslintのプロパティについてはこちら
https://eslint.org/docs/user-guide/configuring

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?