| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I hate to re-open the whole "OH NOES SHOULD WE ENABLE ES6-EVERYTHING OR NOT?!?!" question. But maybe it's easier to come to consensus if it's a "Eh, we've gotta upgrade to ESLint 2.0 sooner or later, and sooner is probably better, so..." To hopefully clarify a bit: ESLint 2 appears to remove options that allow enabling picking and choosing your ES6 features. You can't say "Arrow functions are OK, but NO SPREAD OPERATORS!!!!" Well, you can, but it probably involves writing a custom rule. (The exception is ES6 modules which are turned off unless you take an extra step to turn them on.) This was something that (I think) @targos @cjihrig warned was coming in some of the previous threads about whether we should continue to granularly manage ES6 features in the lint config (and, if so, whether it should be deny-all-with-exceptions or allow-all-with-disallowed-list). On the upside, ESLint 2 seems to have found some stuff missed by ESLint 1. And it has some features we might want. Interested parties can review new rules available at http://eslint.org/blog/2016/02/eslint-v2.0.0-released#new-rules. |
Sorry, something went wrong.
|
Don't we need to update the removed rules? |
Sorry, something went wrong.
|
Nevermind, I see you made that change in the seond commit. I'd suggest moving config changes to its own commit. |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
@silverwind I put the .eslintrc changes into their own commits (6e3f278 and af3a3c6). It had to be two commits rather than one. The first commit removes rules that will break when ESLint 2 is running. That commit happens before the commit that updates ESLint 1 to ESLint 2. After the update, another commit reinstates the old behavior using the new rules. Doing all the changes to .eslintrc in its own commit (without any simultaneous changes to tools/eslint) would mean that there would be a commit somewhere that would be a broken build. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Thanks! I'm fine with two commits there. I think we need ecmaVersion: 6 in parserOptions. As I understand it, env: es6 only gives us the globals. |
Sorry, something went wrong.
|
@silverwind According to the docs, specifying es6 as an env enables all ES6 features except modules. So I don't think we need to use parserOptions too (although I suppose it wouldn't cause problems either). The lint results seem to bear that out. |
Sorry, something went wrong.
|
Ah, your're right, the parser option is set by the env: |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
When I updated to v1, I used dmn to reduce the number of files. Could you do the same ? |
Sorry, something went wrong.
|
Can you please make sure that the tools: update ESLint to version 2.0 commit is only about the changes tools/eslint ? I see some in tools/doc and tools/eslint-rules. |
Sorry, something went wrong.
|
@targos wrote:
Ugh, yes, that was a mistake. I'll fix that. |
Sorry, something went wrong.
|
@targos wrote:
Oh, yes, definitely! I did not know about dmn. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
@targos The reworking of the commits and using dmn are all done now. Thanks! (The gist was really helpful, unsurprisingly.) |
Sorry, something went wrong.
Sorry, something went wrong.
|
Looks like eslint has updated to v2.1.0 already. Might want to bump it in this PR |
Sorry, something went wrong.
|
Rebased against master. Another CI: https://ci.nodejs.org/job/node-test-pull-request/1693/ |
Sorry, something went wrong.
|
Current status:
OK to land this on master now, @thealphanerd, or do you still have v4.x concerns? I'm happy to hold off if there are concerns, but I'd also really like to move forward if there aren't any. |
Sorry, something went wrong.
|
Lgtm!
|
Sorry, something went wrong.
|
|
Sorry, something went wrong.
|
LGTM (I knew you were waiting for me! 😣) |
Sorry, something went wrong.
ESLint 2.0 is coming. Some lint rules have been tightened. PR-URL: nodejs#5214
We are about to upgrade from ESlint 1 to ESLint 2. Remove lint rules that will not exist in ESLint 2.
Update ESLint to 2.1.0. ESLint has a number of potentially-useful new features but this change attempts to be minimal in its changes. However, some things could not be avoided reasonably. ESLint 2.1.0 found a few lint issues that ESLing 1.x missed with template strings that did not take advantage of any features of template strings, and `let` declarations where `const` sufficed. Additionally, ESLint 2.1.0 removes some granularity around enabling ES6 features. Some features (e.g., spread operator) that had been turned off in our configuration for ESLint 1.x are now permitted. PR-URL: nodejs#5214
Now that we are using ESLint 2, replace ESLint 1 rules with their ESLint 2 equivalents. PR-URL: nodejs#5214
|
OK, one last rebase against master and a CI run before landing. |
Sorry, something went wrong.
ESLint 2.1.0 is coming. Some lint rules have been tightened. PR-URL: nodejs#5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
We are about to upgrade from ESlint 1 to ESLint 2. Remove lint rules that will not exist in ESLint 2. PR-URL: nodejs#5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Update ESLint to 2.1.0. ESLint has a number of potentially-useful new features but this change attempts to be minimal in its changes. However, some things could not be avoided reasonably. ESLint 2.1.0 found a few lint issues that ESLing 1.x missed with template strings that did not take advantage of any features of template strings, and `let` declarations where `const` sufficed. Additionally, ESLint 2.1.0 removes some granularity around enabling ES6 features. Some features (e.g., spread operator) that had been turned off in our configuration for ESLint 1.x are now permitted. PR-URL: nodejs#5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Now that we are using ESLint 2, replace ESLint 1 rules with their ESLint 2 equivalents. PR-URL: nodejs#5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Sorry, something went wrong.
ESLint 2.1.0 is coming. Some lint rules have been tightened. PR-URL: #5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
We are about to upgrade from ESlint 1 to ESLint 2. Remove lint rules that will not exist in ESLint 2. PR-URL: #5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Update ESLint to 2.1.0. ESLint has a number of potentially-useful new features but this change attempts to be minimal in its changes. However, some things could not be avoided reasonably. ESLint 2.1.0 found a few lint issues that ESLing 1.x missed with template strings that did not take advantage of any features of template strings, and `let` declarations where `const` sufficed. Additionally, ESLint 2.1.0 removes some granularity around enabling ES6 features. Some features (e.g., spread operator) that had been turned off in our configuration for ESLint 1.x are now permitted. PR-URL: #5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Now that we are using ESLint 2, replace ESLint 1 rules with their ESLint 2 equivalents. PR-URL: #5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
|
@Trott I think this one may need to be manually backported... would you be up for it? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Update ESLint to 2.1.0. ESLint has a number of potentially-useful new
features but this change attempts to be minimal in its changes.
However, some things could not be avoided reasonably.
ESLint 2.1.0 found a few lint issues that ESLint 1.x missed, particularly
around template strings that did not take advantage of any features of
template strings, and let declarations where const sufficed.
Additionally, ESLint 2.1.0 removes some granularity around enabling ES6
features. Some features (e.g., spread operator) that had been turned off
in our configuration for ESLint 1.x are now permitted.