From 04c3d81b1fb872ebb188a6e3779ceff3a1a87c4c Mon Sep 17 00:00:00 2001 From: Hemachandar <132386067+hmacr@users.noreply.github.com> Date: Thu, 7 Aug 2025 05:24:22 +0530 Subject: [PATCH] chore: Setup missing oxlint configs (#9862) * shared * server * app * remove vestigial eslintrc files * update comment directives --- .dockerignore | 1 + .oxlintrc.json | 37 ++---------------- app/.eslintrc | 17 --------- app/.oxlintrc.json | 28 ++++++++++++++ app/components/ActionButton.tsx | 2 +- app/components/Analytics.tsx | 2 +- app/components/ContextMenu/index.tsx | 2 +- app/editor/components/FindAndReplace.tsx | 2 +- app/editor/extensions/PasteHandler.tsx | 2 +- app/editor/index.tsx | 2 +- app/hooks/useCollectionTrees.ts | 2 +- app/hooks/useLocaleTime.ts | 2 +- app/hooks/useMenuState.tsx | 2 +- app/hooks/useThrottledCallback.ts | 2 +- app/index.tsx | 2 +- app/models/Collection.test.ts | 2 +- app/models/base/Model.ts | 2 +- app/scenes/Login/components/Notices.tsx | 2 +- app/stores/UnfurlsStore.ts | 2 +- app/stores/base/Store.ts | 2 +- app/test/setup.ts | 2 +- app/utils/Logger.ts | 2 +- app/utils/__mocks__/ApiClient.ts | 2 +- app/utils/download.ts | 2 +- build.js | 6 +-- plugins/notion/server/notion.ts | 2 +- relativeci.config.js | 2 +- server/.eslintrc | 38 ------------------- server/.oxlintrc.json | 31 +++++++++++++++ server/__mocks__/dd-trace.ts | 4 +- server/env.ts | 4 +- server/index.ts | 4 +- server/logging/Logger.ts | 6 ++- server/logging/sentry.ts | 3 +- server/logging/tracer.ts | 2 +- server/logging/tracing.ts | 6 +-- server/models/Collection.ts | 2 +- server/models/Document.ts | 2 +- server/models/decorators/Deprecated.ts | 2 +- server/models/helpers/AuthenticationHelper.ts | 2 +- server/onerror.ts | 8 ++-- server/presenters/import.ts | 2 +- server/queues/HealthMonitor.ts | 2 +- server/queues/processors/BaseProcessor.ts | 2 +- server/queues/processors/ImportsProcessor.ts | 2 +- server/queues/queue.ts | 2 +- server/queues/tasks/BaseTask.ts | 2 +- server/queues/tasks/CleanupOldImportsTask.ts | 4 +- .../queues/tasks/ErrorTimedOutImportsTask.ts | 2 +- .../tasks/ImportMarkdownZipTask.test.ts | 2 +- server/routes/api/imports/imports.test.ts | 2 +- server/routes/api/imports/imports.ts | 6 +-- ...20240825000000-invalidate-unfurls-cache.ts | 2 +- server/scripts/bootstrap.ts | 2 +- server/scripts/install-local-ssl.js | 2 +- server/scripts/release.js | 2 +- server/services/web.ts | 2 +- server/storage/database.ts | 2 +- server/test/TestServer.ts | 2 +- server/test/factories.ts | 4 +- server/types.ts | 2 +- server/typings/fetch-with-proxy.d.ts | 2 +- server/typings/outlinewiki__koa-passport.d.ts | 2 +- server/utils/diff.ts | 2 +- server/utils/fetch.ts | 2 +- shared/.eslintrc | 30 --------------- shared/.oxlintrc.json | 38 +++++++++++++++++++ shared/editor/commands/insertFiles.ts | 2 +- shared/editor/components/Styles.ts | 2 +- shared/editor/extensions/CodeHighlighting.ts | 2 +- shared/editor/lib/markdown/serializer.ts | 4 +- shared/editor/lib/uploadPlaceholder.tsx | 2 +- shared/editor/rules/mention.ts | 2 +- shared/utils/csv.ts | 2 +- shared/utils/date.ts | 2 +- shared/utils/emoji.ts | 2 +- shared/utils/rtl.ts | 2 +- vite.config.ts | 2 +- 78 files changed, 192 insertions(+), 203 deletions(-) delete mode 100644 app/.eslintrc create mode 100644 app/.oxlintrc.json delete mode 100644 server/.eslintrc create mode 100644 server/.oxlintrc.json delete mode 100644 shared/.eslintrc create mode 100644 shared/.oxlintrc.json diff --git a/.dockerignore b/.dockerignore index 7c96a60465..df3b248574 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,6 +6,7 @@ __mocks__ .DS_Store .env* .eslint* +.oxlintrc* .log Makefile Procfile diff --git a/.oxlintrc.json b/.oxlintrc.json index 5330037c3e..99934d0290 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,9 +1,5 @@ { "$schema": "./node_modules/oxlint/configuration_schema.json", - "plugins": ["eslint", "typescript"], - "env": { - "builtin": true - }, "ignorePatterns": [ "build/**", "node_modules/**", @@ -35,6 +31,7 @@ "no-empty-pattern": "error", "no-empty-static-block": "error", "no-ex-assign": "error", + "no-explicit-any": "warn", "no-extra-boolean-cast": "error", "no-fallthrough": "error", "no-func-assign": "error", @@ -71,31 +68,12 @@ }, "overrides": [ { - "files": [ - "**/*.{js,jsx,ts,tsx}" - ], + "files": ["**/*.{js,jsx,ts,tsx}"], "rules": { - "no-restricted-imports": [ - "error", - { - "paths": [ - { - "name": "reakit/Menu", - "importNames": [ - "useMenuState" - ], - "message": "Do not use useMenuState from reakit/Menu. Use useMenuState instead." - } - ] - } - ], "eqeqeq": "error", "curly": "error", "no-console": "error", - "arrow-body-style": [ - "error", - "as-needed" - ], + "arrow-body-style": ["error", "as-needed"], "no-useless-escape": "off", "react/react-in-jsx-scope": "off", "react/self-closing-comp": [ @@ -106,7 +84,6 @@ } ], "@typescript-eslint/no-require-imports": "off", - "@typescript-eslint/no-explicit-any": "off", "import/no-named-as-default": "off", "import/no-named-as-default-member": "off", "no-unused-vars": [ @@ -119,13 +96,7 @@ } ] }, - "plugins": [ - "eslint", - "oxc", - "react", - "typescript", - "import" - ] + "plugins": ["eslint", "oxc", "react", "typescript", "import"] } ] } diff --git a/app/.eslintrc b/app/.eslintrc deleted file mode 100644 index 18bd1b9732..0000000000 --- a/app/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": [ - "../.eslintrc", - "plugin:react/recommended", - "plugin:react-hooks/recommended" - ], - "plugins": [ - "eslint-plugin-react-hooks" - ], - "rules": { - "react/react-in-jsx-scope": "off" - }, - "env": { - "jest": true, - "browser": true - } -} \ No newline at end of file diff --git a/app/.oxlintrc.json b/app/.oxlintrc.json new file mode 100644 index 0000000000..a90e9cbd55 --- /dev/null +++ b/app/.oxlintrc.json @@ -0,0 +1,28 @@ +{ + "extends": ["../.oxlintrc.json"], + "plugins": ["oxc", "eslint", "typescript", "react"], + "overrides": [ + { + "files": ["**/*.{jsx,tsx}"], + "rules": { + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "reakit/Menu", + "importNames": ["useMenuState"], + "message": "Do not use useMenuState from reakit/Menu. Use useMenuState instead." + } + ] + } + ] + }, + "plugins": ["import"] + } + ], + "env": { + "jest": true, + "browser": true + } +} diff --git a/app/components/ActionButton.tsx b/app/components/ActionButton.tsx index b42a980bc6..91495ac8be 100644 --- a/app/components/ActionButton.tsx +++ b/app/components/ActionButton.tsx @@ -1,4 +1,4 @@ -/* eslint-disable react/prop-types */ +/* oxlint-disable react/prop-types */ import * as React from "react"; import Tooltip, { Props as TooltipProps } from "~/components/Tooltip"; import { performAction } from "~/actions"; diff --git a/app/components/Analytics.tsx b/app/components/Analytics.tsx index 70d51cfaf3..0908f0e7f1 100644 --- a/app/components/Analytics.tsx +++ b/app/components/Analytics.tsx @@ -1,4 +1,4 @@ -/* eslint-disable prefer-rest-params */ +/* oxlint-disable prefer-rest-params */ /* global ga */ import escape from "lodash/escape"; import * as React from "react"; diff --git a/app/components/ContextMenu/index.tsx b/app/components/ContextMenu/index.tsx index 4d981af9cf..cb08324e8e 100644 --- a/app/components/ContextMenu/index.tsx +++ b/app/components/ContextMenu/index.tsx @@ -119,7 +119,7 @@ const ContextMenu: React.FC = ({ > {(props) => ( o.documents?.length).join("-"); const collectionTrees = useMemo( () => collections.orderedData.map(getCollectionTree), - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line react-hooks/exhaustive-deps [collections.orderedData, key] ); diff --git a/app/hooks/useLocaleTime.ts b/app/hooks/useLocaleTime.ts index c666d0ae5e..fe88b41593 100644 --- a/app/hooks/useLocaleTime.ts +++ b/app/hooks/useLocaleTime.ts @@ -44,7 +44,7 @@ export const useLocaleTime = ({ "MMMM do, yyyy h:mm a"; // @ts-expect-error fallback to formatLocaleLong const formatLocale = format?.[userLocale] ?? formatLocaleLong; - const [_, setMinutesMounted] = useState(0); // eslint-disable-line @typescript-eslint/no-unused-vars + const [_, setMinutesMounted] = useState(0); const callback = useRef<() => void>(); useEffect(() => { diff --git a/app/hooks/useMenuState.tsx b/app/hooks/useMenuState.tsx index e0fe24161d..18d7f4c915 100644 --- a/app/hooks/useMenuState.tsx +++ b/app/hooks/useMenuState.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { - // eslint-disable-next-line no-restricted-imports + // oxlint-disable-next-line no-restricted-imports useMenuState as reakitUseMenuState, MenuStateReturn, } from "reakit/Menu"; diff --git a/app/hooks/useThrottledCallback.ts b/app/hooks/useThrottledCallback.ts index 6e7b6e90c9..4d1beb80e2 100644 --- a/app/hooks/useThrottledCallback.ts +++ b/app/hooks/useThrottledCallback.ts @@ -28,7 +28,7 @@ export default function useThrottledCallback any>( ) { const handler = React.useMemo( () => throttle(fn, wait, options), - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line react-hooks/exhaustive-deps dependencies ); diff --git a/app/index.tsx b/app/index.tsx index ede59695e2..0344910116 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -1,4 +1,4 @@ -// eslint-disable-next-line import/no-unresolved +// oxlint-disable-next-line import/no-unresolved import "vite/modulepreload-polyfill"; import { LazyMotion } from "framer-motion"; import { KBarProvider } from "kbar"; diff --git a/app/models/Collection.test.ts b/app/models/Collection.test.ts index 499023905f..6397b90444 100644 --- a/app/models/Collection.test.ts +++ b/app/models/Collection.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* oxlint-disable */ import stores from "~/stores"; describe("Collection model", () => { diff --git a/app/models/base/Model.ts b/app/models/base/Model.ts index 107b8a3ab4..a88939463e 100644 --- a/app/models/base/Model.ts +++ b/app/models/base/Model.ts @@ -208,7 +208,7 @@ export default abstract class Model { for (const property in this) { if ( - // eslint-disable-next-line no-prototype-builtins + // oxlint-disable-next-line no-prototype-builtins this.hasOwnProperty(property) && !["persistedAttributes", "store", "isSaving", "isNew"].includes( property diff --git a/app/scenes/Login/components/Notices.tsx b/app/scenes/Login/components/Notices.tsx index 4e7ccb72af..09cc986a47 100644 --- a/app/scenes/Login/components/Notices.tsx +++ b/app/scenes/Login/components/Notices.tsx @@ -1,4 +1,4 @@ -/* eslint-disable react/no-unescaped-entities */ +/* oxlint-disable react/no-unescaped-entities */ import { WarningIcon } from "outline-icons"; import { Trans } from "react-i18next"; import Notice from "~/components/Notice"; diff --git a/app/stores/UnfurlsStore.ts b/app/stores/UnfurlsStore.ts index 42692e90c9..410af98236 100644 --- a/app/stores/UnfurlsStore.ts +++ b/app/stores/UnfurlsStore.ts @@ -7,7 +7,7 @@ import Logger from "~/utils/Logger"; import RootStore from "./RootStore"; import Store from "./base/Store"; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// oxlint-disable-next-line @typescript-eslint/no-explicit-any class UnfurlsStore extends Store> { actions = []; // no default actions allowed for unfurls. diff --git a/app/stores/base/Store.ts b/app/stores/base/Store.ts index a2ba5f03ef..e899a3b416 100644 --- a/app/stores/base/Store.ts +++ b/app/stores/base/Store.ts @@ -1,6 +1,6 @@ import commandScore from "command-score"; import invariant from "invariant"; -// eslint-disable-next-line lodash/import-scope +// oxlint-disable-next-line lodash/import-scope import type { ObjectIterateeCustom } from "lodash"; import deburr from "lodash/deburr"; import filter from "lodash/filter"; diff --git a/app/test/setup.ts b/app/test/setup.ts index 5358451c4a..8e7f2b23b5 100644 --- a/app/test/setup.ts +++ b/app/test/setup.ts @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* oxlint-disable */ // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module '../.... Remove this comment to see the full error message import localStorage from "../../__mocks__/localStorage"; import { initI18n } from "../utils/i18n"; diff --git a/app/utils/Logger.ts b/app/utils/Logger.ts index 20e52228ff..af7368f5cf 100644 --- a/app/utils/Logger.ts +++ b/app/utils/Logger.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-console */ +/* oxlint-disable no-console */ import * as Sentry from "@sentry/react"; import env from "~/env"; diff --git a/app/utils/__mocks__/ApiClient.ts b/app/utils/__mocks__/ApiClient.ts index cc8ac96e0c..18ec9445e7 100644 --- a/app/utils/__mocks__/ApiClient.ts +++ b/app/utils/__mocks__/ApiClient.ts @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* oxlint-disable */ export const client = { post: jest.fn(() => Promise.resolve({ diff --git a/app/utils/download.ts b/app/utils/download.ts index c3daac8317..44245e091b 100644 --- a/app/utils/download.ts +++ b/app/utils/download.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-expressions */ +/* oxlint-disable @typescript-eslint/no-unused-expressions */ // download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage // v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime // v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs diff --git a/build.js b/build.js index acaac55fd7..7c76380efd 100755 --- a/build.js +++ b/build.js @@ -1,6 +1,6 @@ -/* eslint-disable no-console */ -/* eslint-disable @typescript-eslint/no-var-requires */ -/* eslint-disable no-undef */ +/* oxlint-disable no-console */ +/* oxlint-disable @typescript-oxlint/no-var-requires */ +/* oxlint-disable no-undef */ const { exec } = require("child_process"); const { readdirSync, existsSync } = require("fs"); diff --git a/plugins/notion/server/notion.ts b/plugins/notion/server/notion.ts index 2fc5dd362d..3d1a9a7e05 100644 --- a/plugins/notion/server/notion.ts +++ b/plugins/notion/server/notion.ts @@ -95,7 +95,7 @@ export class NotionClient { private async fetchWithRetry(apiCall: () => Promise): Promise { let retries = 0; - // eslint-disable-next-line no-constant-condition + // oxlint-disable-next-line no-constant-condition while (true) { try { await this.limiter(); diff --git a/relativeci.config.js b/relativeci.config.js index 52a28bd6fc..33489b28a8 100644 --- a/relativeci.config.js +++ b/relativeci.config.js @@ -1,4 +1,4 @@ -// eslint-disable-next-line no-undef +// oxlint-disable-next-line no-undef module.exports = { includeCommitMessage: true, webpack: { diff --git a/server/.eslintrc b/server/.eslintrc deleted file mode 100644 index 7d58b52e40..0000000000 --- a/server/.eslintrc +++ /dev/null @@ -1,38 +0,0 @@ -{ - "extends": [ - "../.eslintrc" - ], - "parserOptions": { - "project": "./tsconfig.json" - }, - "rules": { - "@typescript-eslint/no-misused-promises": [ - "error", - { - "checksVoidReturn": true - } - ], - "no-restricted-imports": ["error", { - "name": "fetch-with-proxy", - "message": "Use `@server/utils/fetch` instead" - }, { - "name": "node-fetch", - "message": "Use `@server/utils/fetch` instead" - }, { - "name": "passport", - "message": "Use the `@outlinewiki/koa-passport` package" - }] - }, - "overrides": [ - { - "files": ["scripts/*"], - "rules": { - "no-console": "off" - } - } - ], - "env": { - "jest": true, - "node": true - } -} \ No newline at end of file diff --git a/server/.oxlintrc.json b/server/.oxlintrc.json new file mode 100644 index 0000000000..c379005f22 --- /dev/null +++ b/server/.oxlintrc.json @@ -0,0 +1,31 @@ +{ + "extends": ["../.oxlintrc.json"], + "plugins": ["oxc", "eslint", "typescript", "node"], + "overrides": [ + { + "files": ["**/*.{js,ts}"], + "rules": { + "no-restricted-imports": [ + "error", + { + "name": "fetch-with-proxy", + "message": "Use `@server/utils/fetch` instead" + }, + { + "name": "node-fetch", + "message": "Use `@server/utils/fetch` instead" + }, + { + "name": "passport", + "message": "Use the `@outlinewiki/koa-passport` package" + } + ] + }, + "plugins": ["import"] + } + ], + "env": { + "jest": true, + "node": true + } +} diff --git a/server/__mocks__/dd-trace.ts b/server/__mocks__/dd-trace.ts index 463b0888f1..92df8321d8 100644 --- a/server/__mocks__/dd-trace.ts +++ b/server/__mocks__/dd-trace.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ +/* oxlint-disable @typescript-eslint/explicit-function-return-type */ import { Tracer } from "dd-trace"; -// eslint-disable-next-line @typescript-eslint/no-empty-function +// oxlint-disable-next-line @typescript-eslint/no-empty-function const emptyFn = function () {}; const callableHandlers = { diff --git a/server/env.ts b/server/env.ts index 8dcea3b981..a26991da52 100644 --- a/server/env.ts +++ b/server/env.ts @@ -1,5 +1,5 @@ -/* eslint-disable no-console */ -// eslint-disable-next-line import/order +/* oxlint-disable no-console */ +// oxlint-disable-next-line import/order import environment from "./utils/environment"; import os from "os"; import { diff --git a/server/index.ts b/server/index.ts index 0693c7d82f..f5b41c590f 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1,5 +1,5 @@ -/* eslint-disable @typescript-eslint/no-misused-promises */ -/* eslint-disable import/order */ +/* oxlint-disable @typescript-eslint/no-misused-promises */ +/* oxlint-disable import/order */ import env from "./env"; import "./logging/tracer"; // must come before importing any instrumented module diff --git a/server/logging/Logger.ts b/server/logging/Logger.ts index 6ad0af2e91..cd96a96322 100644 --- a/server/logging/Logger.ts +++ b/server/logging/Logger.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-console */ +/* oxlint-disable no-console */ import { IncomingMessage } from "http"; import chalk from "chalk"; import isArray from "lodash/isArray"; @@ -27,6 +27,7 @@ type LogCategory = | "utils" | "plugins"; +// oxlint-disable-next-line @typescript-eslint/no-explicit-any type Extra = Record; class Logger { @@ -223,14 +224,17 @@ class Logger { ]; if (level > 3) { + // oxlint-disable-next-line @typescript-eslint/no-explicit-any return "[…]" as any as T; } if (isArray(input)) { + // oxlint-disable-next-line @typescript-eslint/no-explicit-any return input.map((item) => this.sanitize(item, level + 1)) as any as T; } if (isObject(input)) { + // oxlint-disable-next-line @typescript-eslint/no-explicit-any const output: Record = { ...input }; for (const key of Object.keys(output)) { diff --git a/server/logging/sentry.ts b/server/logging/sentry.ts index 7e277f9f1b..d2593d3b85 100644 --- a/server/logging/sentry.ts +++ b/server/logging/sentry.ts @@ -44,6 +44,7 @@ if (env.SENTRY_DSN) { }); } +// oxlint-disable-next-line @typescript-eslint/no-explicit-any export function requestErrorHandler(error: any, ctx: AppContext) { // we don't need to report every time a request stops to the bug tracker if (error.code === "EPIPE" || error.code === "ECONNRESET") { @@ -81,7 +82,7 @@ export function requestErrorHandler(error: any, ctx: AppContext) { Sentry.captureException(error); }); } else if (env.ENVIRONMENT !== "test") { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.error(error); } } diff --git a/server/logging/tracer.ts b/server/logging/tracer.ts index 6c2907cc2a..8ef6e330c7 100644 --- a/server/logging/tracer.ts +++ b/server/logging/tracer.ts @@ -52,7 +52,7 @@ export function addTags(tags: Record, span?: Span | null): void { export function getRootSpanFromRequestContext( context: PrivateDatadogContext ): Span | null { - // eslint-disable-next-line no-undef + // oxlint-disable-next-line no-undef return context?.req?._datadog?.span ?? null; } diff --git a/server/logging/tracing.ts b/server/logging/tracing.ts index 2052bae81e..f536df77f8 100644 --- a/server/logging/tracing.ts +++ b/server/logging/tracing.ts @@ -156,7 +156,7 @@ const traceClass = (config?: TraceConfig) => key ); - // eslint-disable-next-line no-undef + // oxlint-disable-next-line no-undef if (typeof key === "string" && typeof descriptor?.value === "function") { Object.defineProperty( constructor.prototype, @@ -170,7 +170,7 @@ const traceClass = (config?: TraceConfig) => staticKeys.forEach((key) => { const descriptor = Object.getOwnPropertyDescriptor(constructor, key); - // eslint-disable-next-line no-undef + // oxlint-disable-next-line no-undef if (typeof key === "string" && typeof descriptor?.value === "function") { Object.defineProperty( constructor, @@ -187,7 +187,7 @@ const traceClass = (config?: TraceConfig) => * @param config Optional configuration for the span that will be created for this trace. */ // Going to rely on inferrence do its thing for this function -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +// oxlint-disable-next-line @typescript-eslint/explicit-module-boundary-types export function trace(config?: TraceConfig) { function traceDecorator(target: Constructor): void; function traceDecorator( diff --git a/server/models/Collection.ts b/server/models/Collection.ts index 5a8dc8aa8e..cd2742243d 100644 --- a/server/models/Collection.ts +++ b/server/models/Collection.ts @@ -1,4 +1,4 @@ -/* eslint-disable lines-between-class-members */ +/* oxlint-disable lines-between-class-members */ import fractionalIndex from "fractional-index"; import find from "lodash/find"; import findIndex from "lodash/findIndex"; diff --git a/server/models/Document.ts b/server/models/Document.ts index 4ee9e91ef7..85941e518d 100644 --- a/server/models/Document.ts +++ b/server/models/Document.ts @@ -1,4 +1,4 @@ -/* eslint-disable lines-between-class-members */ +/* oxlint-disable lines-between-class-members */ import compact from "lodash/compact"; import isNil from "lodash/isNil"; import uniq from "lodash/uniq"; diff --git a/server/models/decorators/Deprecated.ts b/server/models/decorators/Deprecated.ts index 687826c337..d1ed05026f 100644 --- a/server/models/decorators/Deprecated.ts +++ b/server/models/decorators/Deprecated.ts @@ -1,7 +1,7 @@ const Deprecated = (message?: string) => (_target: object, propertyKey: string) => { if (process.env[propertyKey]) { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.warn( `The environment variable ${propertyKey} is deprecated and will be removed in a future release. ${message}` ); diff --git a/server/models/helpers/AuthenticationHelper.ts b/server/models/helpers/AuthenticationHelper.ts index 3a4234ea1f..b0393fd387 100644 --- a/server/models/helpers/AuthenticationHelper.ts +++ b/server/models/helpers/AuthenticationHelper.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ +/* oxlint-disable @typescript-eslint/no-var-requires */ import find from "lodash/find"; import { Scope } from "@shared/types"; import env from "@server/env"; diff --git a/server/onerror.ts b/server/onerror.ts index d23684d813..0d097551d7 100644 --- a/server/onerror.ts +++ b/server/onerror.ts @@ -13,7 +13,7 @@ import { requestErrorHandler } from "@server/logging/sentry"; let errorHtmlCache: Buffer | undefined; export default function onerror(app: Koa) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any app.context.onerror = function (err: any) { // Don't do anything if there is no error, this allows you to pass `this.onerror` to node-style callbacks. if (isNil(err)) { @@ -39,7 +39,7 @@ export default function onerror(app: Koa) { if (!(err instanceof InternalError)) { if (env.ENVIRONMENT === "test") { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.error(err); } err = InternalError(); @@ -82,7 +82,7 @@ export default function onerror(app: Koa) { return app; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// oxlint-disable-next-line @typescript-eslint/no-explicit-any function wrapInNativeError(err: any): Error { // When dealing with cross-globals a normal `instanceof` check doesn't work properly. // See https://github.com/koajs/koa/issues/1466 @@ -99,7 +99,7 @@ function wrapInNativeError(err: any): Error { if (typeof err === "object") { try { errMsg = JSON.stringify(err); - // eslint-disable-next-line no-empty + // oxlint-disable-next-line no-empty } catch (_err) { // Ignore } diff --git a/server/presenters/import.ts b/server/presenters/import.ts index 9b1a98ee94..3e6e983ac9 100644 --- a/server/presenters/import.ts +++ b/server/presenters/import.ts @@ -2,7 +2,7 @@ import { Import } from "@server/models"; import presentUser from "./user"; export default function presentImport( - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any importModel: Import ) { return { diff --git a/server/queues/HealthMonitor.ts b/server/queues/HealthMonitor.ts index d526e68912..6342ddb276 100644 --- a/server/queues/HealthMonitor.ts +++ b/server/queues/HealthMonitor.ts @@ -2,7 +2,7 @@ import { Queue } from "bull"; import { Second } from "@shared/utils/time"; import Logger from "@server/logging/Logger"; -/* eslint-disable @typescript-eslint/no-misused-promises */ +/* oxlint-disable @typescript-eslint/no-misused-promises */ export default class HealthMonitor { /** * Starts a health monitor for the given queue. If the queue stops processing jobs then the diff --git a/server/queues/processors/BaseProcessor.ts b/server/queues/processors/BaseProcessor.ts index 0241368147..9bad202c53 100644 --- a/server/queues/processors/BaseProcessor.ts +++ b/server/queues/processors/BaseProcessor.ts @@ -11,7 +11,7 @@ export default abstract class BaseProcessor { * @param event processor event * @returns A promise that resolves once the processor handles the failure. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // oxlint-disable-next-line @typescript-eslint/no-unused-vars public onFailed(event: Event): Promise { return Promise.resolve(); } diff --git a/server/queues/processors/ImportsProcessor.ts b/server/queues/processors/ImportsProcessor.ts index d4532f3d2a..7d10285720 100644 --- a/server/queues/processors/ImportsProcessor.ts +++ b/server/queues/processors/ImportsProcessor.ts @@ -465,7 +465,7 @@ export default abstract class ImportsProcessor< content: ProsemirrorDoc; attachments: Attachment[]; idMap: Record; - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any importInput: Record[number]>; actorId: string; }): ProsemirrorDoc { diff --git a/server/queues/queue.ts b/server/queues/queue.ts index b355283bb4..03ea4f673e 100644 --- a/server/queues/queue.ts +++ b/server/queues/queue.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-misused-promises */ +/* oxlint-disable @typescript-eslint/no-misused-promises */ import Queue from "bull"; import snakeCase from "lodash/snakeCase"; import { Second } from "@shared/utils/time"; diff --git a/server/queues/tasks/BaseTask.ts b/server/queues/tasks/BaseTask.ts index bb606e8df9..3b423fb1f8 100644 --- a/server/queues/tasks/BaseTask.ts +++ b/server/queues/tasks/BaseTask.ts @@ -51,7 +51,7 @@ export default abstract class BaseTask> { * @param props Properties to be used by the task * @returns A promise that resolves once the task handles the failure. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // oxlint-disable-next-line @typescript-eslint/no-unused-vars public onFailed(props: T): Promise { return Promise.resolve(); } diff --git a/server/queues/tasks/CleanupOldImportsTask.ts b/server/queues/tasks/CleanupOldImportsTask.ts index c8d922d8be..2bb66b439a 100644 --- a/server/queues/tasks/CleanupOldImportsTask.ts +++ b/server/queues/tasks/CleanupOldImportsTask.ts @@ -21,7 +21,7 @@ export default class CleanupOldImportsTask extends BaseTask { let totalTasksDeleted = 0; try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any await Import.findAllInBatches>( { attributes: ["id"], @@ -44,7 +44,7 @@ export default class CleanupOldImportsTask extends BaseTask { paranoid: false, }, async (imports) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any await ImportTask.findAllInBatches>( { attributes: ["id"], diff --git a/server/queues/tasks/ErrorTimedOutImportsTask.ts b/server/queues/tasks/ErrorTimedOutImportsTask.ts index bcc7b94209..9f3559e774 100644 --- a/server/queues/tasks/ErrorTimedOutImportsTask.ts +++ b/server/queues/tasks/ErrorTimedOutImportsTask.ts @@ -23,7 +23,7 @@ export default class ErrorTimedOutImportsTask extends BaseTask { const importsErrored: Record = {}; try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any await ImportTask.findAllInBatches>( { where: { diff --git a/server/queues/tasks/ImportMarkdownZipTask.test.ts b/server/queues/tasks/ImportMarkdownZipTask.test.ts index d5a9287d01..9b6787612e 100644 --- a/server/queues/tasks/ImportMarkdownZipTask.test.ts +++ b/server/queues/tasks/ImportMarkdownZipTask.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-empty-function */ +/* oxlint-disable @typescript-eslint/no-empty-function */ import path from "path"; import { FileOperation } from "@server/models"; import { buildFileOperation } from "@server/test/factories"; diff --git a/server/routes/api/imports/imports.test.ts b/server/routes/api/imports/imports.test.ts index ef8298b309..1417a9bda6 100644 --- a/server/routes/api/imports/imports.test.ts +++ b/server/routes/api/imports/imports.test.ts @@ -126,7 +126,7 @@ describe("#imports.list", () => { expect(body.data.length).toEqual(2); const importIds = body.data.map( - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any (importModel: Import) => importModel.id ); expect(importIds).toContain(importOne.id); diff --git a/server/routes/api/imports/imports.ts b/server/routes/api/imports/imports.ts index 11a545025e..6471f526c2 100644 --- a/server/routes/api/imports/imports.ts +++ b/server/routes/api/imports/imports.ts @@ -81,7 +81,7 @@ router.post( authorize(user, "listImports", user.team); - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any const where: WhereOptions> = { teamId: user.teamId }; if (service) { @@ -89,14 +89,14 @@ router.post( } const [imports, total] = await Promise.all([ - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any Import.findAll>({ where, order: [[sort, direction]], offset: ctx.state.pagination.offset, limit: ctx.state.pagination.limit, }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any Import.count>({ where, }), diff --git a/server/scripts/20240825000000-invalidate-unfurls-cache.ts b/server/scripts/20240825000000-invalidate-unfurls-cache.ts index 50509a153e..af12558f51 100644 --- a/server/scripts/20240825000000-invalidate-unfurls-cache.ts +++ b/server/scripts/20240825000000-invalidate-unfurls-cache.ts @@ -18,7 +18,7 @@ const deleteKeys = async (keys: string[]): Promise => { Keys.Total += keys.length; const pipeline = redis.pipeline(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any keys.forEach((key: any) => pipeline.del(key)); const res = await pipeline.exec(); diff --git a/server/scripts/bootstrap.ts b/server/scripts/bootstrap.ts index e6a7e73d50..52b47a2358 100644 --- a/server/scripts/bootstrap.ts +++ b/server/scripts/bootstrap.ts @@ -1,5 +1,5 @@ if (process.env.NODE_ENV !== "test") { - // eslint-disable-next-line @typescript-eslint/no-var-requires + // oxlint-disable-next-line @typescript-eslint/no-var-requires require("dotenv").config({ silent: true, }); diff --git a/server/scripts/install-local-ssl.js b/server/scripts/install-local-ssl.js index f6810b0cea..562da8b84e 100644 --- a/server/scripts/install-local-ssl.js +++ b/server/scripts/install-local-ssl.js @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ +/* oxlint-disable @typescript-eslint/no-var-requires */ const exec = require("child_process").execSync; const fs = require("fs"); diff --git a/server/scripts/release.js b/server/scripts/release.js index ecfb83b8a0..6f738d858b 100644 --- a/server/scripts/release.js +++ b/server/scripts/release.js @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ +/* oxlint-disable @typescript-eslint/no-var-requires */ const { execSync } = require("child_process"); const fs = require("fs"); diff --git a/server/services/web.ts b/server/services/web.ts index 7105aafaf9..6aa5ad23fb 100644 --- a/server/services/web.ts +++ b/server/services/web.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ +/* oxlint-disable @typescript-eslint/no-var-requires */ import { Server } from "https"; import Koa from "koa"; import compress from "koa-compress"; diff --git a/server/storage/database.ts b/server/storage/database.ts index 8336c87940..dfa2e93f43 100644 --- a/server/storage/database.ts +++ b/server/storage/database.ts @@ -143,7 +143,7 @@ export function createMigrationRunner( migrations: { glob, resolve: ({ name, path, context }) => { - // eslint-disable-next-line @typescript-eslint/no-require-imports + // oxlint-disable-next-line @typescript-eslint/no-require-imports const migration = require(path as string); return { name, diff --git a/server/test/TestServer.ts b/server/test/TestServer.ts index 0f8f5326a1..18254e5a74 100644 --- a/server/test/TestServer.ts +++ b/server/test/TestServer.ts @@ -1,7 +1,7 @@ import http from "http"; import { AddressInfo } from "net"; import Koa from "koa"; -// eslint-disable-next-line no-restricted-imports +// oxlint-disable-next-line no-restricted-imports import nodeFetch from "node-fetch"; class TestServer { diff --git a/server/test/factories.ts b/server/test/factories.ts index c33056e1a0..b328f7d9a2 100644 --- a/server/test/factories.ts +++ b/server/test/factories.ts @@ -496,7 +496,7 @@ export async function buildFileOperation( }); } -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// oxlint-disable-next-line @typescript-eslint/no-explicit-any export async function buildImport(overrides: Partial> = {}) { if (!overrides.teamId) { const team = await buildTeam(); @@ -519,7 +519,7 @@ export async function buildImport(overrides: Partial> = {}) { overrides.integrationId = integration.id; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // oxlint-disable-next-line @typescript-eslint/no-explicit-any return Import.create>({ name: "testImport", service: IntegrationService.Notion, diff --git a/server/types.ts b/server/types.ts index d60e5c685d..21c98fdd27 100644 --- a/server/types.ts +++ b/server/types.ts @@ -450,7 +450,7 @@ export type OAuthClientEvent = BaseEvent & { modelId: string; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// oxlint-disable-next-line @typescript-eslint/no-explicit-any export type ImportEvent = BaseEvent> & { name: | "imports.create" diff --git a/server/typings/fetch-with-proxy.d.ts b/server/typings/fetch-with-proxy.d.ts index 80a173ea82..9121ac7ee1 100644 --- a/server/typings/fetch-with-proxy.d.ts +++ b/server/typings/fetch-with-proxy.d.ts @@ -1,5 +1,5 @@ declare module "fetch-with-proxy" { - // eslint-disable-next-line no-restricted-imports + // oxlint-disable-next-line no-restricted-imports import nodeFetch from "node-fetch"; export = nodeFetch; diff --git a/server/typings/outlinewiki__koa-passport.d.ts b/server/typings/outlinewiki__koa-passport.d.ts index 13a7edd7f9..49b2020ea5 100644 --- a/server/typings/outlinewiki__koa-passport.d.ts +++ b/server/typings/outlinewiki__koa-passport.d.ts @@ -12,7 +12,7 @@ declare module "@outlinewiki/koa-passport" { // TypeScript Version: 2.3 import { IncomingMessage } from "http"; - // eslint-disable-next-line + // oxlint-disable-next-line import Express from "express"; import { Request } from "koa"; import { IMiddleware } from "koa-router"; diff --git a/server/utils/diff.ts b/server/utils/diff.ts index 5e5104d950..1a60757fc0 100644 --- a/server/utils/diff.ts +++ b/server/utils/diff.ts @@ -425,7 +425,7 @@ MatchBinarySearchTree.prototype = { let current = this._root; if (current) { - // eslint-disable-next-line no-constant-condition + // oxlint-disable-next-line no-constant-condition while (true) { // Determine if the match value should go to the left or right of the current // node. diff --git a/server/utils/fetch.ts b/server/utils/fetch.ts index 79065c3bc1..6888cfbe9e 100644 --- a/server/utils/fetch.ts +++ b/server/utils/fetch.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-restricted-imports */ +/* oxlint-disable no-restricted-imports */ import fetchWithProxy from "fetch-with-proxy"; import nodeFetch, { RequestInit, Response } from "node-fetch"; import { useAgent } from "request-filtering-agent"; diff --git a/shared/.eslintrc b/shared/.eslintrc deleted file mode 100644 index 312064d8f2..0000000000 --- a/shared/.eslintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": [ - "../.eslintrc", - "plugin:react/recommended", - "plugin:react-hooks/recommended" - ], - "plugins": [ - "eslint-plugin-react-hooks" - ], - "rules": { - "@typescript-eslint/no-restricted-imports": ["error", { - "patterns": [{ - "group": ["@shared/*"], - "message": "Use relative imports." - }, { - "allowTypeImports": true, - "group": ["~/*"], - "message": "Do not reference app code from shared code." - }, { - "allowTypeImports": true, - "group": ["@server/*"], - "message": "Do not reference server code from shared code." - }] - }] - }, - "env": { - "jest": true, - "browser": true - } -} diff --git a/shared/.oxlintrc.json b/shared/.oxlintrc.json new file mode 100644 index 0000000000..092a0b9235 --- /dev/null +++ b/shared/.oxlintrc.json @@ -0,0 +1,38 @@ +{ + "extends": ["../.oxlintrc.json"], + "plugins": ["oxc", "eslint", "typescript", "react"], + "overrides": [ + { + "files": ["**/*.{js,jsx,ts,tsx}"], + "rules": { + "no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": ["@shared/*"], + "message": "Use relative imports." + }, + { + "allowTypeImports": true, + "group": ["~/*"], + "message": "Do not reference app code from shared code." + }, + { + "allowTypeImports": true, + "group": ["@server/*"], + "message": "Do not reference server code from shared code." + } + ] + } + ] + }, + "plugins": ["import"] + } + ], + "env": { + "jest": true, + "browser": true, + "node": true + } +} diff --git a/shared/editor/commands/insertFiles.ts b/shared/editor/commands/insertFiles.ts index 2021213140..4f751720a7 100644 --- a/shared/editor/commands/insertFiles.ts +++ b/shared/editor/commands/insertFiles.ts @@ -187,7 +187,7 @@ const insertFiles = async function ( .catch((error) => { Sentry.captureException(error); - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.error(error); if (view.isDestroyed) { diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index f6a1ab84e8..183c791c44 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-irregular-whitespace */ +/* oxlint-disable no-irregular-whitespace */ import { lighten, transparentize } from "polished"; import styled, { DefaultTheme, css, keyframes } from "styled-components"; import { hover } from "../../styles"; diff --git a/shared/editor/extensions/CodeHighlighting.ts b/shared/editor/extensions/CodeHighlighting.ts index d76a6b18b6..238fbda809 100644 --- a/shared/editor/extensions/CodeHighlighting.ts +++ b/shared/editor/extensions/CodeHighlighting.ts @@ -41,7 +41,7 @@ async function loadLanguage(language: string) { }) .catch((err) => { // It will retry loading the language on the next render - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.error( `Failed to load language ${language} for code highlighting`, err diff --git a/shared/editor/lib/markdown/serializer.ts b/shared/editor/lib/markdown/serializer.ts index a71ccbf8f5..8d5f49b542 100644 --- a/shared/editor/lib/markdown/serializer.ts +++ b/shared/editor/lib/markdown/serializer.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ +/* oxlint-disable @typescript-eslint/ban-ts-comment */ // @ts-nocheck // https://raw.githubusercontent.com/ProseMirror/prosemirror-markdown/master/src/to_markdown.js // forked for table support @@ -224,7 +224,7 @@ export class MarkdownSerializerState { return info && info.expelEnclosingWhitespace; }) ) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars + // oxlint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars const [, lead, inner, trail] = /^(\s*)(.*?)(\s*)$/m.exec(node.text); leading += lead; trailing = trail; diff --git a/shared/editor/lib/uploadPlaceholder.tsx b/shared/editor/lib/uploadPlaceholder.tsx index 3db6d99165..e6d8a9b44a 100644 --- a/shared/editor/lib/uploadPlaceholder.tsx +++ b/shared/editor/lib/uploadPlaceholder.tsx @@ -30,7 +30,7 @@ const uploadPlaceholder = new Plugin({ simplifyDiff: true, }).mapping; } catch (err) { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.warn("Failed to recreate transform: ", err); } } diff --git a/shared/editor/rules/mention.ts b/shared/editor/rules/mention.ts index 07b78dba1f..e015bb7e39 100644 --- a/shared/editor/rules/mention.ts +++ b/shared/editor/rules/mention.ts @@ -57,7 +57,7 @@ function parseMentions(state: StateCore) { precToken.content = precToken.content.slice(0, -1); // href must be present, otherwise the hrefRE test in canChunkComposeMentionToken would've failed - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + // oxlint-disable-next-line @typescript-eslint/no-non-null-assertion const href = openToken.attrs![0][1]; const matches = href.match(hrefRE); const [id, mType, mId] = matches!.slice(1); diff --git a/shared/utils/csv.ts b/shared/utils/csv.ts index 262fd7cb61..8c821e5789 100644 --- a/shared/utils/csv.ts +++ b/shared/utils/csv.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-control-regex */ +/* oxlint-disable no-control-regex */ /** * Helper class for CSV operations. diff --git a/shared/utils/date.ts b/shared/utils/date.ts index 5a56c503f3..df26b04adc 100644 --- a/shared/utils/date.ts +++ b/shared/utils/date.ts @@ -1,4 +1,4 @@ -/* eslint-disable import/no-duplicates */ +/* oxlint-disable import/no-duplicates */ import { Locale, addSeconds, diff --git a/shared/utils/emoji.ts b/shared/utils/emoji.ts index ce58c81d24..2df782e49b 100644 --- a/shared/utils/emoji.ts +++ b/shared/utils/emoji.ts @@ -47,7 +47,7 @@ const isFlagEmojiSupported = (): boolean => { let i = 0; // Search the first visible pixel - // eslint-disable-next-line curly + // oxlint-disable-next-line curly for (; i < count && !a[i + 3]; i += 4); // No visible pixel diff --git a/shared/utils/rtl.ts b/shared/utils/rtl.ts index e3844ad283..bea1f55631 100644 --- a/shared/utils/rtl.ts +++ b/shared/utils/rtl.ts @@ -1,7 +1,7 @@ const ltrChars = "A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF"; const rtlChars = "\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC"; -// eslint-disable-next-line no-misleading-character-class +// oxlint-disable-next-line no-misleading-character-class const rtlDirCheck = new RegExp("^[^" + ltrChars + "]*[" + rtlChars + "]"); /** diff --git a/vite.config.ts b/vite.config.ts index da512142db..a1e0f1e701 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,7 +20,7 @@ if (environment.NODE_ENV === "development") { cert: fs.readFileSync("./server/config/certs/public.cert"), }; } catch (_err) { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.warn("No local SSL certs found, HTTPS will not be available"); } }