Permalink
Browse files

Update JSHint and clean up warnings

  • Loading branch information...
1 parent e0303cf commit d03a80d472ad5bb5d4d217ee411af0fcb0b68496 Loren Segal committed Oct 25, 2013
View
@@ -23,7 +23,7 @@
"maxparams": false,
"maxdepth": false,
"maxstatements": 40,
- "maxcomplexity": 5,
+ "maxcomplexity": 10,
"sub": true,
"indent": false
}
@@ -72,7 +72,6 @@ AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, {
* @see get
*/
refresh: function refresh(callback) {
- /*jshint maxcomplexity:10*/
if (!callback) callback = function(err) { if (err) throw err; };
if (process === undefined) {
View
@@ -14,14 +14,17 @@
*/
var AWS = require('./core');
-var Buffer = require('buffer').Buffer;
require('./sequential_executor');
require('./service_interface/json');
require('./service_interface/query');
require('./service_interface/rest');
require('./service_interface/rest_json');
require('./service_interface/rest_xml');
+/* jshint -W079 */
+var Buffer = require('buffer').Buffer;
+/* jshint +W079 */
+
/**
* The namespace used to register global event listeners for request building
* and sending.
View
@@ -14,8 +14,6 @@
*/
var AWS = require('./core');
-var Stream = require('stream').Stream;
-var Buffer = require('buffer').Buffer;
/**
* @api private
View
@@ -544,7 +544,6 @@ AWS.Request = inherit({
* @api private
*/
eventParameters: function eventParameters(eventName, response) {
- /*jshint maxcomplexity:8*/
switch (eventName) {
case 'validate':
case 'sign':
@@ -688,7 +687,6 @@ AWS.Response = inherit({
* @since v1.4.0
*/
nextPage: function nextPage(callback) {
- /*jshint maxcomplexity:10*/
var config;
var service = this.request.service;
var operation = this.request.operation;
@@ -732,7 +730,6 @@ AWS.Response = inherit({
* @api private
*/
cacheNextPageTokens: function cacheNextPageTokens() {
- /*jshint maxcomplexity:10*/
if (this.hasOwnProperty('nextPageTokens')) return this.nextPageTokens;
this.nextPageTokens = undefined;
View
@@ -66,7 +66,6 @@ AWS.Service = inherit({
},
getLatestServiceVersion: function getLatestServiceVersion(version) {
- /*jshint maxcomplexity:10*/
if (!this.constructor.services || this.constructor.services.length === 0) {
throw new Error('No services defined on ' +
this.constructor.serviceIdentifier);
@@ -155,7 +154,6 @@ AWS.Service = inherit({
},
serviceInterface: function serviceInterface() {
- /*jshint maxcomplexity:8*/
switch (this.api.format) {
case 'query': return AWS.EventListeners.Query;
case 'json': return AWS.EventListeners.Json;
@@ -53,7 +53,6 @@ AWS.ServiceInterface.RestJson = {
},
populateBody: function populateBody(req) {
- /*jshint maxcomplexity:10*/
var input = req.service.api.operations[req.operation].input;
var payload = input.payload;
var params = {};
@@ -73,7 +73,6 @@ AWS.ServiceInterface.RestXml = {
},
populateBody: function populateBody(req) {
- /*jshint maxcomplexity:10*/
var input = req.service.api.operations[req.operation].input;
var payload = input.payload;
var rules = {};
View
@@ -14,7 +14,10 @@
*/
var AWS = require('../core');
+
+/* jshint -W079 */
var Buffer = require('buffer').Buffer;
+/* jshint +W079 */
AWS.S3 = AWS.Service.defineService('s3', ['2006-03-01'], {
/**
@@ -26,7 +26,6 @@ AWS.Signers.RequestSigner = inherit({
});
AWS.Signers.RequestSigner.getVersion = function getVersion(version) {
- /*jshint maxcomplexity:8*/
switch (version) {
case 'v2': return AWS.Signers.V2;
case 'v3': return AWS.Signers.V3;
View
@@ -17,7 +17,10 @@
var AWS = require('./core');
var cryptoLib = require('crypto');
+
+/* jshint -W079 */
var Buffer = require('buffer').Buffer;
+/* jshint +W079 */
/**
* A set of utility methods for use with the AWS SDK.
@@ -142,7 +145,6 @@ AWS.util = {
string: {
byteLength: function byteLength(string) {
- /*jshint maxcomplexity:10*/
if (string === null || string === undefined) return 0;
if (typeof string === 'string') string = new Buffer(string);
View
@@ -17,7 +17,7 @@
"jasmine-node": "latest",
"semver": "latest",
"coffee-script": "latest",
- "jshint": "2.1.0",
+ "jshint": "latest",
"cucumber": "latest"
},
"dependencies": {

0 comments on commit d03a80d

Please sign in to comment.