Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated eslint #1733

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }
],
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": ["off", { "allowTernary": true }],
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"no-console": "warn"
Expand Down
30,296 changes: 19,459 additions & 10,837 deletions backend/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
"@types/shelljs": "^0.8.15",
"@types/supertest": "^6.0.2",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"@vitest/coverage-v8": "^2.1.4",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/clients/cognito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function listUsers(query: string, exactMatch = false) {
try {
dnName = config.oauth.cognito.userIdAttribute
userPoolId = config.oauth.cognito.userPoolId
} catch (e) {
} catch (_e) {
throw ConfigurationError('Cannot find userIdAttribute in oauth configuration', { oauthConfiguration: config.oauth })
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/connectors/fileScanning/clamAv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ClamAvFileScanningConnector extends BaseFileScanningConnector {
try {
av = await new NodeClam().init({ clamdscan: config.avScanning.clamdscan })
log.info('Clam AV initialised.')
} catch (error) {
} catch (_error) {
log.warn(`Could not initialise Clam AV, retrying (attempt ${retryCount})...`)
this.init(++retryCount)
}
Expand Down
4 changes: 2 additions & 2 deletions backend/src/connectors/fileScanning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function runFileScanners(cache = true) {
const scanner = new ClamAvFileScanningConnector()
await scanner.init()
fileScanConnectors.push(scanner)
} catch (error) {
} catch (_error) {
throw ConfigurationError('Could not configure or initialise Clam AV')
}
break
Expand All @@ -33,7 +33,7 @@ export function runFileScanners(cache = true) {
const scanner = new ModelScanFileScanningConnector()
await scanner.init()
fileScanConnectors.push(scanner)
} catch (error) {
} catch (_error) {
throw ConfigurationError('Could not configure or initialise ModelScan')
}
break
Expand Down
2 changes: 1 addition & 1 deletion backend/src/connectors/fileScanning/modelScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ModelScanFileScanningConnector extends BaseFileScanningConnector {
try {
await getModelScanInfo()
log.info('ModelScan initialised.')
} catch (error) {
} catch (_error) {
log.warn(`Could not initialise ModelScan, retrying (attempt ${retryCount})...`)
this.init(++retryCount)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function up() {
if (collaborator.entity !== '') {
try {
await authentication.getUserInformation(collaborator.entity)
} catch (err) {
} catch (_err) {
invalidUsers.push(collaborator.entity)
}
}
Expand Down
1 change: 1 addition & 0 deletions backend/src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ if (!config.ui?.inference || config.ui.inference?.enabled) {
server.post('/api/v2/model/:modelId/inference', ...postInference)
server.put('/api/v2/model/:modelId/inference/:image/:tag', ...putInference)
}

// *server.get('/api/v2/model/:modelId/release/:semver/file/:fileCode/list', ...getModelFileList)
// *server.get('/api/v2/model/:modelId/release/:semver/file/:fileCode/raw', ...getModelFileRaw)

Expand Down
4 changes: 2 additions & 2 deletions backend/src/scripts/calculateLicenseInformation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import shelljs from 'shelljs'

import packageInfo from '../../package.json'
import packageLock from '../../package-lock.json'
import packageInfo from '../../package.json' with { type: 'json' }
import packageLock from '../../package-lock.json' with { type: 'json' }

const { exec } = shelljs

Expand Down
3 changes: 0 additions & 3 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ const backend = process.env.BACKEND_SERVICE ?? defaultBackend

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
instrumentationHook: true,
},
reactStrictMode: true,
output: 'standalone',
transpilePackages: ['nanoid', 'lodash-es'],
Expand Down
Loading