chore(root): migrate to biome
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import Script from 'next/script';
|
||||
import React from 'react';
|
||||
|
||||
import type {
|
||||
DecrementPayload,
|
||||
@@ -100,7 +100,7 @@ export function useOpenPanel() {
|
||||
}
|
||||
|
||||
function track(name: string, properties?: TrackProperties) {
|
||||
window.op && window.op('track', name, properties);
|
||||
window.op?.('track', name, properties);
|
||||
}
|
||||
|
||||
function screenView(properties: TrackProperties) {
|
||||
@@ -108,11 +108,11 @@ function screenView(properties: TrackProperties) {
|
||||
}
|
||||
|
||||
function identify(payload: IdentifyPayload) {
|
||||
window.op && window.op('identify', payload);
|
||||
window.op?.('identify', payload);
|
||||
}
|
||||
|
||||
function increment(payload: IncrementPayload) {
|
||||
window.op && window.op('increment', payload);
|
||||
window.op?.('increment', payload);
|
||||
}
|
||||
|
||||
function decrement(payload: DecrementPayload) {
|
||||
@@ -120,5 +120,5 @@ function decrement(payload: DecrementPayload) {
|
||||
}
|
||||
|
||||
function clear() {
|
||||
window.op && window.op('clear');
|
||||
window.op?.('clear');
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
"module": "index.ts",
|
||||
"scripts": {
|
||||
"build": "rm -rf dist && tsup",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --check \"**/*.{mjs,ts,md,json}\"",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -17,20 +15,9 @@
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openpanel/eslint-config": "workspace:*",
|
||||
"@openpanel/prettier-config": "workspace:*",
|
||||
"@openpanel/tsconfig": "workspace:*",
|
||||
"@types/react": "^18.2.20",
|
||||
"eslint": "^8.48.0",
|
||||
"prettier": "^3.0.3",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"@openpanel/eslint-config/base"
|
||||
]
|
||||
},
|
||||
"prettier": "@openpanel/prettier-config"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
import config from '@openpanel/tsconfig/tsup.config.json' assert { type: 'json' };
|
||||
import config from '@openpanel/tsconfig/tsup.config.json' assert {
|
||||
type: 'json',
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
...(config as any),
|
||||
|
||||
Reference in New Issue
Block a user