Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Jun 21, 2024
1 parent 475f9ea commit 7d63979
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
extends: ['airbnb-base', 'prettier'],
rules: {
'import/extensions': "always", // Better for native ES Module usage
'import/extensions': 0,
'no-console': 0, // We can remove this later
'no-underscore-dangle': 0,
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ typings/
# Yarn lock file
yarn.lock


# Workspace files
*.code-workspace
.*.swp

# dotenv environment variables file
.env

Expand Down
28 changes: 14 additions & 14 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class DICOMwebClient {
} else if (request.responseType === 'arraybuffer') {
resolve([request.response]);
} else {
resolve(request.response);
resolve(request.response);
}
} else if (request.status === 202) {
if (this.verbose) {
Expand Down Expand Up @@ -284,7 +284,7 @@ class DICOMwebClient {
}

if (requestHooks && areValidRequestHooks(requestHooks)) {
const combinedHeaders = Object.assign({}, headers, this.headers);
const combinedHeaders = { ...headers, ...this.headers};
const metadata = { method, url, headers: combinedHeaders };
const pipeRequestHooks = functions => args =>
functions.reduce((props, fn) => fn(props, metadata), args);
Expand Down Expand Up @@ -335,7 +335,7 @@ class DICOMwebClient {
* @return {*}
* @private
*/
_httpGetApplicationJson(url, params = {}, progressCallback, withCredentials) {
_httpGetApplicationJson(url, params = {}, progressCallback=null, withCredentials=false) {
let urlWithQueryParams = url;

if (typeof params === 'object') {
Expand Down Expand Up @@ -364,7 +364,7 @@ class DICOMwebClient {
* @return {*}
* @private
*/
_httpGetApplicationPdf(url, params = {}, progressCallback, withCredentials) {
_httpGetApplicationPdf(url, params = {}, progressCallback = null, withCredentials = false) {
let urlWithQueryParams = url;

if (typeof params === 'object') {
Expand Down Expand Up @@ -398,8 +398,8 @@ class DICOMwebClient {
url,
mediaTypes,
params = {},
progressCallback,
withCredentials,
progressCallback = null,
withCredentials = false,
) {
let urlWithQueryParams = url;

Expand Down Expand Up @@ -448,8 +448,8 @@ class DICOMwebClient {
url,
mediaTypes,
params = {},
progressCallback,
withCredentials,
progressCallback = null,
withCredentials = false,
) {
let urlWithQueryParams = url;

Expand Down Expand Up @@ -498,8 +498,8 @@ class DICOMwebClient {
url,
mediaTypes,
params = {},
progressCallback,
withCredentials,
progressCallback = null,
withCredentials = false,
) {
let urlWithQueryParams = url;

Expand Down Expand Up @@ -577,8 +577,8 @@ class DICOMwebClient {
byteRange,
params,
rendered = false,
progressCallback,
withCredentials,
progressCallback = null,
withCredentials = false,
) {
const headers = {};
let supportedMediaTypes;
Expand Down Expand Up @@ -636,8 +636,8 @@ class DICOMwebClient {
byteRange,
params,
rendered = false,
progressCallback,
withCredentials,
progressCallback = null,
withCredentials = false,
) {
const headers = {};
let supportedMediaTypes;
Expand Down

0 comments on commit 7d63979

Please sign in to comment.