Enable restrict-template-expressions linting rule (#7181)

* [AI] Promote typescript/restrict-template-expressions to error and fix violations

Convert the oxlint rule from "warn" to "error" and fix all 42 violations
by wrapping non-string template expressions with String(). This ensures
type safety in template literals across the codebase.

https://claude.ai/code/session_01Uk8SwFbD6HuUuo3SSMwU9z

* Add release notes for PR #7181

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Matiss Janis Aboltins
2026-03-13 18:36:58 +00:00
committed by GitHub
parent 85e3166495
commit 541df52441
34 changed files with 61 additions and 42 deletions

View File

@@ -91,12 +91,12 @@ if (values.config) {
if (!configExists) {
console.log(
`Please specify a valid config path. The path ${values.config} does not exist.`,
`Please specify a valid config path. The path ${String(values.config)} does not exist.`,
);
process.exit();
} else {
console.log(`Loading config from ${values.config}`);
console.log(`Loading config from ${String(values.config)}`);
const configJson = JSON.parse(readFileSync(values.config, 'utf-8'));
process.env.ACTUAL_CONFIG_PATH = values.config;
setupDataDir(configJson.dataDir);

View File

@@ -55,7 +55,7 @@ const requestLoggerMiddleware = expressWinston.logger({
const { timestamp, level, meta } = args;
const { res, req } = meta as { res: Response; req: Request };
return `${timestamp} ${level}: ${req.method} ${res.statusCode} ${req.url}`;
return `${String(timestamp)} ${String(level)}: ${req.method} ${res.statusCode} ${req.url}`;
}),
),
});