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

Update eslint #1494

Merged
merged 1 commit into from Mar 21, 2015

Conversation

Projects
None yet
3 participants
@froatsnook
Copy link
Contributor

commented Mar 19, 2015

@simov I saw you mention updating eslint and decided to have a go at it.

In general I tried to avoid rocking the boat. There are some new options which raise some issues since the code style was not consistent. I just disabled these options in .eslintrc for now.

no-shadow
Sounds like a good idea to me. There are 21 no-shadow issues in the code right now.

key-spacing
At the moment the codebase uses a mixes of the two styles, which means eslint can't help us.

no-multi-spaces
There are a lot of inconsistencies in the code with this one:

// test-baseUrl.js
var http = require('http')
  , request = require('../index')
  , tape = require('tape')
  , url = require('url')

vs

// test-agentOptions.js
var request = require('../index')
  , http    = require('http')
  , server  = require('./server')
  , tape    = require('tape')

as well as:

// lib/getProxyFromURI.js:67
    return process.env.HTTPS_PROXY ||
           process.env.https_proxy ||
           process.env.HTTP_PROXY  ||
           process.env.http_proxy  || null
@simov

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

Thanks, @froatsnook that might come in handy. I like that approach of introducing it with minimum changes to the code. Also only 3 additional disabled options is not that bad I think. What I wanted to add was "indent": [2, 2] for the 2 space indentation, because it is disabled by default.

@froatsnook

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2015

@simov Good call. That found a few indentation errors.

@FredKSchott

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2015

+10000 So glad we can finally update out of node v0.8 purgatory

@simov

This comment has been minimized.

Copy link
Member

commented Mar 20, 2015

This PR is looking good to me, we can think about enabling some of the eslint options later. The only thing that I'll suggest is to rebase all commits into one, as they are too small to have any meaning on its own.

@froatsnook froatsnook force-pushed the froatsnook:update-eslint branch from bb5b851 to b1dec4d Mar 20, 2015

@froatsnook

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2015

@simov OK, done!

simov added a commit that referenced this pull request Mar 21, 2015

@simov simov merged commit 5d4c83d into request:master Mar 21, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@simov

This comment has been minimized.

Copy link
Member

commented Mar 21, 2015

Thanks @froatsnook 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.