Skip to content

Commit

Permalink
feat: full reimplementation using (at)request/promise-core
Browse files Browse the repository at this point in the history
  • Loading branch information
analog-nico committed Jul 11, 2016
1 parent 56a6fa1 commit 1cc3202
Show file tree
Hide file tree
Showing 18 changed files with 422 additions and 1,808 deletions.
25 changes: 13 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
# EditorConfig is awesome: http://EditorConfig.org

root = true


[*]
charset = utf-8
end_of_line = lf

# Change these settings to your own preference
[*.js]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
[*.{json,xml}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
[*.{md,txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[*.json]
indent_size = 2
insert_final_newline = false
158 changes: 158 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"root": true,
"parser": "espree",
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script",
"ecmaFeatures": {}
},
"plugins": [],
"env": {
"node": true
},
"globals": {},
"rules": {

// Possible Errors (fully reviewed 2016-07-05)

"no-cond-assign": 2,
"no-console": 0,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": [2, { "allowEmptyCatch": false }],
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": [2, "all"],
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": [2, "functions"],
"no-invalid-regexp": 2,
"no-irregular-whitespace": [2, { "skipComments": false }],
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-prototype-builtins": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"no-unsafe-finally": 2,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,

// Best Practices

"accessor-pairs": 2,
"curly": [2, "multi-line"],
"dot-location": [2, "property"],
"eqeqeq": 2,
"no-caller": 2,
"no-empty-pattern": 0, // for ES6 destructuring
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-magic-numbers": 0,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": [2, "except-parens"],
"no-self-assign": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unmodified-loop-condition": 2,
"no-useless-call": 2,
"no-useless-escape": 2,
"no-with": 2,
"wrap-iife": [2, "inside"],
"yoda": 2,

// Strict Mode (fully reviewed 2016-07-05)

"strict": [2, "safe"],

// Variables (fully reviewed 2016-07-05)

"init-declarations": [2, "always"],
"no-catch-shadow": 0,
"no-delete-var": 2,
"no-label-var": 2,
"no-restricted-globals": 0,
"no-shadow": [2, { "builtinGlobals": false, "hoist": "all", "allow": [] }],
"no-shadow-restricted-names": 2,
"no-undef": [2, { "typeof": true }],
"no-undef-init": 2,
"no-undefined": 2,
"no-unused-vars": [2, { "vars": "local", "args": "none", "caughtErrors": "none" }],
"no-use-before-define": [2, { "functions": false, "classes": true }],

// Node.js and CommonJS (fully reviewed 2016-07-05)

"callback-return": 0,
"global-require": 0,
"handle-callback-err": [2, "^(err|error)$" ],
"no-mixed-requires": 0,
"no-new-require": 2,
"no-path-concat": 2,
"no-process-env": 2,
"no-process-exit": 2,
"no-restricted-modules": 0,
"no-sync": 2,

// Stylistic Issues

"block-spacing": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": [2, { "properties": "never" }],
"comma-dangle": [2, "never"],
"comma-spacing": 2,
"comma-style": 2,
"eol-last": 2,
"indent": [2, 4, { "SwitchCase": 1 }],
"jsx-quotes": 0,
"key-spacing": 2,
"keyword-spacing": 2,
"new-cap": 0,
"new-parens": 2,
"no-array-constructor": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": [2, { "max": 2, "maxBOF": 0, "maxEOF": 1 }],
"no-new-object": 2,
"no-plusplus": [2, { "allowForLoopAfterthoughts": false }],
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
"no-whitespace-before-property": 2,
"one-var": 0,
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
"padded-blocks": 0,
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"semi-spacing": 2,
"space-before-blocks": 2,
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-in-parens": 0,
"space-infix-ops": 0,
"space-unary-ops": 2,
"spaced-comment": 0

}
}
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.idea/
/coverage/
/node_modules/

.DS_Store
.idea/
coverage/
node_modules/
npm-debug.log
npm-debug.log
106 changes: 0 additions & 106 deletions .jshintrc

This file was deleted.

22 changes: 14 additions & 8 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
.idea/
coverage/
test/
.editorconfig
.jshintrc
.travis.yml
gulpfile.js
run-request-tests.md
/.idea/
/coverage/
/test/

/.editorconfig
/.eslintrc.json
/.gitignore
/.publishrc
/.travis.yml
/gulpfile.js
/run-request-tests.md

.DS_Store
npm-debug.log
13 changes: 13 additions & 0 deletions .publishrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"validations": {
"vulnerableDependencies": true,
"uncommittedChanges": true,
"untrackedFiles": true,
"sensitiveData": true,
"branch": "master",
"gitTag": true
},
"confirm": true,
"publishTag": "latest",
"prePublishScript": "npm run test-publish"
}
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ node_js:
- "iojs"
- "4"
- "6"

env:
- V_REQUEST=2.34.0
- V_REQUEST=latest

before_script:
- npm uninstall request
- npm install request@$V_REQUEST
Loading

1 comment on commit 1cc3202

@rozaimialli
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.