Skip to content

Commit

Permalink
fix: fix eslint issues with dependencies
Browse files Browse the repository at this point in the history
* This commit also is adding eslint comments to ignore (for now)
some minor eslint issues that can be fixed later.
We need to unblock others pull requests first as priority and
to make things simple.
  • Loading branch information
helio-frota committed Aug 24, 2022
1 parent 68a4d36 commit 99a577b
Show file tree
Hide file tree
Showing 7 changed files with 2,402 additions and 2,384 deletions.
1 change: 1 addition & 0 deletions .github/workflows/nodejs-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm
- run: npm ci
- run: npm test
- run: npx @pkgjs/support validate
Expand Down
4,762 changes: 2,389 additions & 2,373 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@
"devDependencies": {
"coveralls": "~3.1.1",
"documentation": "^13.2.5",
"eslint": "^8.6.0",
"eslint-config-semistandard": "^16.0.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "~2.25.2",
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-promise": "~6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint": "^8.22.0",
"eslint-config-semistandard": "^17.0.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.5",
"eslint-plugin-promise": "^6.0.0",
"husky": "^7.0.4",
"nock": "^12.0.2",
"nyc": "~15.1.0",
Expand Down
3 changes: 1 addition & 2 deletions test/authorization-server-request-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* eslint standard/no-callback-literal: "off" */

const test = require('tape');
const proxyquire = require('proxyquire');
const BASE_URL = 'http://some.cluster.com:6443/';
Expand Down Expand Up @@ -129,6 +127,7 @@ test('authorization server request with error', (t) => {
const authorizationServerRequest = proxyquire('../lib/authorization-server-request', {
request: (requestObject, cb) => {
t.equal(requestObject.strictSSL, false, 'should be false');
// eslint-disable-next-line n/no-callback-literal
return cb({
message: 'message',
errorCode: 'code'
Expand Down
4 changes: 2 additions & 2 deletions test/basic-auth-request-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* eslint standard/no-callback-literal: "off" */

const test = require('tape');
const proxyquire = require('proxyquire');
const BASE_URL = 'http://some.cluster.com:6443/';
Expand Down Expand Up @@ -133,6 +131,7 @@ test('basic auth request with request error', (t) => {
}
},
request: (requestObject, cb) => {
// eslint-disable-next-line n/no-callback-literal
return cb({ message: 'Error' }, {});
}
});
Expand Down Expand Up @@ -255,6 +254,7 @@ test('get user from token with 401 status code', (t) => {
test('get user from token with request error', (t) => {
const basicAuthRequest = proxyquire('../lib/basic-auth-request', {
request: (requestObject, cb) => {
// eslint-disable-next-line n/no-callback-literal
return cb({ message: 'Error' }, {});
}
});
Expand Down
1 change: 1 addition & 0 deletions test/binary-build-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test('instantiateBinary - buildconfig', async (t) => {
.post(`/apis/build.openshift.io/v1/namespaces/for-node-client-testing/buildconfigs/${buildConfigName}/instantiatebinary`)
.reply(201, { kind: 'BinaryBuildRequest' });

// eslint-disable-next-line n/no-path-concat
const binaryResponse = await client.apis.build.v1.ns(namespace).buildconfigs(buildConfigName).instantiatebinary.post({ body: fs.createReadStream(`${__dirname}/test-config`), json: false });
const response = JSON.parse(binaryResponse.body);

Expand Down
2 changes: 2 additions & 0 deletions test/openshift-client-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ test('test different config - user defined - as KubeConfig', async (t) => {
test('test different config - different location as a string', async (t) => {
const openshiftRestClient = require('../');

// eslint-disable-next-line n/no-path-concat
const configLocation = `${__dirname}/test-config`;
const settings = {
config: configLocation
Expand All @@ -272,6 +273,7 @@ test('test different config - user defined - as Regular Object', async (t) => {
test('test different config - different location as a string', async (t) => {
const openshiftRestClient = require('../');

// eslint-disable-next-line n/no-path-concat
const configLocation = `${__dirname}/test-config`;
const settings = {
config: configLocation
Expand Down

0 comments on commit 99a577b

Please sign in to comment.