Skip to content

Commit 7b885c0

Browse files
committed
fmt
1 parent dde6511 commit 7b885c0

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

packages/react-doctor/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ Supports Cursor, Claude Code, Amp Code, Codex, Gemini CLI, OpenCode, Windsurf, a
6060
github-token: ${{ secrets.GITHUB_TOKEN }}
6161
```
6262
63-
| Input | Default | Description |
64-
| -------------- | ------- | ----------------------------------------------------------------------- |
65-
| `directory` | `.` | Project directory to scan |
66-
| `verbose` | `true` | Show file details per rule |
67-
| `project` | | Workspace project(s) to scan (comma-separated) |
68-
| `diff` | | Base branch for diff mode. Only changed files are scanned |
69-
| `github-token` | | When set on `pull_request` events, posts findings as a PR comment |
70-
| `node-version` | `20` | Node.js version to use |
63+
| Input | Default | Description |
64+
| -------------- | ------- | ----------------------------------------------------------------- |
65+
| `directory` | `.` | Project directory to scan |
66+
| `verbose` | `true` | Show file details per rule |
67+
| `project` | | Workspace project(s) to scan (comma-separated) |
68+
| `diff` | | Base branch for diff mode. Only changed files are scanned |
69+
| `github-token` | | When set on `pull_request` events, posts findings as a PR comment |
70+
| `node-version` | `20` | Node.js version to use |
7171

7272
The action outputs a `score` (0–100) you can use in subsequent steps.
7373

packages/react-doctor/src/cli.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ const VALID_FAIL_ON_LEVELS = new Set<FailOnLevel>(["error", "warning", "none"]);
4646
const isValidFailOnLevel = (level: string): level is FailOnLevel =>
4747
VALID_FAIL_ON_LEVELS.has(level as FailOnLevel);
4848

49-
const shouldFailForDiagnostics = (
50-
diagnostics: Diagnostic[],
51-
failOnLevel: FailOnLevel,
52-
): boolean => {
49+
const shouldFailForDiagnostics = (diagnostics: Diagnostic[], failOnLevel: FailOnLevel): boolean => {
5350
if (failOnLevel === "none") return false;
5451
if (failOnLevel === "warning") return diagnostics.length > 0;
5552
return diagnostics.some((diagnostic) => diagnostic.severity === "error");

packages/react-doctor/src/plugin/rules/nextjs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ export const nextjsNoNativeScript: Rule = {
269269
if (node.name?.type !== "JSXIdentifier" || node.name.name !== "script") return;
270270

271271
const typeAttribute = findJsxAttribute(node.attributes ?? [], "type");
272-
const typeValue =
273-
typeAttribute?.value?.type === "Literal" ? typeAttribute.value.value : null;
272+
const typeValue = typeAttribute?.value?.type === "Literal" ? typeAttribute.value.value : null;
274273
if (typeof typeValue === "string" && !EXECUTABLE_SCRIPT_TYPES.has(typeValue)) return;
275274

276275
context.report({

packages/react-doctor/src/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export type FailOnLevel = "error" | "warning" | "none";
22

3-
export type Framework = "nextjs" | "vite" | "cra" | "remix" | "gatsby" | "expo" | "react-native" | "unknown";
3+
export type Framework =
4+
| "nextjs"
5+
| "vite"
6+
| "cra"
7+
| "remix"
8+
| "gatsby"
9+
| "expo"
10+
| "react-native"
11+
| "unknown";
412

513
export interface ProjectInfo {
614
rootDirectory: string;

0 commit comments

Comments
 (0)