mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[Lint] Add new lint rule to check backend uses only now() and not new Date()
This commit is contained in:
committed by
Aaro Koivukangas
parent
a30b78f74d
commit
ecaafd3c89
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user