Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Ensures es6 Imports and Exports Don't Cause Errors #6

Closed

Conversation

ggwicz
Copy link

@ggwicz ggwicz commented Aug 6, 2019

Before this change, let's say you have some simple code like the following atop a JS file:

import Cool from './Cool';
import Wow from './Wow';

Even with es6: true enabled in our coding standards' .eslintrc.js file, these trigger a linting error as follows:

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

This is an error that is often fixed just by adding sourceType: module to the .eslintrc.js's parserOptions option, but I've found that it required all of the changes seen in this file diff to make it work.

@aubreypwd
Copy link
Contributor

This has a conflict now that the main file is index.js but I'm very interested in what project this is occurring in as with the latest updates in this package, I'm not seeing that.

I use imports in this test and I don't see that warning... I would love to get the project this is on (remember this is a public repo, so please share in Slack) and what file you were working on so I can test this newer package on it....

Thanks!

@ggwicz ggwicz removed their assignment Mar 9, 2020
@ggwicz ggwicz closed this Mar 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants