chore(lint): cleanup minor issues
This commit is contained in:
+4
-5
@@ -14,11 +14,10 @@
|
|||||||
"test:svelte:ui": "pnpm --filter=playwright run test:svelte:ui",
|
"test:svelte:ui": "pnpm --filter=playwright run test:svelte:ui",
|
||||||
"test:react": "pnpm --filter=playwright run test:react",
|
"test:react": "pnpm --filter=playwright run test:react",
|
||||||
"test:react:ui": "pnpm --filter=playwright run test:react:ui",
|
"test:react:ui": "pnpm --filter=playwright run test:react:ui",
|
||||||
"build": "turbo run build",
|
"build:all": "turbo run build",
|
||||||
"build:libs": "turbo run build --filter=./packages/**",
|
"build": "turbo run build --filter=./packages/**",
|
||||||
"test": "turbo run test",
|
"lint": "turbo run lint --filter=./packages/**",
|
||||||
"lint": "turbo run lint",
|
"typecheck": "turbo run typecheck --filter=./packages/**",
|
||||||
"typecheck": "turbo run typecheck",
|
|
||||||
"release": "changeset publish",
|
"release": "changeset publish",
|
||||||
"clean": "pnpm -r --parallel exec rimraf dist .turbo node_modules"
|
"clean": "pnpm -r --parallel exec rimraf dist .turbo node_modules"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"css": "postcss src/styles/{base,style}.css --config ./../../tooling/postcss-config --dir dist",
|
"css": "postcss src/styles/{base,style}.css --config ./../../tooling/postcss-config --dir dist",
|
||||||
"css-watch": "pnpm css --watch",
|
"css-watch": "pnpm css --watch",
|
||||||
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
"lint": "prettier --check . && eslint ./src",
|
||||||
"format": "prettier --plugin-search-dir . --write .",
|
"format": "prettier --write .",
|
||||||
"typecheck": "pnpm check"
|
"typecheck": "pnpm check"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { NodeProps } from '$lib/types';
|
import type { NodeProps } from '$lib/types';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
interface $$Props extends NodeProps {}
|
interface $$Props extends NodeProps {}
|
||||||
|
|
||||||
// this is a workaround for suppressing the warning about unused props
|
// this is a workaround for suppressing the warning about unused props
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
import { getNodesBounds, Position, type Rect, getNodeToolbarTransform } from '@xyflow/system';
|
import { getNodesBounds, Position, getNodeToolbarTransform } from '@xyflow/system';
|
||||||
import portal from '$lib/actions/portal';
|
import portal from '$lib/actions/portal';
|
||||||
import type { InternalNode } from '$lib/types';
|
import type { InternalNode } from '$lib/types';
|
||||||
import { useStore } from '$lib/store';
|
import { useStore } from '$lib/store';
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export function XYMinimap({ domNode, panZoom, getTransform, getViewScale }: XYMi
|
|||||||
zoomable = true,
|
zoomable = true,
|
||||||
inversePan = false,
|
inversePan = false,
|
||||||
}: XYMinimapUpdate) {
|
}: XYMinimapUpdate) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const zoomHandler = (event: D3ZoomEvent<SVGSVGElement, any>) => {
|
const zoomHandler = (event: D3ZoomEvent<SVGSVGElement, any>) => {
|
||||||
const transform = getTransform();
|
const transform = getTransform();
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ export function XYMinimap({ domNode, panZoom, getTransform, getViewScale }: XYMi
|
|||||||
};
|
};
|
||||||
|
|
||||||
let panStart = [0, 0];
|
let panStart = [0, 0];
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const panStartHandler = (event: D3ZoomEvent<HTMLDivElement, any>) => {
|
const panStartHandler = (event: D3ZoomEvent<HTMLDivElement, any>) => {
|
||||||
if (event.sourceEvent.type === 'mousedown' || event.sourceEvent.type === 'touchstart') {
|
if (event.sourceEvent.type === 'mousedown' || event.sourceEvent.type === 'touchstart') {
|
||||||
panStart = [
|
panStart = [
|
||||||
@@ -64,6 +66,7 @@ export function XYMinimap({ domNode, panZoom, getTransform, getViewScale }: XYMi
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const panHandler = (event: D3ZoomEvent<HTMLDivElement, any>) => {
|
const panHandler = (event: D3ZoomEvent<HTMLDivElement, any>) => {
|
||||||
const transform = getTransform();
|
const transform = getTransform();
|
||||||
|
|
||||||
@@ -101,8 +104,10 @@ export function XYMinimap({ domNode, panZoom, getTransform, getViewScale }: XYMi
|
|||||||
|
|
||||||
const zoomAndPanHandler = zoom()
|
const zoomAndPanHandler = zoom()
|
||||||
.on('start', panStartHandler)
|
.on('start', panStartHandler)
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.on('zoom', pannable ? panHandler : null)
|
.on('zoom', pannable ? panHandler : null)
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.on('zoom.wheel', zoomable ? zoomHandler : null);
|
.on('zoom.wheel', zoomable ? zoomHandler : null);
|
||||||
|
|
||||||
|
|||||||
Generated
+10
-10
@@ -444,10 +444,10 @@ importers:
|
|||||||
specifier: ^8.5.0
|
specifier: ^8.5.0
|
||||||
version: 8.8.0(eslint@8.43.0)
|
version: 8.8.0(eslint@8.43.0)
|
||||||
eslint-config-turbo:
|
eslint-config-turbo:
|
||||||
specifier: latest
|
specifier: ^2.0.3
|
||||||
version: 1.10.15(eslint@8.43.0)
|
version: 2.0.3(eslint@8.43.0)
|
||||||
eslint-plugin-react:
|
eslint-plugin-react:
|
||||||
specifier: latest
|
specifier: ^7.33.2
|
||||||
version: 7.33.2(eslint@8.43.0)
|
version: 7.33.2(eslint@8.43.0)
|
||||||
|
|
||||||
tooling/rollup-config:
|
tooling/rollup-config:
|
||||||
@@ -2923,8 +2923,8 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '>=7.0.0'
|
eslint: '>=7.0.0'
|
||||||
|
|
||||||
eslint-config-turbo@1.10.15:
|
eslint-config-turbo@2.0.3:
|
||||||
resolution: {integrity: sha512-76mpx2x818JZE26euen14utYcFDxOahZ9NaWA+6Xa4pY2ezVKVschuOxS96EQz3o3ZRSmcgBOapw/gHbN+EKxQ==}
|
resolution: {integrity: sha512-D1+lNOpTFEuAgPWJfRHXHjzvAfO+0TVmORfftmYQNw+uk2UIBjhelhwERBceYFy2oFJnckHsqt69dp/zIM6/0g==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '>6.6.0'
|
eslint: '>6.6.0'
|
||||||
|
|
||||||
@@ -2965,8 +2965,8 @@ packages:
|
|||||||
svelte:
|
svelte:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
eslint-plugin-turbo@1.10.15:
|
eslint-plugin-turbo@2.0.3:
|
||||||
resolution: {integrity: sha512-Tv4QSKV/U56qGcTqS/UgOvb9HcKFmWOQcVh3HEaj7of94lfaENgfrtK48E2CckQf7amhKs1i+imhCsNCKjkQyA==}
|
resolution: {integrity: sha512-mplP4nYaRvtTNuwF5QTLYKLu0/8LTRsHPgX4ARhaof+QZI2ttglONe1/iJpKB4pg0KqFp7WHziKoJL+s0+CJ1w==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '>6.6.0'
|
eslint: '>6.6.0'
|
||||||
|
|
||||||
@@ -8980,10 +8980,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
|
|
||||||
eslint-config-turbo@1.10.15(eslint@8.43.0):
|
eslint-config-turbo@2.0.3(eslint@8.43.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 8.43.0
|
eslint: 8.43.0
|
||||||
eslint-plugin-turbo: 1.10.15(eslint@8.43.0)
|
eslint-plugin-turbo: 2.0.3(eslint@8.43.0)
|
||||||
|
|
||||||
eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0(eslint@8.43.0))(eslint@8.43.0)(prettier@2.8.8):
|
eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0(eslint@8.43.0))(eslint@8.43.0)(prettier@2.8.8):
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -9055,7 +9055,7 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- ts-node
|
- ts-node
|
||||||
|
|
||||||
eslint-plugin-turbo@1.10.15(eslint@8.43.0):
|
eslint-plugin-turbo@2.0.3(eslint@8.43.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
dotenv: 16.0.3
|
dotenv: 16.0.3
|
||||||
eslint: 8.43.0
|
eslint: 8.43.0
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.22.0",
|
"eslint": "^8.22.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-config-turbo": "latest",
|
"eslint-config-turbo": "^2.0.3",
|
||||||
"eslint-plugin-react": "latest"
|
"eslint-plugin-react": "^7.33.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user