Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint 2.10.0 is broken w/ babel #14

Closed
wants to merge 1 commit into from

Conversation

rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented May 14, 2016

I'm really eager to use this library, so my first step was to try to install it then
tinker with the examples.

However, npm install from source requires linting to pass. With a fresh
install, eslint will report a slew of errors.

$ npm install

> redux-observable@0.4.0 prepublish /Users/kyle/code/src/github.com/blesh/redux-observable
> npm test

> redux-observable@0.4.0 test /Users/kyle/code/src/github.com/blesh/redux-observable
> npm run build && npm run build_tests && mocha temp

> redux-observable@0.4.0 build /Users/kyle/code/src/github.com/blesh/redux-observable
> npm run lint && rm -rf lib && babel src -d lib

> redux-observable@0.4.0 lint /Users/kyle/code/src/github.com/blesh/redux-observable
> eslint src && eslint test

/Users/kyle/code/src/github.com/blesh/redux-observable/src/ActionsObservable.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Users/kyle/code/src/github.com/blesh/redux-observable/src/index.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Users/kyle/code/src/github.com/blesh/redux-observable/src/reduxObservable.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

✖ 3 problems (3 errors, 0 warnings)

By setting the parserOptions to have sourceType: 'module', the above errors are fixed. This
doesn't take us all the way because it's not having a good time with the ES7 (proposed) bind operator.

/Users/kyle/code/src/github.com/blesh/redux-observable/src/ActionsObservable.js
  17:16  error  Parsing error: Unexpected token :

I was hoping to figure out how to get eslint to recognize ::. You'd think that using babel-eslint as
the parser (as is done here) would resolve this. Nope.

Anyways, eager to use the project to get rid of the rx redux mashup we've been working with for a while.

Thanks!

I'm really eager to use this library, so my first step was to try to install it then
tinker with the examples.

However, `npm install` from source requires linting to pass. With a fresh
install, eslint will report a slew of errors.

```
$ npm install

> redux-observable@0.4.0 prepublish /Users/kyle/code/src/github.com/blesh/redux-observable
> npm test

> redux-observable@0.4.0 test /Users/kyle/code/src/github.com/blesh/redux-observable
> npm run build && npm run build_tests && mocha temp

> redux-observable@0.4.0 build /Users/kyle/code/src/github.com/blesh/redux-observable
> npm run lint && rm -rf lib && babel src -d lib

> redux-observable@0.4.0 lint /Users/kyle/code/src/github.com/blesh/redux-observable
> eslint src && eslint test

/Users/kyle/code/src/github.com/blesh/redux-observable/src/ActionsObservable.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Users/kyle/code/src/github.com/blesh/redux-observable/src/index.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Users/kyle/code/src/github.com/blesh/redux-observable/src/reduxObservable.js
  1:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

✖ 3 problems (3 errors, 0 warnings)

```

By setting the parserOptions to have `sourceType: 'module'`, the above errors are fixed. This
doesn't take us all the way because it's not having a good time with the ES7 (proposed) bind operator.

```
/Users/kyle/code/src/github.com/blesh/redux-observable/src/ActionsObservable.js
  17:16  error  Parsing error: Unexpected token :
```

I was hoping to figure out how to get eslint to recognize `::`. You'd think that using babel-eslint as
the parser (as is done here) would resolve this. Nope.

Anyways, eager to use the project to get rid of the rx redux mashup we've been working with for a while.

Thanks!
@jayphelps
Copy link
Member

This is totally passing locally on my machine and @Blesh, but if I blow away node_modules and then install again, it fails just as you describe. Since eslint had a release today and we're only locking major versions, you picked up 2.10.0 instead of our local 2.9.0 and it appears to be having numerous issues with babel-related code eslint/eslint#6158

I'm going to lock us on 2.9.0 until eslint/eslint#6160 lands.

@jayphelps
Copy link
Member

jayphelps commented May 14, 2016

Okiedoke, I locked eslint to 2.9.0 w/ #15. Feel free to pull from master and remember to blow away the old eslint (or all node_modules).

Thanks for letting us know!

@jayphelps jayphelps changed the title chore(eslint): more opts for linting eslint 2.10.0 is broken w/ babel May 14, 2016
@rgbkrk
Copy link
Member Author

rgbkrk commented May 14, 2016

Cool, thanks @jayphelps.

@rgbkrk rgbkrk deleted the lint-options branch May 14, 2016 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants