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
Merged

Update eslint #1494

merged 1 commit into from Mar 21, 2015

Conversation

froatsnook
Copy link
Contributor

@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
Copy link
Member

simov 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
Copy link
Contributor Author

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

@FredKSchott
Copy link
Contributor

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

@simov
Copy link
Member

simov 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
Copy link
Contributor Author

@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
@simov
Copy link
Member

simov commented Mar 21, 2015

Thanks @froatsnook 👍

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

3 participants