Widen loadEnv schema type and allow rest-sibling destructuring in lint

loadEnv's ZodSchema<T> parameter required schema input === output,
which breaks any schema using .transform() (e.g. AppConfigSchema's
boolean coercion). Widen to ZodType<T, ZodTypeDef, unknown>, matching
existing runtime behavior. Also allow ignoreRestSiblings in the
no-unused-vars rule so 'const { X, ...rest } = obj' omission tests
don't trip the linter.
This commit is contained in:
2026-08-12 21:08:21 +02:00
parent 8e908408cd
commit 5140bc5a50
2 changed files with 9 additions and 3 deletions

View File

@@ -7,6 +7,9 @@ module.exports = {
parserOptions: { ecmaVersion: 2022, sourceType: 'module' },
ignorePatterns: ['dist', 'node_modules'],
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
],
},
};