mirror of
https://github.com/siv-org/siv.git
synced 2026-01-09 10:27:57 -05:00
lint: Switch to tseslint.configs.strict.rules
This commit is contained in:
@@ -50,8 +50,7 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
plugins: { '@typescript-eslint': tseslint },
|
plugins: { '@typescript-eslint': tseslint },
|
||||||
rules: {
|
rules: {
|
||||||
...tseslint.configs.recommended.rules,
|
...tseslint.configs.strict.rules,
|
||||||
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -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 jwt from 'jsonwebtoken'
|
||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
import { NextApiRequest, NextApiResponse } from 'next'
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ function reducer(prev: State, payload: Map) {
|
|||||||
Object.keys(newState.plaintext).forEach((key) => {
|
Object.keys(newState.plaintext).forEach((key) => {
|
||||||
if (newState.plaintext[key] == '') {
|
if (newState.plaintext[key] == '') {
|
||||||
Object.keys(initState).forEach((group) => {
|
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]
|
delete (newState as never)[group][key]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user