Skip to content

Commit 9af62ba

Browse files
author
Ammar Dodin
committed
😒 fix linting issues
1 parent 040e479 commit 9af62ba

File tree

10 files changed

+21
-17
lines changed

10 files changed

+21
-17
lines changed

examples/.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
"require-jsdoc": "off",
77
"valid-jsdoc": "off",
88
"no-process-exit": "off",
9-
"prefer-const": "off"
9+
"prefer-const": "off",
10+
"no-var": "off"
1011
}
1112
};

examples/conversation_tone_analyzer_integration/tone_detection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = {
5454
*/
5555
function invokeToneAsync(conversationPayload, tone_analyzer) {
5656
return new Promise(function(resolve, reject) {
57-
tone_analyzer.tone({ text: conversationPayload.input.text }, (error, data) => {
57+
tone_analyzer.tone({ text: conversationPayload.input.text }, function(error, data) {
5858
if (error) {
5959
reject(error);
6060
} else {

test/integration/test.tone_analyzer.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ describe('tone_analyzer_integration', function() {
3535
it('failing tone()', function(done) {
3636
// this is a failing test
3737
const mobydick = fs.readFileSync(path.join(__dirname, '../resources/mobydick.txt'), 'utf8');
38-
tone_analyzer.tone({ tone_input: mobydick, content_type: 'invalid content type' }, (err, res) => {
39-
assert(err);
40-
assert(err['x-global-transaction-id']);
41-
assert(typeof err['x-global-transaction-id'] === 'string');
42-
});
38+
tone_analyzer.tone(
39+
{ tone_input: mobydick, content_type: 'invalid content type' },
40+
(err, res) => {
41+
assert(err);
42+
assert(err['x-global-transaction-id']);
43+
assert(typeof err['x-global-transaction-id'] === 'string');
44+
}
45+
);
4346
done();
4447
});
4548

test/unit/test.adapter.tone_analyzer.v3.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ describe('tone_analyzer.v3', function() {
141141
});
142142

143143
// Tone Chat Endpoint API - test for valid payload
144-
it('tone-chat API endpoint should generate a valid payload with utterances json payload', function(
145-
done
146-
) {
144+
it('tone-chat API endpoint should generate a valid payload with utterances json payload', function(done) {
147145
const tone_chat_path = '/v3/tone_chat';
148146
const tone_chat_request = {
149147
utterances: [

test/unit/test.contentType.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const contentType = require('../../lib/content-type');
24
const assert = require('assert');
35
const fs = require('fs');

test/unit/test.personality_insights.v3.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const assert = require('assert');
44
const watson = require('../../index');
55
const nock = require('nock');
6-
const extend = require('extend');
76

87
describe('personality_insights_v3', function() {
98
const noop = function() {};

test/unit/test.requestWrapper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const createRequest = require('../../lib/requestwrapper').createRequest;
24
const formatError = require('../../lib/requestwrapper').formatErrorIfExists;
35
const assert = require('assert');

test/unit/test.toPromise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
'use strict';
2+
13
const toPromise = require('../../lib/to-promise');
2-
const stream = require('stream');
34
const fs = require('fs');
45
const assert = require('assert');
56
const path = require('path');
@@ -12,7 +13,6 @@ describe('toPromise()', () => {
1213
assert(typeof res === 'string');
1314
})
1415
.catch(err => {
15-
console.log(err);
1616
assert(false);
1717
});
1818
});

test/unit/test.tone_analyzer.v3.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ describe('tone_analyzer.v3', function() {
137137
});
138138

139139
// Tone Chat Endpoint API - test for valid payload
140-
it('tone-chat API endpoint should generate a valid payload with utterances json payload', function(
141-
done
142-
) {
140+
it('tone-chat API endpoint should generate a valid payload with utterances json payload', function(done) {
143141
const tone_chat_path = '/v3/tone_chat';
144142
const tone_chat_request = {
145143
utterances: [

test/unit/test.visual_recognition.v3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ describe('visual_recognition', function() {
566566
'getImageData',
567567
'deleteImageData',
568568
'findSimilar'
569-
].forEach(function(method) {
569+
];
570+
deprecatedMethods.forEach(function(method) {
570571
it(`${method} should print a warning message`, function() {
571572
visual_recognition[method]({}, noop);
572573
assert(spy.calledOnce);

0 commit comments

Comments
 (0)