workspace: add oxlint

This commit is contained in:
undefined committed 2025-03-10 16:16:34 +08:00
1 parent b48e70019a
commit cda3a8f855
18 files changed
+120 -44

No files matched your search

+2 -1
View File
@@ -2,7 +2,7 @@ import * as status from '@hydrooj/common/status';
import { findFileSync } from '@hydrooj/utils/lib/utils';
import { convert } from 'html-to-text';
import {
avatar, Context, fs, PERM, PRIV, Service, STATUS, yaml,
avatar, Context, difficultyAlgorithm, fs, PERM, PRIV, Service, STATUS, yaml,
} from 'hydrooj';
import jsesc from 'jsesc';
import nunjucks from 'nunjucks';
@@ -134,6 +134,7 @@ class Nunjucks extends nunjucks.Environment {
this.addGlobal('avatarUrl', avatar);
this.addGlobal('formatSeconds', misc.formatSeconds);
this.addGlobal('model', global.Hydro.model);
this.addGlobal('lib', { difficulty: difficultyAlgorithm });
this.addGlobal('ui', global.Hydro.ui);
this.addGlobal('isIE', (str) => {
if (!str) return false;