Skip to content

Commit 5e3400b

Browse files
committed
Move to a modern testing infrastructure
Use Jest as test framework, and restructured ESLint config files so it applies to each directory separately.
1 parent c2a1bcf commit 5e3400b

18 files changed

+614
-704
lines changed

.eslintrc-node.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

.eslintrc.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
'env': {
3+
'browser': false,
4+
'es6': true,
5+
'node': true
6+
},
7+
'extends': [
8+
'eslint:recommended',
9+
'plugin:node/recommended',
10+
'standard'
11+
],
12+
'plugins': [
13+
'node'
14+
],
15+
'rules': {
16+
// Override some of standard js rules
17+
'semi': [ 'error', 'always' ],
18+
'comma-dangle': [ 'error', 'only-multiline' ],
19+
'camelcase': 'off',
20+
'no-var': 'error',
21+
'prefer-const': 'error',
22+
'arrow-parens': [ 'error', 'as-needed' ],
23+
'standard/array-bracket-even-spacing': 'off',
24+
'array-bracket-spacing': [ 'error', 'always', { 'objectsInArrays': false }],
25+
'object-curly-spacing': [ 'error', 'always' ],
26+
27+
// Override some eslint base rules because we're using node.
28+
'no-console': 'off',
29+
}
30+
};

api/hosts-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ credentialsAPI.delete({
271271
return;
272272
}
273273

274-
hosts.resetOAuth2ClientSecret(host, (error) => {
274+
hosts.resetOAuth2ClientSecret(host, error => {
275275
if (error) {
276276
response.statusCode = 500; // Internal Server Error
277277
response.json({ error: 'Could not reset host credentials' }, null, 2);

0 commit comments

Comments
 (0)