Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build": "tsc && tsdown",
"dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 30",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const EditorBubbleMenu: FC<Props> = (props) => {
if (menuRef.current?.contains(e.target as Node)) return;

function handleMouseMove() {
if (!editor.state.selection.empty) {
if (!editor?.state.selection.empty) {
setIsSelecting(true);
document.removeEventListener("mousemove", handleMouseMove);
}
Expand All @@ -175,6 +175,8 @@ export const EditorBubbleMenu: FC<Props> = (props) => {
};
}, [editor]);

if (!editor) return null;

return (
<BubbleMenu {...bubbleMenuProps}>
{!isSelecting && (
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/mentions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CORE_EXTENSIONS } from "@/constants/extension";
import { updateFloatingUIFloaterPosition } from "@/helpers/floating-ui";
import { CommandListInstance, DROPDOWN_NAVIGATION_KEYS } from "@/helpers/tippy";
// types
import { TMentionHandler } from "@/types";
import type { TMentionHandler } from "@/types";
// local components
import { MentionsListDropdown, MentionsListDropdownProps } from "./mentions-list-dropdown";

Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/plugins/file/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const TrackFileRestorationPlugin = (editor: Editor, restoreHandler: TFile
const nodeType = node.type.name as keyof NodeFileMapType;
const isAValidNode = NODE_FILE_MAP[nodeType];
// if the node doesn't match, then return as no point in checking
if (!isAValidNode) return;
if (!isAValidNode || !nodeType) return;
if (pos < 0 || pos > newState.doc.content.size) return;
if (oldFileSources[nodeType]?.has(node.attrs.src)) return;
// update assets list storage value
Expand Down
8 changes: 2 additions & 6 deletions packages/editor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
"module": "ES2022",
"moduleResolution": "Bundler",
"noEmit": true,
"strict": true,
"skipLibCheck": true,
"sourceMap": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/core/*"],
"@/styles/*": ["./src/styles/*"],
"@/plane-editor/*": ["./src/ce/*"]
},
"strictNullChecks": true,
"allowSyntheticDefaultImports": true
}
},
"include": ["src/**/*", "index.d.ts"],
"exclude": ["dist", "build", "node_modules"]
"include": ["src/**/*", "index.d.ts"]
}
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "tsdown",
"dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 6",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
6 changes: 2 additions & 4 deletions packages/hooks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"jsx": "react",
"lib": ["esnext", "dom"]
"noEmit": true
},
"include": ["./src"],
"exclude": ["dist", "build", "node_modules"]
"include": ["./src"]
}
10 changes: 5 additions & 5 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"license": "AGPL-3.0",
"description": "I18n shared across multiple apps internally",
"private": true,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand All @@ -13,7 +16,7 @@
},
"scripts": {
"dev": "tsdown --watch",
"build": "tsdown",
"build": "tsc && tsdown",
"check:lint": "eslint . --max-warnings 2",
"check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand All @@ -37,8 +40,5 @@
"@types/react": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
}
8 changes: 3 additions & 5 deletions packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"jsx": "react",
"lib": ["esnext", "dom"],
"resolveJsonModule": true
"resolveJsonModule": true,
"noEmit": true
},
"include": ["./src"],
"exclude": ["dist", "build", "node_modules"]
"include": ["./src"]
}
2 changes: 1 addition & 1 deletion packages/propel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "tsdown --watch",
"build": "tsdown",
"check:lint": "eslint . --max-warnings 7",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
6 changes: 2 additions & 4 deletions packages/propel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"jsx": "react-jsx",
"lib": ["esnext", "dom"]
"noEmit": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
"include": ["src"]
}
5 changes: 2 additions & 3 deletions packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.1.0",
"license": "AGPL-3.0",
"private": true,
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
Expand All @@ -12,10 +11,10 @@
"./package.json": "./package.json"
},
"scripts": {
"build": "tsdown",
"build": "tsc && tsdown",
"dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 62",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
6 changes: 2 additions & 4 deletions packages/services/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"jsx": "react",
"lib": ["esnext", "dom"]
"noEmit": true
},
"include": ["./src"],
"exclude": ["dist", "build", "node_modules"]
"include": ["./src"]
}
2 changes: 1 addition & 1 deletion packages/shared-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"types": "./src/index.ts",
"scripts": {
"check:lint": "eslint . --max-warnings 4",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
6 changes: 2 additions & 4 deletions packages/shared-state/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"jsx": "react",
"lib": ["esnext", "dom"],
"noEmit": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["./src"],
"exclude": ["dist", "build", "node_modules"]
"include": ["./src"]
}
3 changes: 2 additions & 1 deletion packages/typescript-config/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"esModuleInterop": true,
"incremental": false,
"isolatedModules": true,
"lib": ["es2022", "DOM", "DOM.Iterable"],
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"module": "NodeNext",
"moduleDetection": "force",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"target": "ES2022"
}
}
5 changes: 4 additions & 1 deletion packages/typescript-config/react-library.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./base.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"module": "Preserve",
"moduleResolution": "bundler",
"jsx": "react-jsx"
}
},
"exclude": ["dist", "build", "node_modules"]
}
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"./package.json": "./package.json"
},
"scripts": {
"build": "tsdown",
"build": "tsc && tsdown",
"dev": "tsdown --watch",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
"check:lint": "eslint . --max-warnings 94",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
12 changes: 3 additions & 9 deletions packages/ui/src/sortable/draggable.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { combine } from "@atlaskit/pragmatic-drag-and-drop/dist/cjs/entry-point/combine.js";
import {
draggable,
dropTargetForElements,
} from "@atlaskit/pragmatic-drag-and-drop/dist/cjs/entry-point/element/adapter.js";
import {
attachClosestEdge,
extractClosestEdge,
} from "@atlaskit/pragmatic-drag-and-drop-hitbox/dist/cjs/closest-edge.js";
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
import { isEqual } from "lodash-es";
import React, { useEffect, useRef, useState } from "react";
import { DropIndicator } from "../drop-indicator";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/sortable/sortable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/dist/cjs/entry-point/element/adapter.js";
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
import React, { Fragment, useEffect, useMemo } from "react";
import { Draggable } from "./draggable";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"include": ["src"],
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"esModuleInterop": true
"noEmit": true
}
}
4 changes: 2 additions & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"./package.json": "./package.json"
},
"scripts": {
"build": "tsdown",
"build": "tsc && tsdown",
"dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 20",
"check:types": "tsc --noEmit",
"check:types": "tsc",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
"fix:lint": "eslint . --fix",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "@plane/typescript-config/react-library.json",
"compilerOptions": {
"noEmit": true
},
"include": ["./src"],
"exclude": ["dist", "build", "node_modules"]
}
Loading
Loading