Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
"extends": ["next/core-web-vitals", "next/typescript"],
"plugins": ["header"],
"rules": {
"header/header": [
2,
"block",
"Copyright The OpenTelemetry Authors\nSPDX-License-Identifier: Apache-2.0"
]
}
}
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Build Commands
- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run start` - Start production server
- `npm run lint` - Run linting with ESLint
- Testing: Use `/api/test` endpoint in development mode only

## Code Style Guidelines
- TypeScript: Strict mode with strictNullChecks enabled
- ESLint: Extends Next.js core-web-vitals and TypeScript configs
- Imports: Use absolute imports with `@/` prefix for src directory
- Components: Use functional React components with TypeScript types
- Error handling: Use try/catch with specific error types when possible
- Naming: PascalCase for components, camelCase for functions/variables
- Styling: Use Tailwind CSS with custom theme extensions
- State management: Use React hooks (useState, useEffect)
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// eslint.config.mjs

import { FlatCompat } from "@eslint/eslintrc";
import pluginHeader from "eslint-plugin-header";

pluginHeader.rules.header.meta.schema = false;

const compat = new FlatCompat({
// import.meta.dirname is available after Node.js v20.11.0
baseDirectory: import.meta.dirname,
});

const eslintConfig = [
...compat.config({
extends: ["next", "next/core-web-vitals", "next/typescript"],
}),
];

export default eslintConfig;
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/react-dom": "^18",
"eslint": "^9.0.0",
"eslint-config-next": "15.3.1",
"eslint-plugin-header": "^3.1.1",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/revalidate/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { revalidatePath } from "next/cache";
import { NextRequest } from "next/server";

Expand Down
5 changes: 5 additions & 0 deletions src/app/api/test/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { saveEntry } from "@/lib/store";
import { ChangelogEntry } from "@/types/entry";

Expand Down
5 changes: 5 additions & 0 deletions src/app/api/webhook/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { NextRequest } from "next/server";
import { saveEntry } from "@/lib/store";
import { ChangelogEntry } from "@/types/entry";
Expand Down
5 changes: 5 additions & 0 deletions src/app/feed/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { getAllEntries } from "@/lib/store";

export const dynamic = "force-dynamic";
Expand Down
5 changes: 5 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
Expand Down
5 changes: 5 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { getAllEntries } from "@/lib/store";
import { ChangelogList } from "@/components/list";
import { TestControls } from "@/components/test-controls";
Expand Down
5 changes: 5 additions & 0 deletions src/components/changelog-description.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

"use client";

import { useState } from "react";
Expand Down
5 changes: 5 additions & 0 deletions src/components/commit-sha.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

"use client";

interface CommitShaProps {
Expand Down
5 changes: 5 additions & 0 deletions src/components/filtered-list.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

"use client";

import { useState, useId } from "react";
Expand Down
5 changes: 5 additions & 0 deletions src/components/github-username.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

"use client";

interface GitHubUsernameProps {
Expand Down
5 changes: 5 additions & 0 deletions src/components/list.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { FilteredList } from "./filtered-list";
import { ChangelogEntry } from "@/types/entry";

Expand Down
5 changes: 5 additions & 0 deletions src/components/test-controls.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

"use client";

import { useState } from "react";
Expand Down
5 changes: 5 additions & 0 deletions src/lib/store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

import { getStore } from "@netlify/blobs";
import { ChangelogEntry } from "@/types/entry";

Expand Down
5 changes: 5 additions & 0 deletions src/types/entry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

export interface ChangelogEntry {
id: number;
title: string;
Expand Down
24 changes: 19 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -19,9 +23,19 @@
}
],
"paths": {
"@/*": ["./src/*"]
}
"@/*": [
"./src/*"
]
},
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}