-
Notifications
You must be signed in to change notification settings - Fork 140
Parsing error: 'import' and 'export' may appear only with 'sourceType: module' #462
Comments
Are you using My first guess is that you need to add {
"parserOptions": {
"sourceType": "module",
}
} to your config file. |
yes thank you, that solved the issue! 👍 My eslint config is: {
"ecmaFeatures": {
"modules": true,
"spread" : true,
"restParams" : true
},
"env" : {
"browser" : true,
"node" : true,
"es6" : true
},
"rules" : {
"no-unused-vars" : 2,
"no-undef" : 2
},
"parserOptions": {
"sourceType": "module"
}
} and I'm using the packaged version. |
We recently upgraded the packaged version from ESLint |
This comment has been minimized.
This comment has been minimized.
HI just a question on es lint. what is the standard way of setting it up? just install the package from atom or setting up es lint locally for each and every project. |
There are many guides out there, ESLint has their own here: https://eslint.org/docs/user-guide/getting-started
This package is only meant to be a wrapper around ESLint, you should be setting it up in projects so:
I'm locking this issue as the original report has been resolved. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Unrelated (thanks for the parserOptions tip!), adding |
Fix the following error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Fixing using the following solution: AtomLinter/linter-eslint#462 (comment)
Fix the following error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Fixing using the following solution: AtomLinter/linter-eslint#462 (comment)
I get this error since the most recent update. is it possible there this is missing somewhere in the package?
The text was updated successfully, but these errors were encountered: