Skip to content
Draft
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
10 changes: 0 additions & 10 deletions .eslintrc.js

This file was deleted.

11 changes: 10 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@
"**/dist/**",
"**/build/**",
"**/coverage/**",
"examples/**",
"**/.next/**",
"**/.expo/**",
"integration/**"
],
"overrides": [
{
"files": ["examples/**"],
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
]
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ yarn format
- **Package manager**: Yarn 4.1.0
- **Testing**: Vitest
- **Releases**: Changesets for versioning
- **Linting & formatting**: `packages/*` use the oxc toolchain — oxlint (`.oxlintrc.json`) and oxfmt (`.oxfmtrc.json`), configured at the repo root and auto-discovered per package. Example apps still run ESLint/Prettier.
- **Linting & formatting**: the whole repo (packages and examples) uses the oxc toolchain — oxlint (`.oxlintrc.json`) and oxfmt (`.oxfmtrc.json`), configured at the repo root and auto-discovered per workspace. Next example apps set `eslint.ignoreDuringBuilds` since linting runs via oxlint, not `next build`.
- **Type-checking**: `packages/*` type-check with TypeScript 7, installed as the `typescript-7` alias (`npm:typescript@7.0.2`); TypeScript 5.x is retained for builds (`vite-plugin-dts`).

## Adding Dependencies
Expand Down
11 changes: 2 additions & 9 deletions examples/client-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
"dev": "vite --port 3001",
"build": "vite build",
"preview": "vite preview",
"format": "prettier \"src/**/*.{js,ts,tsx}\" --write",
"format:check": "prettier \"src/**/*.{js,ts,tsx}\" --check"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"format": "oxfmt \"src/**/*.{ts,tsx,js}\"",
"format:check": "oxfmt --check \"src/**/*.{ts,tsx,js}\""
},
"browserslist": {
"production": [
Expand All @@ -41,7 +35,6 @@
"@vitejs/plugin-react": "^4.5.1",
"@vitejs/plugin-react-swc": "^4.3.0",
"jsdom": "^29.1.0",
"prettier": "^3.5.3",
"vite": "^5.4.19",
"vitest": "^3.2.4"
},
Expand Down
12 changes: 0 additions & 12 deletions examples/expo-example/.eslintrc.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const NotificationFeedContainer: React.FC<NotificationFeedContainerProps> = ({
handleClose,
}) => {
const onCellActionButtonTap = useCallback(
(params: { button: ActionButton; item: FeedItem }) => {
(_params: { button: ActionButton; item: FeedItem }) => {
// handle button tap
},
[],
);

const onRowTap = useCallback((item: FeedItem) => {
const onRowTap = useCallback((_item: FeedItem) => {
// handle row tap
}, []);

Expand Down
7 changes: 1 addition & 6 deletions examples/expo-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"lint": "expo lint"
"lint": "oxlint --max-warnings=0"
},
"dependencies": {
"@expo/log-box": "~56.0.12",
Expand Down Expand Up @@ -42,11 +42,6 @@
"devDependencies": {
"@babel/core": "^7.28.0",
"@types/react": "^19.2.17",
"eslint": "^8.56.0",
"eslint-config-expo": "~56.0.4",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.5",
"typescript": "^5.8.3"
},
"private": true,
Expand Down
28 changes: 0 additions & 28 deletions examples/guide-example/eslint.config.js

This file was deleted.

8 changes: 1 addition & 7 deletions examples/guide-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint": "oxlint --max-warnings=0",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -17,16 +17,10 @@
"react-router": "^7.6.3"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.5.1",
"eslint": "^8.56.0",
Comment thread
cursor[bot] marked this conversation as resolved.
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^16.0.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.61.0",
"vite": "^5.4.19"
},
"engines": {
Expand Down
9 changes: 0 additions & 9 deletions examples/ms-teams-connect-example/.eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion examples/ms-teams-connect-example/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
eslint: { ignoreDuringBuilds: true },
};

module.exports = nextConfig;
8 changes: 3 additions & 5 deletions examples/ms-teams-connect-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier \"**/*.{js,ts,tsx}\" --write",
"format:check": "prettier \"**/*.{js,ts,tsx}\" --check"
"lint": "oxlint --max-warnings=0",
"format": "oxfmt \"**/*.{ts,tsx,js}\"",
"format:check": "oxfmt --check \"**/*.{ts,tsx,js}\""
},
"dependencies": {
"@knocklabs/react": "0.12.1",
Expand All @@ -22,8 +22,6 @@
"@types/node": "^24",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"eslint": "^8.56.0",
"eslint-config-next": "15.4.6",
"typescript": "^5.8.3"
},
"engines": {
Expand Down
9 changes: 0 additions & 9 deletions examples/nextjs-app-dir-example/.eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions examples/nextjs-app-dir-example/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
eslint: { ignoreDuringBuilds: true },
};

export default nextConfig;
12 changes: 3 additions & 9 deletions examples/nextjs-app-dir-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "prettier \"**/*.{js,ts,tsx}\" --write",
"format:check": "prettier \"**/*.{js,ts,tsx}\" --check"
"lint": "oxlint --max-warnings=0",
"format": "oxfmt \"**/*.{ts,tsx,js}\"",
"format:check": "oxfmt --check \"**/*.{ts,tsx,js}\""
},
"dependencies": {
"@faker-js/faker": "^9.9.0",
Expand All @@ -34,17 +34,11 @@
"uuid": "^14.0.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@knocklabs/eslint-config": "workspace:^",
"@knocklabs/typescript-config": "workspace:^",
"@next/eslint-plugin-next": "^15.3.1",
"@types/eslint": "^8.44.7",
"@types/node": "^24",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/uuid": "^10.0.0",
"eslint": "^8.56.0",
"eslint-config-next": "15.4.6",
"typescript": "^5.8.3"
},
"engines": {
Expand Down
9 changes: 0 additions & 9 deletions examples/nextjs-example/.eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions examples/nextjs-example/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
module.exports = {
eslint: { ignoreDuringBuilds: true },
i18n: {
locales: ["en"],
defaultLocale: "en",
Expand Down
10 changes: 3 additions & 7 deletions examples/nextjs-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "prettier \"**/*.{js,ts,tsx}\" --write",
"format:check": "prettier \"**/*.{js,ts,tsx}\" --check"
"lint": "oxlint --max-warnings=0",
"format": "oxfmt \"**/*.{ts,tsx,js}\"",
"format:check": "oxfmt --check \"**/*.{ts,tsx,js}\""
},
"dependencies": {
"@emotion/react": "^11.14.0",
Expand Down Expand Up @@ -36,15 +36,11 @@
"uuid": "^14.0.1"
},
"devDependencies": {
"@knocklabs/eslint-config": "workspace:^",
"@knocklabs/typescript-config": "workspace:^",
"@next/eslint-plugin-next": "^15.3.1",
"@types/eslint": "^8.44.7",
"@types/node": "^24",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/uuid": "^10.0.0",
"eslint": "^8.56.0",
"typescript": "^5.8.3"
},
"engines": {
Expand Down
9 changes: 0 additions & 9 deletions examples/slack-connect-example/.eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion examples/slack-connect-example/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
eslint: { ignoreDuringBuilds: true },
};

module.exports = nextConfig;
8 changes: 3 additions & 5 deletions examples/slack-connect-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier \"**/*.{js,ts,tsx}\" --write",
"format:check": "prettier \"**/*.{js,ts,tsx}\" --check"
"lint": "oxlint --max-warnings=0",
"format": "oxfmt \"**/*.{ts,tsx,js}\"",
"format:check": "oxfmt --check \"**/*.{ts,tsx,js}\""
},
"dependencies": {
"@knocklabs/react": "0.12.1",
Expand All @@ -22,8 +22,6 @@
"@types/node": "^24",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"eslint": "^8.56.0",
"eslint-config-next": "15.4.6",
"typescript": "^5.8.3"
},
"engines": {
Expand Down
3 changes: 0 additions & 3 deletions examples/slack-kit-example/.eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/slack-kit-example/app/actions/fetch-user-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function setKnockChannelData(
slackUserId: string,
): Promise<void> {
try {
const userChannelData = await knock.users.setChannelData(
await knock.users.setChannelData(
userId,
process.env.NEXT_PUBLIC_KNOCK_SLACK_CHANNEL_ID as string,
{
Expand Down
3 changes: 1 addition & 2 deletions examples/slack-kit-example/app/choose-slack-channel/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Link from "next/link";
import { useState } from "react";

import FetchUserIdForm from "../components/fetch-user-id-form";
import SlackChannelWrapper from "../components/slack-channel-wrapper";
import { getAppDetails } from "../lib/app-details";

export default async function Page() {
const { collection, objectId, userId } = getAppDetails();
const { collection, objectId } = getAppDetails();

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function FetchUserIdForm() {
try {
const result = await fetchUserId(email);
setUserData(result);
} catch (err) {
} catch {
setError("Failed to fetch user data. Please try again.");
}
};
Expand Down
2 changes: 1 addition & 1 deletion examples/slack-kit-example/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function MyApp({ children }: { children: React.ReactElement }) {

return (
<>
<html>
<html lang="en">
<body className="px-12 py-6">
<h1 className="text-2xl font-bold mb-6">SlackKit Demo App</h1>
<Providers userToken={userToken} knockUserId={userId} tenant={tenant}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import triggerWorkflow from "../lib/actions/triggerWorkflow";
import { getAppDetails } from "../lib/app-details";

export default async function Page() {
const { workflowKey, collection, objectId, tenant, userId } = getAppDetails();
const { workflowKey, objectId, tenant, userId } = getAppDetails();
return (
<>
<h2 className="text-xl font-bold my-4">Trigger a Workflow</h2>
Expand Down
Loading
Loading