Skip to content

Commit 004f10d

Browse files
author
Ruslan Tereshchenko
committed
update lint scripts and fix linting errors
1 parent 0a5c986 commit 004f10d

9 files changed

+15
-22
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"main": "lib/index.js",
2020
"repository": "github:signnow/SignNowNodeSDK",
2121
"scripts": {
22-
"lint": "./node_modules/.bin/eslint **/*.js",
23-
"lint:fix": "./node_modules/.bin/eslint **/*.js --fix",
22+
"lint": "./node_modules/.bin/eslint '**/*.js'",
23+
"lint:fix": "./node_modules/.bin/eslint '**/*.js' --fix",
2424
"docs": "./node_modules/.bin/esdoc",
2525
"prepublishOnly": "npm install eslint@6.0.1 && npm run lint"
2626
},

samples/applets/create-document-group.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const [
1111
clientSecret,
1212
token,
1313
group_name,
14-
...document_ids,
14+
...document_ids
1515
] = process.argv.slice(2);
1616

1717
const api = require('../../lib')({

samples/applets/create-signing-link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ getAccessToken({
4040
} else {
4141
console.log(createLinkRes);
4242
}
43-
})
43+
});
4444
}
4545
});

samples/applets/view-document.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const [
1414
username,
1515
password,
1616
filepath = './samples/files/pdf-sample.pdf',
17-
fieldsStringified
17+
fieldsStringified,
1818
] = process.argv.slice(2);
1919

2020
const api = require('../../lib')({
@@ -28,7 +28,7 @@ const {
2828
create: uploadDocument,
2929
view: viewDocument,
3030
update: addFields,
31-
}
31+
},
3232
} = api;
3333

3434
getAccessToken({
@@ -43,11 +43,11 @@ getAccessToken({
4343
uploadDocument({
4444
filepath,
4545
token,
46-
}, (viewErr, viewRes) => {
47-
if (viewErr) {
48-
console.error(viewErr);
46+
}, (uploadErr, uploadRes) => {
47+
if (uploadErr) {
48+
console.error(uploadErr);
4949
} else {
50-
const { id } = viewRes;
50+
const { id } = uploadRes;
5151

5252
if (fieldsStringified) {
5353
const client_timestamp = Math.floor(Date.now() / 1000);

samples/snippets/requestPayment.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ const handleError = err => {
8080
};
8181

8282
sendInviteWithPaymentRequest({
83-
data: {
84-
...fieldInviteWithPaymentRequest,
85-
},
83+
data: { ...fieldInviteWithPaymentRequest },
8684
id,
8785
token,
8886
}, (err, res) => {

samples/snippets/sendDocumentSignatureInviteWithOneRole.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ const handleError = err => {
6565
};
6666

6767
sendInvite({
68-
data: {
69-
...fieldInvite,
70-
},
68+
data: { ...fieldInvite },
7169
id,
7270
token,
7371
}, (err, res) => {

samples/snippets/sendTemplateSignatureInviteWithMultipleRole.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ const handleError = err => {
7474
};
7575

7676
sendInvite({
77-
data: {
78-
...fieldInvite,
79-
},
77+
data: { ...fieldInvite },
8078
id,
8179
token,
8280
}, (err, res) => {

samples/snippets/sendTemplateSignatureInviteWithOneRole copy.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ const handleError = err => {
6363
};
6464

6565
sendInvite({
66-
data: {
67-
...fieldInvite,
68-
},
66+
data: { ...fieldInvite },
6967
id,
7068
token,
7169
}, (err, res) => {

0 commit comments

Comments
 (0)