Skip to content

Commit e42bfcf

Browse files
committed
Add copyright headers and SPDX license info to source files
- Add copyright headers to all source files - Configure ESLint to check for copyright headers - Add CLAUDE.md with build commands and code style guidelines
1 parent 774849c commit e42bfcf

File tree

20 files changed

+149
-6
lines changed

20 files changed

+149
-6
lines changed

.eslintrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
"extends": ["next/core-web-vitals", "next/typescript"]
2+
"extends": ["next/core-web-vitals", "next/typescript"],
3+
"plugins": ["header"],
4+
"rules": {
5+
"header/header": [
6+
2,
7+
"block",
8+
"Copyright The OpenTelemetry Authors\nSPDX-License-Identifier: Apache-2.0"
9+
]
10+
}
311
}

CLAUDE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Build Commands
6+
- `npm run dev` - Start development server
7+
- `npm run build` - Build for production
8+
- `npm run start` - Start production server
9+
- `npm run lint` - Run linting with ESLint
10+
- Testing: Use `/api/test` endpoint in development mode only
11+
12+
## Code Style Guidelines
13+
- TypeScript: Strict mode with strictNullChecks enabled
14+
- ESLint: Extends Next.js core-web-vitals and TypeScript configs
15+
- Imports: Use absolute imports with `@/` prefix for src directory
16+
- Components: Use functional React components with TypeScript types
17+
- Error handling: Use try/catch with specific error types when possible
18+
- Naming: PascalCase for components, camelCase for functions/variables
19+
- Styling: Use Tailwind CSS with custom theme extensions
20+
- State management: Use React hooks (useState, useEffect)

eslint.config.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// eslint.config.mjs
2+
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
import pluginHeader from "eslint-plugin-header";
5+
6+
pluginHeader.rules.header.meta.schema = false;
7+
8+
const compat = new FlatCompat({
9+
// import.meta.dirname is available after Node.js v20.11.0
10+
baseDirectory: import.meta.dirname,
11+
});
12+
13+
const eslintConfig = [
14+
...compat.config({
15+
extends: ["next", "next/core-web-vitals", "next/typescript"],
16+
}),
17+
];
18+
19+
export default eslintConfig;

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@types/react-dom": "^18",
2727
"eslint": "^9.0.0",
2828
"eslint-config-next": "15.3.1",
29+
"eslint-plugin-header": "^3.1.1",
2930
"postcss": "^8",
3031
"tailwindcss": "^3.4.1",
3132
"typescript": "^5"

src/app/api/revalidate/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import { revalidatePath } from "next/cache";
27
import { NextRequest } from "next/server";
38

src/app/api/test/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import { saveEntry } from "@/lib/store";
27
import { ChangelogEntry } from "@/types/entry";
38

src/app/api/webhook/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import { NextRequest } from "next/server";
27
import { saveEntry } from "@/lib/store";
38
import { ChangelogEntry } from "@/types/entry";

src/app/feed/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import { getAllEntries } from "@/lib/store";
27

38
export const dynamic = "force-dynamic";

src/app/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import type { Metadata } from "next";
27
import localFont from "next/font/local";
38
import "./globals.css";

0 commit comments

Comments
 (0)