Bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0 (#1311)

* Bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.61.0 to 6.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed lint errors

* ignore type error for calledWithMatch args

* disable eslint check

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
This commit is contained in:
dependabot[bot] 2023-07-11 13:56:55 +01:00 committed by GitHub
parent 917ecfc53f
commit b65c25ff6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 407 additions and 275 deletions

View File

@ -17,6 +17,12 @@ module.exports = {
'next/core-web-vitals',
],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
},
},
{
files: ['*.js'],
rules: {

View File

@ -21,7 +21,7 @@ export const ConnectionToggle: FC<Props> = (props) => {
setActive(connection.active);
}, [connection]);
const askForConfirmation = (e: React.ChangeEvent<HTMLInputElement>) => {
const askForConfirmation = () => {
setModalVisible(true);
};

View File

@ -77,7 +77,7 @@ function BlocklyComponent(props) {
return;
}
const { initialXml, children, ...rest } = props;
const { initialXml, ...rest } = props;
primaryWorkspace.current = Blockly.inject(blocklyDiv.current as any, {
toolbox: toolbox.current,
readOnly: false,

View File

@ -22,7 +22,7 @@ export default function Adapter() {
async createUser(user) {
return user;
},
async getUser(id) {
async getUser() {
return;
},
async getUserByEmail(email) {
@ -36,7 +36,7 @@ export default function Adapter() {
} as AdapterUser)
: null;
},
async getUserByAccount({ providerAccountId, provider }) {
async getUserByAccount() {
return;
},
async updateUser(user: AdapterUser) {
@ -53,26 +53,26 @@ export default function Adapter() {
} as AdapterUser;
},
// will be required in a future release, but are not yet invoked
async deleteUser(userId) {
async deleteUser() {
return;
},
async linkAccount(account) {
async linkAccount() {
return;
},
// will be required in a future release, but are not yet invoked
async unlinkAccount({ providerAccountId, provider }) {
async unlinkAccount() {
return;
},
async createSession({ sessionToken, userId, expires }) {
async createSession() {
return;
},
async getSessionAndUser(sessionToken) {
async getSessionAndUser() {
return;
},
async updateSession({ sessionToken }) {
async updateSession() {
return;
},
async deleteSession(sessionToken) {
async deleteSession() {
return;
},
async createVerificationToken(data: VerificationToken) {

36
npm/package-lock.json generated
View File

@ -1321,7 +1321,7 @@
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"devOptional": true,
"dev": true,
"dependencies": {
"@jridgewell/trace-mapping": "0.3.9"
},
@ -1333,7 +1333,7 @@
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"devOptional": true,
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@ -1428,7 +1428,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
"devOptional": true,
"dev": true,
"engines": {
"node": ">=6.0.0"
}
@ -1446,7 +1446,7 @@
"version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
"devOptional": true
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.18",
@ -2323,25 +2323,25 @@
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"devOptional": true
"dev": true
},
"node_modules/@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"devOptional": true
"dev": true
},
"node_modules/@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"devOptional": true
"dev": true
},
"node_modules/@tsconfig/node16": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
"devOptional": true
"dev": true
},
"node_modules/@types/lodash": {
"version": "4.14.195",
@ -2409,7 +2409,7 @@
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz",
"integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==",
"devOptional": true,
"dev": true,
"bin": {
"acorn": "bin/acorn"
},
@ -2421,7 +2421,7 @@
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"devOptional": true,
"dev": true,
"engines": {
"node": ">=0.4.0"
}
@ -2518,7 +2518,7 @@
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"devOptional": true
"dev": true
},
"node_modules/argparse": {
"version": "1.0.10",
@ -3053,7 +3053,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"devOptional": true
"dev": true
},
"node_modules/cross-env": {
"version": "7.0.3",
@ -4719,7 +4719,7 @@
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"devOptional": true
"dev": true
},
"node_modules/memory-pager": {
"version": "1.5.0",
@ -8349,7 +8349,7 @@
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"devOptional": true,
"dev": true,
"dependencies": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
@ -8392,7 +8392,7 @@
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"devOptional": true,
"dev": true,
"engines": {
"node": ">=0.3.1"
}
@ -8678,7 +8678,7 @@
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"devOptional": true,
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -8762,7 +8762,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"devOptional": true
"dev": true
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
@ -9043,7 +9043,7 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"devOptional": true,
"dev": true,
"engines": {
"node": ">=6"
}

View File

@ -188,7 +188,6 @@ const saml = {
description,
forceAuthn = false,
metadataUrl,
identifierFormat,
...clientInfo
} = body;

View File

@ -30,7 +30,6 @@ import {
extractOIDCUserProfile,
getScopeValues,
getEncodedTenantProduct,
transformConnection,
isConnectionActive,
} from './utils';

View File

@ -51,6 +51,7 @@ class Mem implements DatabaseDriver {
return null;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async getAll(namespace: string, pageOffset?: number, pageLimit?: number, _?: string): Promise<Records> {
const offsetAndLimitValueCheck = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);
const returnValue: string[] = [];
@ -92,6 +93,7 @@ class Mem implements DatabaseDriver {
idx: Index,
pageOffset?: number,
pageLimit?: number,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_?: string
): Promise<Records> {
const offsetAndLimitValueCheck = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);

View File

@ -49,6 +49,7 @@ class Mongo implements DatabaseDriver {
return null;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async getAll(namespace: string, pageOffset?: number, pageLimit?: number, _?: string): Promise<Records> {
const _namespaceMatch = new RegExp(`^${namespace}:.*`);
const docs = await this.collection
@ -66,6 +67,7 @@ class Mongo implements DatabaseDriver {
idx: Index,
offset?: number,
limit?: number,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_?: string
): Promise<Records> {
const docs =

View File

@ -36,6 +36,7 @@ class Redis implements DatabaseDriver {
return null;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async getAll(namespace: string, pageOffset?: number, pageLimit?: number, _?: string): Promise<Records> {
const offsetAndLimitValueCheck = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);
let take = Number(offsetAndLimitValueCheck ? this.options.pageLimit : pageLimit);
@ -44,7 +45,7 @@ class Redis implements DatabaseDriver {
const keyArray: string[] = [];
let count = 0;
take += skip;
for await (const { score, value } of this.client.zScanIterator(
for await (const { value } of this.client.zScanIterator(
dbutils.keyFromParts(dbutils.createdAtPrefix, namespace),
Math.min(take, 1000)
)) {
@ -74,6 +75,7 @@ class Redis implements DatabaseDriver {
idx: Index,
pageOffset?: number,
pageLimit?: number,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_?: string
): Promise<Records> {
const offsetAndLimitValueCheck = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);
@ -86,7 +88,7 @@ class Redis implements DatabaseDriver {
const idxKey = dbutils.keyForIndex(namespace, idx);
const dbKeys = await this.client.sMembers(dbutils.keyFromParts(dbutils.indexPrefix, idxKey));
if (!offsetAndLimitValueCheck) {
for await (const { _, value } of this.client.zScanIterator(
for await (const { value } of this.client.zScanIterator(
dbutils.keyFromParts(dbutils.createdAtPrefix, namespace),
count + 1
)) {

View File

@ -127,6 +127,7 @@ class Sql implements DatabaseDriver {
return null;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async getAll(namespace: string, pageOffset?: number, pageLimit?: number, _?: string): Promise<Records> {
const skipOffsetAndLimitValue = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);
const res = await this.storeRepository.find({
@ -146,6 +147,7 @@ class Sql implements DatabaseDriver {
idx: Index,
pageOffset?: number,
pageLimit?: number,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_?: string
): Promise<Records> {
const skipOffsetAndLimitValue = !dbutils.isNumeric(pageOffset) && !dbutils.isNumeric(pageLimit);

View File

@ -1,5 +1,3 @@
import _ from 'lodash';
import type {
Directory,
IGroups,

View File

@ -1,5 +1,3 @@
import _ from 'lodash';
import type {
Directory,
User,

View File

@ -187,7 +187,7 @@ tap.test('directories.', async (t) => {
});
t.test('get a directory by tenant and product', async (t) => {
const { data: directoriesFetched, error } = await directorySync.directories.getByTenantAndProduct(
const { data: directoriesFetched } = await directorySync.directories.getByTenantAndProduct(
tenant,
product
);

View File

@ -3,7 +3,7 @@ import nock from 'nock';
import type { DirectorySyncEvent } from '@boxyhq/saml-jackson';
import { jacksonOptions } from '../utils';
import { IDirectorySyncController, DirectoryType, Directory } from '../../src/typings';
import { IDirectorySyncController, DirectoryType } from '../../src/typings';
let directorySyncController: IDirectorySyncController;

View File

@ -111,7 +111,7 @@ tap.test('LogoutController -> createRequest', async (t) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const stubRandomBytes = sinon.stub(crypto, 'randomBytes').returns(sessionId);
sinon.stub(crypto, 'randomBytes').returns(sessionId);
await logoutController.createRequest({
...body,

View File

@ -149,7 +149,7 @@ tap.test('[OIDCProvider]', async (t) => {
family_name: 'samuel',
}),
};
const fakeCb = sinon.fake(async (..._args) => TOKEN_SET);
const fakeCb = sinon.fake(async () => TOKEN_SET);
function FakeOidcClient(this: any) {
this.callback = fakeCb;
this.userinfo = async () => ({
@ -166,7 +166,7 @@ tap.test('[OIDCProvider]', async (t) => {
() =>
({
Client: FakeOidcClient,
} as any)
}) as any
);
const { redirect_url } = await oauthController.oidcAuthzResponse({
...oidc_response,
@ -174,6 +174,8 @@ tap.test('[OIDCProvider]', async (t) => {
});
t.ok(
fakeCb.calledWithMatch(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
jacksonOptions.externalUrl + jacksonOptions.oidcPath,
{ code: oidc_response.code },
{ code_verifier: context.codeVerifier }

View File

@ -6,7 +6,6 @@ import * as dbutils from '../../src/db/utils';
import controllers from '../../src/index';
import loadConnection from '../../src/loadConnection';
import {
IAdminController,
IConnectionAPIController,
SAMLSSOConnection,
SAMLSSOConnectionWithEncodedMetadata,

583
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -77,8 +77,8 @@
"@types/micromatch": "4.0.2",
"@types/node": "20.4.1",
"@types/react": "18.2.14",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.61.0",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"autoprefixer": "10.4.14",
"cross-env": "7.0.3",
"env-cmd": "10.1.0",