mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
chore(deps-dev): bump oxlint-tsgolint from 0.14.2 to 0.22.1 (#12320)
* chore(deps-dev): bump oxlint-tsgolint from 0.14.2 to 0.22.1 Bumps [oxlint-tsgolint](https://github.com/oxc-project/tsgolint) from 0.14.2 to 0.22.1. - [Release notes](https://github.com/oxc-project/tsgolint/releases) - [Commits](https://github.com/oxc-project/tsgolint/compare/v0.14.2...v0.22.1) --- updated-dependencies: - dependency-name: oxlint-tsgolint dependency-version: 0.22.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: Switch tsconfig to bundler resolution for tsgolint 0.22.1 oxlint-tsgolint 0.22.1 removed support for moduleResolution=node10 (the alias for "node"). Switch to "bundler" with resolvePackageJsonExports disabled so packages whose exports field omits a types condition still resolve. Update markdown-it type imports to sub-paths since the package's .d.mts entry only re-exports a subset of named types. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: Resolve type-aware lint errors caught by tsgolint 0.22.1 oxlint-tsgolint 0.22.1 catches several await-thenable, no-floating-promises, and no-meaningless-void-operator cases the prior 0.14.2 missed: - Drop redundant inner `await` from Promise.all([await x, await y]) call sites so the array entries are real Promises rather than already-resolved values. - Replace Promise.all wrappers around synchronous presenters (presentEvent, presentTemplate, presentPublicTeam) with plain map / direct calls. - Wrap non-promise branches of ternaries inside Promise.all with Promise.resolve so the array remains thenable across both arms. - Add `void` to the unawaited provider.connect() in the auth-failed retry chain, and remove `void` from the disconnect() call which returns void. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -130,7 +130,7 @@ function MultiplayerEditor(
|
|||||||
.fetchAuth()
|
.fetchAuth()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
provider.setConfiguration({ token: auth.collaborationToken });
|
provider.setConfiguration({ token: auth.collaborationToken });
|
||||||
provider.connect();
|
void provider.connect();
|
||||||
provider.shouldConnect = true;
|
provider.shouldConnect = true;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -284,7 +284,7 @@ function MultiplayerEditor(
|
|||||||
!isVisible &&
|
!isVisible &&
|
||||||
remoteProvider.status === WebSocketStatus.Connected
|
remoteProvider.status === WebSocketStatus.Connected
|
||||||
) {
|
) {
|
||||||
void remoteProvider.disconnect();
|
remoteProvider.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
+1
-1
@@ -363,7 +363,7 @@
|
|||||||
"msw": "^2.14.2",
|
"msw": "^2.14.2",
|
||||||
"nodemon": "^3.1.14",
|
"nodemon": "^3.1.14",
|
||||||
"oxlint": "1.50.0",
|
"oxlint": "1.50.0",
|
||||||
"oxlint-tsgolint": "0.14.2",
|
"oxlint-tsgolint": "0.22.1",
|
||||||
"postinstall-postinstall": "^2.1.0",
|
"postinstall-postinstall": "^2.1.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"react-refresh": "^0.18.0",
|
"react-refresh": "^0.18.0",
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class GroupMembership extends ParanoidModel<
|
|||||||
memberships.map((membership) =>
|
memberships.map((membership) =>
|
||||||
membership?.sourceId
|
membership?.sourceId
|
||||||
? this.findByPk(membership.sourceId, options)
|
? this.findByPk(membership.sourceId, options)
|
||||||
: membership
|
: Promise.resolve(membership)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class UserMembership extends IdModel<
|
|||||||
memberships.map((membership) =>
|
memberships.map((membership) =>
|
||||||
membership?.sourceId
|
membership?.sourceId
|
||||||
? this.findByPk(membership.sourceId, options)
|
? this.findByPk(membership.sourceId, options)
|
||||||
: membership
|
: Promise.resolve(membership)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ router.post(
|
|||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
pagination: ctx.state.pagination,
|
pagination: ctx.state.pagination,
|
||||||
data: await Promise.all(
|
data: loadedEvents.map((event) => presentEvent(event, auditLog)),
|
||||||
loadedEvents.map((event) => presentEvent(event, auditLog))
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -105,11 +105,11 @@ describe("#imports.list", () => {
|
|||||||
it("should list all imports", async () => {
|
it("should list all imports", async () => {
|
||||||
const admin = await buildAdmin();
|
const admin = await buildAdmin();
|
||||||
const [importOne, importTwo] = await Promise.all([
|
const [importOne, importTwo] = await Promise.all([
|
||||||
await buildImport({
|
buildImport({
|
||||||
createdById: admin.id,
|
createdById: admin.id,
|
||||||
teamId: admin.teamId,
|
teamId: admin.teamId,
|
||||||
}),
|
}),
|
||||||
await buildImport({
|
buildImport({
|
||||||
createdById: admin.id,
|
createdById: admin.id,
|
||||||
teamId: admin.teamId,
|
teamId: admin.teamId,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ router.post(
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [integrations, total] = await Promise.all([
|
const [integrations, total] = await Promise.all([
|
||||||
await Integration.findAll({
|
Integration.findAll({
|
||||||
where,
|
where,
|
||||||
order: [[sort, direction]],
|
order: [[sort, direction]],
|
||||||
offset: ctx.state.pagination.offset,
|
offset: ctx.state.pagination.offset,
|
||||||
|
|||||||
@@ -80,27 +80,26 @@ router.post(
|
|||||||
|
|
||||||
const team = teamFromCtx?.id === share.teamId ? teamFromCtx : share.team;
|
const team = teamFromCtx?.id === share.teamId ? teamFromCtx : share.team;
|
||||||
|
|
||||||
const [serializedCollection, serializedDocument, serializedTeam] =
|
const [serializedCollection, serializedDocument] = await Promise.all([
|
||||||
await Promise.all([
|
collection
|
||||||
collection
|
? presentCollection(ctx, collection, {
|
||||||
? await presentCollection(ctx, collection, {
|
isPublic: cannot(user, "read", collection),
|
||||||
isPublic: cannot(user, "read", collection),
|
shareId: share.id,
|
||||||
shareId: share.id,
|
includeUpdatedAt: share.showLastUpdated,
|
||||||
includeUpdatedAt: share.showLastUpdated,
|
})
|
||||||
})
|
: Promise.resolve(null),
|
||||||
: null,
|
document
|
||||||
document
|
? presentDocument(ctx, document, {
|
||||||
? await presentDocument(ctx, document, {
|
isPublic: cannot(user, "read", document),
|
||||||
isPublic: cannot(user, "read", document),
|
shareId: share.id,
|
||||||
shareId: share.id,
|
includeUpdatedAt: share.showLastUpdated,
|
||||||
includeUpdatedAt: share.showLastUpdated,
|
})
|
||||||
})
|
: Promise.resolve(null),
|
||||||
: null,
|
]);
|
||||||
presentPublicTeam(
|
const serializedTeam = presentPublicTeam(
|
||||||
team,
|
team,
|
||||||
!!team.getPreference(TeamPreference.PublicBranding)
|
!!team.getPreference(TeamPreference.PublicBranding)
|
||||||
),
|
);
|
||||||
]);
|
|
||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -124,9 +124,7 @@ router.post(
|
|||||||
Template.count({ where }),
|
Template.count({ where }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const data = await Promise.all(
|
const data = templates.map((template) => presentTemplate(template));
|
||||||
templates.map((template) => presentTemplate(template))
|
|
||||||
);
|
|
||||||
const policies = presentPolicies(user, templates);
|
const policies = presentPolicies(user, templates);
|
||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
|
|||||||
@@ -49,18 +49,18 @@ describe("permissions", () => {
|
|||||||
});
|
});
|
||||||
const group = await buildGroup();
|
const group = await buildGroup();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await buildGroupUser({
|
buildGroupUser({
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
}),
|
}),
|
||||||
await UserMembership.create({
|
UserMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
permission: DocumentPermission.Read,
|
permission: DocumentPermission.Read,
|
||||||
}),
|
}),
|
||||||
await GroupMembership.create({
|
GroupMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
@@ -89,18 +89,18 @@ describe("permissions", () => {
|
|||||||
});
|
});
|
||||||
const group = await buildGroup();
|
const group = await buildGroup();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await buildGroupUser({
|
buildGroupUser({
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
}),
|
}),
|
||||||
await UserMembership.create({
|
UserMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
permission: DocumentPermission.Read,
|
permission: DocumentPermission.Read,
|
||||||
}),
|
}),
|
||||||
await GroupMembership.create({
|
GroupMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
@@ -129,18 +129,18 @@ describe("permissions", () => {
|
|||||||
});
|
});
|
||||||
const group = await buildGroup();
|
const group = await buildGroup();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await buildGroupUser({
|
buildGroupUser({
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
}),
|
}),
|
||||||
await UserMembership.create({
|
UserMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
permission: DocumentPermission.Read,
|
permission: DocumentPermission.Read,
|
||||||
}),
|
}),
|
||||||
await GroupMembership.create({
|
GroupMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
@@ -216,18 +216,18 @@ describe("permissions", () => {
|
|||||||
});
|
});
|
||||||
const group = await buildGroup();
|
const group = await buildGroup();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await buildGroupUser({
|
buildGroupUser({
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
}),
|
}),
|
||||||
await UserMembership.create({
|
UserMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
permission: DocumentPermission.Read,
|
permission: DocumentPermission.Read,
|
||||||
}),
|
}),
|
||||||
await GroupMembership.create({
|
GroupMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
@@ -255,18 +255,18 @@ describe("permissions", () => {
|
|||||||
});
|
});
|
||||||
const group = await buildGroup();
|
const group = await buildGroup();
|
||||||
const [, , groupMembership] = await Promise.all([
|
const [, , groupMembership] = await Promise.all([
|
||||||
await buildGroupUser({
|
buildGroupUser({
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
}),
|
}),
|
||||||
await UserMembership.create({
|
UserMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
permission: DocumentPermission.Read,
|
permission: DocumentPermission.Read,
|
||||||
}),
|
}),
|
||||||
await GroupMembership.create({
|
GroupMembership.create({
|
||||||
createdById: user.id,
|
createdById: user.id,
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import type { PluginSimple } from "markdown-it";
|
import markdownit, {
|
||||||
import markdownit from "markdown-it";
|
type Options as MarkdownItOptions,
|
||||||
|
type PluginSimple,
|
||||||
|
} from "markdown-it";
|
||||||
import type { Schema } from "prosemirror-model";
|
import type { Schema } from "prosemirror-model";
|
||||||
|
|
||||||
type Options = {
|
type Options = {
|
||||||
/** Markdown-it options. */
|
/** Markdown-it options. */
|
||||||
rules?: markdownit.Options;
|
rules?: MarkdownItOptions;
|
||||||
/** Markdown-it plugins. */
|
/** Markdown-it plugins. */
|
||||||
plugins?: PluginSimple[];
|
plugins?: PluginSimple[];
|
||||||
/** The schema for associated editor. */
|
/** The schema for associated editor. */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { InputRule } from "prosemirror-inputrules";
|
import { InputRule } from "prosemirror-inputrules";
|
||||||
import type { MarkdownSerializerState } from "prosemirror-markdown";
|
import type { MarkdownSerializerState } from "prosemirror-markdown";
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { DownloadIcon } from "outline-icons";
|
import { DownloadIcon } from "outline-icons";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
Node as ProsemirrorNode,
|
Node as ProsemirrorNode,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import copy from "copy-to-clipboard";
|
import copy from "copy-to-clipboard";
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { textblockTypeInputRule } from "prosemirror-inputrules";
|
import { textblockTypeInputRule } from "prosemirror-inputrules";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import {
|
import {
|
||||||
Fragment,
|
Fragment,
|
||||||
Slice,
|
Slice,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
Node as ProsemirrorNode,
|
Node as ProsemirrorNode,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { InputRule } from "prosemirror-inputrules";
|
import { InputRule } from "prosemirror-inputrules";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { InputRule } from "prosemirror-inputrules";
|
import { InputRule } from "prosemirror-inputrules";
|
||||||
import type {
|
import type {
|
||||||
Node as ProsemirrorNode,
|
Node as ProsemirrorNode,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { isMatch } from "es-toolkit/compat";
|
import { isMatch } from "es-toolkit/compat";
|
||||||
import { sanitizeUrl } from "../../utils/urls";
|
import { sanitizeUrl } from "../../utils/urls";
|
||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
Node as ProsemirrorNode,
|
Node as ProsemirrorNode,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { WarningIcon, InfoIcon, StarredIcon, DoneIcon } from "outline-icons";
|
import { WarningIcon, InfoIcon, StarredIcon, DoneIcon } from "outline-icons";
|
||||||
import { wrappingInputRule } from "prosemirror-inputrules";
|
import { wrappingInputRule } from "prosemirror-inputrules";
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { PluginSimple, Token } from "markdown-it";
|
import type { PluginSimple } from "markdown-it";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
NodeType,
|
NodeType,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { InputRule } from "prosemirror-inputrules";
|
import { InputRule } from "prosemirror-inputrules";
|
||||||
import type {
|
import type {
|
||||||
Node as ProsemirrorNode,
|
Node as ProsemirrorNode,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import {
|
import {
|
||||||
type Node as ProsemirrorNode,
|
type Node as ProsemirrorNode,
|
||||||
type NodeSpec,
|
type NodeSpec,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type { NodeSpec } from "prosemirror-model";
|
import type { NodeSpec } from "prosemirror-model";
|
||||||
import type { EditorState } from "prosemirror-state";
|
import type { EditorState } from "prosemirror-state";
|
||||||
import { Plugin, PluginKey } from "prosemirror-state";
|
import { Plugin, PluginKey } from "prosemirror-state";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import type { Token } from "markdown-it";
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import type {
|
import type {
|
||||||
NodeSpec,
|
NodeSpec,
|
||||||
NodeType,
|
NodeType,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Token } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
|
|
||||||
function isOldHardBreak(token: Token) {
|
function isOldHardBreak(token: Token) {
|
||||||
return token.type === "text" && token.content === "\\";
|
return token.type === "text" && token.content === "\\";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Token } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
|
|
||||||
const CHECKBOX_REGEX = /\[(X|\s|_|-)\]\s(.*)?/i;
|
const CHECKBOX_REGEX = /\[(X|\s|_|-)\]\s(.*)?/i;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { StateInline } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type StateInline from "markdown-it/lib/rules_inline/state_inline.mjs";
|
||||||
import { full as emojiPlugin } from "markdown-it-emoji";
|
import { full as emojiPlugin } from "markdown-it-emoji";
|
||||||
import { isUUID } from "validator";
|
import { isUUID } from "validator";
|
||||||
import { nameToEmoji } from "../lib/emoji";
|
import { nameToEmoji } from "../lib/emoji";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Token } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import env from "../../env";
|
import env from "../../env";
|
||||||
|
|
||||||
function isParagraph(token: Token) {
|
function isParagraph(token: Token) {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
// Adapted from:
|
// Adapted from:
|
||||||
// https://github.com/markdown-it/markdown-it-mark/blob/master/index.js
|
// https://github.com/markdown-it/markdown-it-mark/blob/master/index.js
|
||||||
|
|
||||||
import type { StateInline } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type StateInline from "markdown-it/lib/rules_inline/state_inline.mjs";
|
||||||
|
import type { Delimiter } from "markdown-it/lib/rules_inline/state_inline.mjs";
|
||||||
|
|
||||||
export default function (options: { delim: string; mark: string }) {
|
export default function (options: { delim: string; mark: string }) {
|
||||||
const delimCharCode = options.delim.charCodeAt(0);
|
const delimCharCode = options.delim.charCodeAt(0);
|
||||||
@@ -62,7 +63,7 @@ export default function (options: { delim: string; mark: string }) {
|
|||||||
//
|
//
|
||||||
function postProcess(
|
function postProcess(
|
||||||
state: StateInline,
|
state: StateInline,
|
||||||
delimiters: StateInline.Delimiter[]
|
delimiters: Delimiter[]
|
||||||
) {
|
) {
|
||||||
let i = 0,
|
let i = 0,
|
||||||
j,
|
j,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { StateBlock, StateInline } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type StateBlock from "markdown-it/lib/rules_block/state_block.mjs";
|
||||||
|
import type StateInline from "markdown-it/lib/rules_inline/state_inline.mjs";
|
||||||
|
|
||||||
export const REGEX_INLINE_MATH_DOLLARS = /\$\$(.+)\$\$$/;
|
export const REGEX_INLINE_MATH_DOLLARS = /\$\$(.+)\$\$$/;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Token, StateCore } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type StateCore from "markdown-it/lib/rules_core/state_core.mjs";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import parseMentionUrl from "@shared/utils/parseMentionUrl";
|
import parseMentionUrl from "@shared/utils/parseMentionUrl";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Token } from "markdown-it";
|
|
||||||
import type MarkdownIt from "markdown-it";
|
import type MarkdownIt from "markdown-it";
|
||||||
|
import type Token from "markdown-it/lib/token.mjs";
|
||||||
import customFence from "markdown-it-container";
|
import customFence from "markdown-it-container";
|
||||||
|
|
||||||
export default function notice(md: MarkdownIt): void {
|
export default function notice(md: MarkdownIt): void {
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,8 @@
|
|||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"lib": ["dom", "es2020", "dom.iterable", "esnext.asynciterable"],
|
"lib": ["dom", "es2020", "dom.iterable", "esnext.asynciterable"],
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "bundler",
|
||||||
|
"resolvePackageJsonExports": false,
|
||||||
"noErrorTruncation": true,
|
"noErrorTruncation": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"noImplicitOverride": false,
|
"noImplicitOverride": false,
|
||||||
|
|||||||
@@ -4190,44 +4190,44 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/darwin-arm64@npm:0.14.2":
|
"@oxlint-tsgolint/darwin-arm64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/darwin-arm64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/darwin-arm64@npm:0.22.1"
|
||||||
conditions: os=darwin & cpu=arm64
|
conditions: os=darwin & cpu=arm64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/darwin-x64@npm:0.14.2":
|
"@oxlint-tsgolint/darwin-x64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/darwin-x64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/darwin-x64@npm:0.22.1"
|
||||||
conditions: os=darwin & cpu=x64
|
conditions: os=darwin & cpu=x64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/linux-arm64@npm:0.14.2":
|
"@oxlint-tsgolint/linux-arm64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/linux-arm64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/linux-arm64@npm:0.22.1"
|
||||||
conditions: os=linux & cpu=arm64
|
conditions: os=linux & cpu=arm64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/linux-x64@npm:0.14.2":
|
"@oxlint-tsgolint/linux-x64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/linux-x64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/linux-x64@npm:0.22.1"
|
||||||
conditions: os=linux & cpu=x64
|
conditions: os=linux & cpu=x64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/win32-arm64@npm:0.14.2":
|
"@oxlint-tsgolint/win32-arm64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/win32-arm64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/win32-arm64@npm:0.22.1"
|
||||||
conditions: os=win32 & cpu=arm64
|
conditions: os=win32 & cpu=arm64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint-tsgolint/win32-x64@npm:0.14.2":
|
"@oxlint-tsgolint/win32-x64@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "@oxlint-tsgolint/win32-x64@npm:0.14.2"
|
resolution: "@oxlint-tsgolint/win32-x64@npm:0.22.1"
|
||||||
conditions: os=win32 & cpu=x64
|
conditions: os=win32 & cpu=x64
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
@@ -15899,7 +15899,7 @@ __metadata:
|
|||||||
octokit: "npm:^3.2.2"
|
octokit: "npm:^3.2.2"
|
||||||
outline-icons: "npm:^4.3.0"
|
outline-icons: "npm:^4.3.0"
|
||||||
oxlint: "npm:1.50.0"
|
oxlint: "npm:1.50.0"
|
||||||
oxlint-tsgolint: "npm:0.14.2"
|
oxlint-tsgolint: "npm:0.22.1"
|
||||||
oy-vey: "npm:^0.12.1"
|
oy-vey: "npm:^0.12.1"
|
||||||
pako: "npm:^2.1.0"
|
pako: "npm:^2.1.0"
|
||||||
passport: "npm:^0.7.0"
|
passport: "npm:^0.7.0"
|
||||||
@@ -16095,16 +16095,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"oxlint-tsgolint@npm:0.14.2":
|
"oxlint-tsgolint@npm:0.22.1":
|
||||||
version: 0.14.2
|
version: 0.22.1
|
||||||
resolution: "oxlint-tsgolint@npm:0.14.2"
|
resolution: "oxlint-tsgolint@npm:0.22.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@oxlint-tsgolint/darwin-arm64": "npm:0.14.2"
|
"@oxlint-tsgolint/darwin-arm64": "npm:0.22.1"
|
||||||
"@oxlint-tsgolint/darwin-x64": "npm:0.14.2"
|
"@oxlint-tsgolint/darwin-x64": "npm:0.22.1"
|
||||||
"@oxlint-tsgolint/linux-arm64": "npm:0.14.2"
|
"@oxlint-tsgolint/linux-arm64": "npm:0.22.1"
|
||||||
"@oxlint-tsgolint/linux-x64": "npm:0.14.2"
|
"@oxlint-tsgolint/linux-x64": "npm:0.22.1"
|
||||||
"@oxlint-tsgolint/win32-arm64": "npm:0.14.2"
|
"@oxlint-tsgolint/win32-arm64": "npm:0.22.1"
|
||||||
"@oxlint-tsgolint/win32-x64": "npm:0.14.2"
|
"@oxlint-tsgolint/win32-x64": "npm:0.22.1"
|
||||||
dependenciesMeta:
|
dependenciesMeta:
|
||||||
"@oxlint-tsgolint/darwin-arm64":
|
"@oxlint-tsgolint/darwin-arm64":
|
||||||
optional: true
|
optional: true
|
||||||
@@ -16120,7 +16120,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
tsgolint: bin/tsgolint.js
|
tsgolint: bin/tsgolint.js
|
||||||
checksum: 10c0/e228bd7de9614b1cfda73ed47bc4387c77412eb1e81e34751942d4e043af80a28405521e378b7859f897ddc1aa29599ecca1dd778daa38edef1bf714ff991d8f
|
checksum: 10c0/1f2e3840993e85ebe73f394e7e7441c1482aa4c7da38408c5887e2635be64a577edc887688c8a5232e9f3c8b963fbcecec93036e5fbf2fb863784175e1336aa4
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user