Skip to content

Commit cb1604c

Browse files
jstewmonAllanZhengYP
authored andcommitted
fix: update eslint, enforce semi, apply to test dir (#2336)
1 parent fd8fc03 commit cb1604c

File tree

135 files changed

+1608
-1599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1608
-1599
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/*
2+
test/browser/**/*

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
"rules": {
1111
"quotes": [2, "single"],
1212
"strict": 0,
13+
"eol-last": ["error", "always"],
1314
"curly": 0,
1415
"no-empty": 0,
1516
"no-underscore-dangle": 0,
1617
"new-cap": 0,
1718
"dot-notation": 0,
1819
"no-use-before-define": 0,
19-
"space-after-keywords": [2, "always"],
20+
"semi": [2, "always"],
21+
"keyword-spacing": [2, {"before": true, "after": true}],
2022
"space-before-blocks": [2, "always"],
2123
"no-trailing-spaces": 2,
2224
"space-unary-ops": 0

dist-tools/client-creator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ClientCreator.prototype.generateClientFileSource = function generateClientFileSo
105105
}
106106
code += 'Object.defineProperty(apiLoader.services[\'' + serviceName +'\'], \'' + version + '\', {\n';
107107
code += tab + 'get: function get() {\n';
108-
code += tab + tab + 'var model = require(\'../apis/' + versionInfo.api + '.json\');\n'
108+
code += tab + tab + 'var model = require(\'../apis/' + versionInfo.api + '.json\');\n';
109109
if (versionInfo.hasOwnProperty('paginators')) {
110110
code += tab + tab + 'model.paginators = require(\'../apis/' + versionInfo.paginators + '.json\').pagination;\n';
111111
}
@@ -125,7 +125,7 @@ ClientCreator.prototype.generateClientFileSource = function generateClientFileSo
125125
code: code,
126126
path: path.join(clientFolderPath, serviceName + '.js'),
127127
service: serviceName,
128-
}
128+
};
129129
};
130130

131131
ClientCreator.prototype.tabs = function tabs(count) {
@@ -134,7 +134,7 @@ ClientCreator.prototype.tabs = function tabs(count) {
134134
tab += ' ';
135135
}
136136
return tab;
137-
}
137+
};
138138

139139
ClientCreator.prototype.generateDefinePropertySource = function generateDefinePropertySource(objName, serviceName, className) {
140140
var tabs = this.tabs;
@@ -211,4 +211,4 @@ ClientCreator.prototype.writeClientServices = function writeClientServices() {
211211
fs.writeFileSync(browserClientInfo.path, browserClientInfo.code);
212212
};
213213

214-
module.exports = ClientCreator;
214+
module.exports = ClientCreator;

dist-tools/create-all-services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ var ClientCreator = require('./client-creator');
33
var cc = new ClientCreator();
44

55
cc.writeClientServices();
6-
console.log('Finished updating services.');
6+
console.log('Finished updating services.');

dist-tools/service-collector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,4 @@ function ServiceCollector(services) {
165165
return serviceCode;
166166
}
167167

168-
module.exports = ServiceCollector;
168+
module.exports = ServiceCollector;

dist-tools/webpack.config.rn-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ module.exports = {
2929
}
3030
]
3131
}
32-
}
32+
};

dist-tools/webpack.config.rn-dep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ module.exports = {
2828
}
2929
]
3030
}
31-
}
31+
};

dist-tools/webpack.config.rn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ module.exports = {
3131
}
3232
]
3333
}
34-
}
34+
};

lib/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ if (typeof self !== 'undefined') self.AWS = AWS;
1616
* DO NOT REMOVE
1717
* browser builder will strip out this line if services are supplied on the command line.
1818
*/
19-
require('../clients/browser_default');
19+
require('../clients/browser_default');

lib/browserCryptoLib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ module.exports = exports = {
3434
createSign: function() {
3535
throw new Error('createSign is not implemented in the browser');
3636
}
37-
}
37+
};

0 commit comments

Comments
 (0)