Skip to content

Commit

Permalink
updated eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
ARADDCC002 committed Jan 20, 2025
1 parent 0b8a744 commit 42fd363
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
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
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

0 comments on commit 42fd363

Please sign in to comment.