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

Updating to ESLint 2 #254

Closed
hzoo opened this issue Feb 15, 2016 · 19 comments
Closed

Updating to ESLint 2 #254

hzoo opened this issue Feb 15, 2016 · 19 comments

Comments

@hzoo
Copy link
Member

hzoo commented Feb 15, 2016

For ESLint 1: use babel-eslint@5.x.x, otherwise use babel-eslint@6.x.x for ESLint 2.

How should this be done?

There's currently { latest: '4.1.8', next: '5.0.0-beta10' }

Where 4.x is using babel 5, and 5.x is babel 6.

We will definitely need to make a major version update, but I'm not sure how we want to do this. The simplest thing is to just release a 6.x version for eslint 2.0 and that's it (don't touch the other ones?)

There's a lot of existing bugs in 4.x/5.x (and haven't released 5.x proper) and it doesn't seem great to do 4 versions and do fixes on all of them.

I could just set beta10 to be babel-eslint@5 since a lot of people are using it already.
Or, update babel eslint 5 to be both the eslint update and the babel 6 upgrade.
Or make a new 7.x version?

And for people using babel 5, 6.x would be babel 5 + eslint 2? Hope I'm not overthinking this.

@Arcanemagus
Copy link

Personally my vote would be for moving straight to babel-eslint 6.x, assuming babel-eslint 5.x is at a state where you would consider releasing it anyway. Current users of 4.x will simply (ha!) be updating to a new major version that supports babel 5 and eslint 2, while users of babel-eslint 5 will be going to a new major version with support for eslint 2.

@steelbrain
Copy link

I would also like to have a v6 release that uses babel v6 and eslint v2, so we have matching versions between both babel-eslint and babel.

@AlicanC
Copy link

AlicanC commented Feb 16, 2016

There is no reason to support Babel 5 to be honest. It's not even supported by the Babel team, it's abandoned.

@jonathanong
Copy link

i don't care as long as you guys start following semver. declaring a dependency as next is really annoying.

@hzoo
Copy link
Member Author

hzoo commented Feb 16, 2016

Ok, what do think we need to do to follow semver; I thought we we're doing it correctly already?
And why can't you specify the exact version rather than next? Would be nice to know how many people are using it (if everyone is then yeah we might as well just publish 5.x)

I only left it as a beta initially since I wasn't comfortable releasing it knowing that there were bugs? (FYI PR's are appreciated)

@jonathanong
Copy link

i mean strict semver without suffixes so i know if stuff is outdated.

i've been using next for a while and only hit a bug once, but then i realized it was because i set an exact version and it was fixed in future versions. i didn't know the version was outdated because npm outdated doesn't follow non-strict semvers. thus, i changed it to next instead of an exact version.

i much prefer if v5 was just published asap. i don't care if eslint 2 support comes in v5 or v6.

btw i'm using next w/ eslint@2 and i don't have any issues.

@hzoo
Copy link
Member Author

hzoo commented Feb 16, 2016

Ok I'l just do a v5 soon, and most likely we do a v6 with babel v6 and eslint v2 like most people suggested?

Ok 5.0.0 is out

@klimashkin
Copy link

So, does babel-eslint v5 support eslint2?

@hzoo
Copy link
Member Author

hzoo commented Feb 17, 2016

No as mentioned ^, it's just the beta version. https://github.com/babel/babel-eslint/releases/tag/v5.0.0

@albertogasparin
Copy link

+1 on v6 with babel v6 and eslint v2.
As of babel v5, either release a v5.1 with eslint v2 support (it is just a dep upgrade, if there are no breaking changes on your side you can push a minor) or rule that with babel v5 we get only eslint v1.
I think the latter is fair too.

gmaclennan added a commit to gmaclennan/babel-eslint that referenced this issue Feb 17, 2016
I gather from babel#254 that `babel-eslint` is not currently compatible with eslint@2.x, in which case the docs should be updated to lock in eslint@1.x
@colin-marshall
Copy link

I'm using gulp-eslint with babel-eslint as the parser. gulp-eslint currently uses eslint v2, while babel-eslint is still on eslint v1. If babel-eslint is set as the parser with gulp-eslint, which version of eslint is used when linting?

@hzoo
Copy link
Member Author

hzoo commented Feb 19, 2016

babel-eslint doesn't change the version of eslint - so it would be using eslint v2. It's about babel-eslint updating to account for changes in eslint 2 which could break

@colin-marshall
Copy link

@hzoo thanks for the answer. The setup I described is working fine from what I can tell, but maybe I just haven't thrown any code at it yet that would break.

@tleunen
Copy link

tleunen commented Feb 21, 2016

Any updates on the eslint v2 support? Is it in progress?

@hzoo
Copy link
Member Author

hzoo commented Feb 28, 2016

I gave it a shot: did what I could to make tests pass but there's definetely going to be issues https://github.com/babel/babel-eslint/pulls/264

@hzoo
Copy link
Member Author

hzoo commented Mar 3, 2016

Forgot to comment here but released a beta version that should support ESLint 2

https://github.com/babel/babel-eslint/releases/tag/v6.0.0-beta.1

npm install babel-eslint@6.0.0-beta.1 --save-dev
npm install babel-eslint@next --save-dev

// package.json
{
  "babel-eslint": "^6.0.0-beta.1", // ^ update if there's fixes
  "babel-eslint": "6.0.0-beta.1",
  "babel-eslint": "next",
}

@tleunen
Copy link

tleunen commented Mar 3, 2016

Thanks @hzoo, I tried it and I get a lot of no-use-before-define errors as soon as I have sth like this:

const { a, b, c, ...xyz } = az;

@hzoo
Copy link
Member Author

hzoo commented Mar 3, 2016

Yep thats #249

@hzoo hzoo closed this as completed Mar 14, 2016
@hzoo
Copy link
Member Author

hzoo commented Mar 14, 2016

Should of closed this before, but I guess I left this up since I made 6.x as a beta.

For ESLint 1: use babel-eslint@5.x.x, otherwise use babel-eslint@6.x.x for ESLint 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants