Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/update-eslint-plugin-nextjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-nextjs": patch
---

Fixed compatibility with `@eslint/core` 1.0.1 by removing deprecated `category` property from rule metadata.
14 changes: 14 additions & 0 deletions .changeset/update-style-kit-deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"js-style-kit": patch
---

Updated dependencies:

- `typescript-eslint` to 8.52.0
- `eslint-plugin-jest` to 29.12.1
- `eslint-plugin-jsdoc` to 62.0.0
- `eslint-plugin-perfectionist` to 5.3.1
- `eslint-plugin-storybook` to 10.1.11
- `eslint-plugin-turbo` to 2.7.3
- `globals` to 17.0.0
- `prettier-plugin-css-order` to 2.2.0
55 changes: 23 additions & 32 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
types: [opened, synchronize]
branches: ["main"]

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

jobs:
build:
name: Build and Test
ci:
name: CI
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -34,49 +34,40 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Install global Turbo with Bun
run: bun add --global turbo@^2

- name: Sherif Monorepo Check
run: bun turbo run sherif

- name: Build
run: bun turbo run build
# Phase 1: Build and independent checks (Turbo parallelizes these)
- name: Build & Sherif
run: bunx turbo run build sherif

- name: Typecheck
run: bun turbo run typecheck

- name: Prettier --write
# Phase 2: Format (may commit changes, must run before lint)
- name: Format
run: bun run format

- name: Commit Prettier changes if needed
- name: Commit formatting changes
env:
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

if [[ -n "$(git status --porcelain)" ]]; then
git add .
git commit -m "style: apply prettier formatting"

# For pull requests
if [ -n "${{ github.head_ref }}" ]; then
git push origin HEAD:${{ github.head_ref }}
# For direct pushes to branches

if [ -n "$HEAD_REF" ]; then
git push origin HEAD:"$HEAD_REF"
else
git push origin HEAD:${{ github.ref_name }}
git push origin HEAD:"$REF_NAME"
fi

echo "Formatting changes were committed and pushed"
else
echo "No formatting changes needed"
fi
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: ESLint
run: bun turbo run lint -- --max-warnings 0

- name: Test and generate coverage reports
id: test-coverage
run: bun turbo run test:coverage
# Phase 3: Validation (Turbo parallelizes these)
- name: Typecheck, Lint & Test
run: bunx turbo run typecheck lint test:coverage

- name: Upload coverage reports to Codecov
if: always()
Expand Down
4 changes: 2 additions & 2 deletions apps/next-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"start": "next start"
},
"dependencies": {
"convex": "1.31.2",
"convex": "1.31.3",
"next": "16.1.1",
"react": "19.2.3",
"react-dom": "19.2.3"
},
"devDependencies": {
"@tailwindcss/postcss": "4.1.18",
"@types/node": "24.10.1",
"@types/react": "19.2.7",
"@types/react": "19.2.8",
"@types/react-dom": "19.2.3",
"js-style-kit": "workspace:*",
"tailwindcss": "4.1.18",
Expand Down
10 changes: 8 additions & 2 deletions apps/next-test-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"esModuleInterop": true,
"incremental": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "bundler",
Expand All @@ -23,5 +23,11 @@
"target": "ES2017"
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
]
}
4 changes: 2 additions & 2 deletions apps/vite-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"react-dom": "19.2.3"
},
"devDependencies": {
"@types/react": "19.2.7",
"@types/react": "19.2.8",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "5.1.2",
"js-style-kit": "workspace:*",
"typescript": "5.9.3",
"vite": "7.3.0"
"vite": "7.3.1"
}
}
232 changes: 152 additions & 80 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/bun": "1.3.5",
"js-style-kit": "workspace:*",
"sherif": "1.9.0",
"turbo": "2.7.2",
"turbo": "2.7.3",
"typescript": "5.9.3"
},
"packageManager": "bun@1.3.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
"fast-glob": "3.3.3"
},
"devDependencies": {
"@eslint/core": "1.0.0",
"@eslint/core": "1.0.1",
"@repo/typescript-config": "workspace:*",
"@types/bun": "1.3.5",
"@types/node": "24.10.1",
"eslint": "9.39.2",
"eslint-plugin-eslint-plugin": "7.2.0",
"eslint-plugin-eslint-plugin": "7.3.0",
"tsup": "8.5.1",
"typescript": "5.9.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-nextjs/src/rules/no-head-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const noHeadElement: RuleDefinition = {
}),
meta: {
docs: {
category: "HTML",
description: "Prevent usage of `<head>` element.",
recommended: true,
url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export const noHtmlLinkForPages: RuleDefinition = {
// eslint-disable-next-line eslint-plugin/require-meta-default-options
meta: {
docs: {
category: "HTML",
description:
"Prevent usage of `<a>` elements to navigate to internal Next.js pages.",
recommended: true,
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-nextjs/src/rules/no-img-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const noImgElement: RuleDefinition = {
},
meta: {
docs: {
category: "HTML",
description:
"Prevent usage of `<img>` element due to slower LCP and higher bandwidth.",
recommended: true,
Expand Down
75 changes: 33 additions & 42 deletions packages/style-kit/bin/cli.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable jest/no-conditional-expect */
/* eslint-disable jest/no-conditional-in-test */
import { afterEach, describe, expect, it } from "bun:test";
import { execSync } from "node:child_process";
import { execSync, spawnSync } from "node:child_process";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
Expand Down Expand Up @@ -42,49 +42,40 @@ describe("cli Integration Tests", () => {
}
});

it("detects different package managers correctly", () => {
// Test with bun.lock
testDir = path.join(os.tmpdir(), `js-style-kit-test-${Date.now()}`);
fs.mkdirSync(testDir, { recursive: true });

const packageJson = {
devDependencies: {},
name: "test-project",
scripts: {},
version: "1.0.0",
};

fs.writeFileSync(
path.join(testDir, "package.json"),
JSON.stringify(packageJson, null, 2),
);

// Create bun.lock to simulate bun project
fs.writeFileSync(path.join(testDir, "bun.lock"), "");
it(
"detects different package managers correctly",
() => {
// Test with bun.lock
testDir = path.join(os.tmpdir(), `js-style-kit-test-${Date.now()}`);
fs.mkdirSync(testDir, { recursive: true });

const packageJson = {
devDependencies: {},
name: "test-project",
scripts: {},
version: "1.0.0",
};

fs.writeFileSync(
path.join(testDir, "package.json"),
JSON.stringify(packageJson, null, 2),
);

// Create bun.lock to simulate bun project
fs.writeFileSync(path.join(testDir, "bun.lock"), "");

const result = spawnSync("node", [CLI_PATH, "init"], {
cwd: testDir,
encoding: "utf8",
});

const originalCwd = process.cwd();
try {
process.chdir(testDir);
// Even if installation fails, we should see the package manager detection
const output = result.stdout || result.stderr || "";

try {
const output = execSync(`node ${CLI_PATH} init`, {
encoding: "utf8",
});

expect(output).toContain("Using package manager: bun");
} catch (error: unknown) {
// Even if installation fails, we should see the package manager detection
const output =
(error as { stderr?: string; stdout?: string }).stdout ||
(error as { stderr?: string; stdout?: string }).stderr ||
"";

expect(output).toContain("Using package manager: bun");
}
} finally {
process.chdir(originalCwd);
}
});
expect(output).toContain("Using package manager: bun");
},
{ timeout: 10_000 },
);
Comment thread
drake-nathan marked this conversation as resolved.
});

describe("cli help", () => {
Expand Down
18 changes: 9 additions & 9 deletions packages/style-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,30 @@
"@convex-dev/eslint-plugin": "1.1.1",
"@prettier/plugin-oxc": "0.1.3",
"@tanstack/eslint-plugin-query": "5.91.2",
"@typescript-eslint/parser": "8.50.1",
"@typescript-eslint/parser": "8.52.0",
Comment thread
drake-nathan marked this conversation as resolved.
"eslint": "9.39.2",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import-x": "4.16.1",
"eslint-plugin-jest": "29.11.0",
"eslint-plugin-jsdoc": "61.5.0",
"eslint-plugin-jest": "29.12.1",
"eslint-plugin-jsdoc": "62.0.0",
Comment thread
drake-nathan marked this conversation as resolved.
"eslint-plugin-nextjs": "1.1.3",
"eslint-plugin-perfectionist": "5.1.0",
"eslint-plugin-perfectionist": "5.3.1",
"eslint-plugin-prefer-arrow-functions": "3.9.1",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-react-refresh": "0.4.26",
"eslint-plugin-storybook": "10.1.10",
"eslint-plugin-turbo": "2.7.2",
"eslint-plugin-storybook": "10.1.11",
"eslint-plugin-turbo": "2.7.3",
"eslint-plugin-unicorn": "62.0.0",
"eslint-plugin-vitest": "0.5.4",
"globals": "16.5.0",
"globals": "17.0.0",
"prettier": "3.7.4",
"prettier-plugin-css-order": "2.1.2",
"prettier-plugin-css-order": "2.2.0",
"prettier-plugin-curly": "0.4.1",
"prettier-plugin-packagejson": "2.5.20",
"prettier-plugin-sort-json": "4.1.1",
"prettier-plugin-tailwindcss": "0.7.2",
"typescript-eslint": "8.50.1"
"typescript-eslint": "8.52.0"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
Expand Down
Loading