diff --git a/framework/eslint-config/base.mjs b/framework/eslint-config/base.mjs index 573046bb4..0c5275701 100644 --- a/framework/eslint-config/base.mjs +++ b/framework/eslint-config/base.mjs @@ -56,9 +56,7 @@ const base = (option, ...args) => antfu( 'consistent-return': 1, curly: ['error', 'multi-line'], 'default-param-last': 'off', - 'dot-notation': 0, - 'eslint-comments/no-unlimited-disable': 'off', 'func-names': 0, 'function-call-argument-newline': 0, @@ -121,6 +119,7 @@ const base = (option, ...args) => antfu( 'no-return-await': 0, 'no-underscore-dangle': 0, 'no-unmodified-loop-condition': 1, + 'no-useless-concat': 'warn', 'node/prefer-global/buffer': 'off', 'node/prefer-global/process': 'off', @@ -128,6 +127,7 @@ const base = (option, ...args) => antfu( 'perfectionist/sort-named-imports': 'off', 'prefer-destructuring': 0, + 'prefer-template': 'warn', 'quote-props': 0, 'react-hooks/exhaustive-deps': 0, 'react-refresh/only-export-components': ['warn', { diff --git a/framework/eslint-config/build.ts b/framework/eslint-config/build.ts index 2e9121f6f..7f5e6c4fb 100644 --- a/framework/eslint-config/build.ts +++ b/framework/eslint-config/build.ts @@ -1,9 +1,4 @@ import fs from 'fs'; -import { rules as baseBestPracticesRules } from 'eslint-config-airbnb-base/rules/best-practices'; -import { rules as baseErrorsRules } from 'eslint-config-airbnb-base/rules/errors'; -import { rules as baseES6Rules } from 'eslint-config-airbnb-base/rules/es6'; -import { rules as baseStyleRules } from 'eslint-config-airbnb-base/rules/style'; -import { rules as baseVariablesRules } from 'eslint-config-airbnb-base/rules/variables'; import yaml from 'js-yaml'; const base = yaml.load(fs.readFileSync('base.yaml', 'utf8')) as any; @@ -21,11 +16,6 @@ function sort(obj: Record): Record { // NOTE: oxlint doesn't support most stylistic rules const rules = sort({ - ...baseBestPracticesRules, - ...baseErrorsRules, - ...baseES6Rules, - ...baseStyleRules, - ...baseVariablesRules, ...base.rules, ...react.rules, 'no-unused-vars': [ diff --git a/package.json b/package.json index b60861f71..2d885a249 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "mongodb-memory-server": "10.1.4", "nyc": "^17.1.0", "ora": "^8.2.0", - "oxlint": "^1.9.0", + "oxlint": "^1.10.0", "package-json": "^10.0.1", "semver": "^7.7.2", "simple-git": "^3.28.0", diff --git a/packages/hydrooj/src/plugin-api.ts b/packages/hydrooj/src/plugin-api.ts index a1a5d421c..a55c455a5 100644 --- a/packages/hydrooj/src/plugin-api.ts +++ b/packages/hydrooj/src/plugin-api.ts @@ -28,6 +28,7 @@ export { default as TokenModel } from './model/token'; export { default as UserModel } from './model/user'; export { default as ProblemModel } from './model/problem'; export { default as RecordModel } from './model/record'; +export { default as ScheduleModel } from './model/schedule'; export { default as SolutionModel } from './model/solution'; export { default as MessageModel } from './model/message'; export { default as OauthModel } from './model/oauth';