chore(root): migrate to biome
This commit is contained in:
3
apps/docs/.gitignore
vendored
3
apps/docs/.gitignore
vendored
@@ -26,9 +26,6 @@ next-env.d.ts
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# local env files
|
||||
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
|
||||
|
||||
@@ -21,7 +21,6 @@ COPY package.json package.json
|
||||
COPY pnpm-lock.yaml pnpm-lock.yaml
|
||||
COPY pnpm-workspace.yaml pnpm-workspace.yaml
|
||||
COPY apps/docs/package.json apps/docs/package.json
|
||||
COPY patches patches
|
||||
|
||||
# BUILD
|
||||
FROM base AS build
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
"dev": "rm -rf .next && pnpm with-env next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --check \"**/*.{tsx,mjs,ts,md,json}\"",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"with-env": "dotenv -e ../../.env -c --"
|
||||
},
|
||||
@@ -19,28 +17,13 @@
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openpanel/eslint-config": "workspace:*",
|
||||
"@openpanel/prettier-config": "workspace:*",
|
||||
"@openpanel/tsconfig": "workspace:*",
|
||||
"@types/node": "^18.16.0",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
||||
"@typescript-eslint/parser": "^6.6.0",
|
||||
"autoprefixer": "^10.4.18",
|
||||
"eslint": "^8.48.0",
|
||||
"postcss": "^8.4.35",
|
||||
"prettier": "^3.0.3",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"@openpanel/eslint-config/base",
|
||||
"@openpanel/eslint-config/react",
|
||||
"@openpanel/eslint-config/nextjs"
|
||||
]
|
||||
},
|
||||
"prettier": "@openpanel/prettier-config"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ module.exports = {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
- `trackScreenViews` - If true, the library will automatically track screen views (default: false)
|
||||
- `trackOutgoingLinks` - If true, the library will automatically track outgoing links (default: false)
|
||||
- `trackAttributes` - If true, you can trigger events by using html attributes (`<button data-track="your_event" />`) (default: false)
|
||||
- `trackAttributes` - If true, you can trigger events by using html attributes (`<button type="button" data-track="your_event" />`) (default: false)
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
"title": "Documentation",
|
||||
"type": "page"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
"sdks": "SDKs",
|
||||
"migration": "Migrations",
|
||||
"self-hosting": "Self-hosting"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"beta-v1": "Beta to v1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
"javascript": "JavaScript",
|
||||
"api": "API",
|
||||
"export": "Export"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ import { useOpenPanel } from '@openpanel/nextjs';
|
||||
function YourComponent() {
|
||||
const op = useOpenPanel();
|
||||
|
||||
return <button onClick={() => op.track('my_event', { foo: 'bar' })}>Trigger event</button>
|
||||
return <button type="button" onClick={() => op.track('my_event', { foo: 'bar' })}>Trigger event</button>
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ Just insert this snippet and replace `YOUR_CLIENT_ID` with your client id.
|
||||
You can track events with two different methods: by calling the `window.op('track')` directly or by adding `data-track` attributes to your HTML elements.
|
||||
|
||||
```html filename="index.html"
|
||||
<button onclick="window.op('track', 'my_event', { foo: 'bar' })">
|
||||
<button type="button" onclick="window.op('track', 'my_event', { foo: 'bar' })">
|
||||
Track event
|
||||
</button>
|
||||
```
|
||||
|
||||
```html filename="index.html"
|
||||
<button data-track="my_event" data-foo="bar">Track event</button>
|
||||
<button type="button" data-track="my_event" data-foo="bar">Track event</button>
|
||||
```
|
||||
|
||||
### Identifying Users
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"index": "Get started"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
content={domain.replace('https://', '')}
|
||||
/>
|
||||
<meta name="twitter:url" content={domain} />
|
||||
<meta name="og:type" content={`site`} />
|
||||
<meta name="og:type" content={'site'} />
|
||||
<meta name="og:url" content={canonicalUrl} />
|
||||
<meta name="og:title" content={`${title} - Openpanel Docs`} />
|
||||
<meta property="og:description" content={description} />
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
<a
|
||||
href="https://twitter.com/CarlLindesvard"
|
||||
target="_blank"
|
||||
rel="nofollow"
|
||||
rel="noreferrer nofollow"
|
||||
>
|
||||
Carl
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user