[Lint] Add new lint rule to check backend uses only now() and not new Date()

This commit is contained in:
Aaro Koivukangas
2026-08-09 01:48:41 +03:00
committed by Aaro Koivukangas
parent a30b78f74d
commit ecaafd3c89
2 changed files with 37 additions and 0 deletions
+9
View File
@@ -1,6 +1,7 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "typescript"],
"jsPlugins": ["./.oxlint-backend-rules.cjs"],
"categories": {
"correctness": "off"
},
@@ -36,6 +37,7 @@
},
"ignorePatterns": [
"eslint.config.mjs",
".oxlint-backend-rules.cjs",
"**/build/**",
"**/dist/**",
"**/node_modules/**",
@@ -235,6 +237,13 @@
"prefer-spread": "error"
}
},
{
"files": ["services/backend/src/**/*.{js,ts,tsx}"],
"excludeFiles": ["services/backend/src/util/clock.ts"],
"rules": {
"oodikone/no-new-date": "error"
}
},
{
"files": ["services/backend/src/routes/*.{ts,js}"],
"rules": {