diff --git a/.oxlintrc.json b/.oxlintrc.json index 4419657..b7d1a00 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,5 +1,7 @@ { "rules": { - "no-console": [2, { "allow": ["error", "info"] }] + "no-eval": 2, + "no-console": [2, { "allow": ["error", "info"] }], + "no-unused-vars": 2 } } diff --git a/client/shared/components/select_factory.tsx b/client/shared/components/select_factory.tsx index 9fefb39..4201fad 100644 --- a/client/shared/components/select_factory.tsx +++ b/client/shared/components/select_factory.tsx @@ -2,7 +2,6 @@ import { h, type FunctionComponent } from 'preact' import { useCallback, useEffect, useRef, useState } from 'preact/hooks' import cn from 'classnames' import mergeStyles from '../utils/merge_styles.ts' -import { Script } from '@fastify/type-provider-typebox' type Styles = { base?: string diff --git a/server/env.ts b/server/env.ts index 49bb7dc..726a14c 100644 --- a/server/env.ts +++ b/server/env.ts @@ -14,8 +14,12 @@ function read< missing.push(column) } else { if (typeof value === 'string') { - if (/^\d+$/.test(value)) value = Number(value) - else if (['false', 'true', 'null', 'undefined'].includes(value)) value = eval(value) + if (/^\d+$/.test(value)) { + value = Number(value) + } else if (['false', 'true', 'null', 'undefined'].includes(value)) { + // oxlint-disable-next-line no-eval + value = eval(value) + } } }