lint: Switch to tseslint.configs.strict.rules

This commit is contained in:
David Ernst
2025-04-30 03:40:00 -07:00
parent 33392284c1
commit 4ef9ba3368
3 changed files with 3 additions and 2 deletions

View File

@@ -50,8 +50,7 @@ module.exports = [
},
plugins: { '@typescript-eslint': tseslint },
rules: {
...tseslint.configs.recommended.rules,
'@typescript-eslint/no-non-null-assertion': 'error',
...tseslint.configs.strict.rules,
},
}),
]

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-invalid-void-type -- we are using it as return types (nested), so it's ok */
import jwt from 'jsonwebtoken'
import { NextApiRequest, NextApiResponse } from 'next'

View File

@@ -40,6 +40,7 @@ function reducer(prev: State, payload: Map) {
Object.keys(newState.plaintext).forEach((key) => {
if (newState.plaintext[key] == '') {
Object.keys(initState).forEach((group) => {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete -- don't encrypt empty strings
delete (newState as never)[group][key]
})
}