6
2

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 の対処方法

Last updated at Posted at 2020-07-23

EslintのエラーParsing error: The keyword 'import' is reservedの対処方法です。

出力イメージ

import XXX from "./XXX.js"
^^^^^^
// Parsing error: The keyword 'import' is reserved

対処方法

.eslintrc.js
module.exports = {
   // ・・・
   parserOptions: {
     sourceType: "module",
     ecmaVersion: 2015,
   },
};
6
2
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
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?