Skip to content

Commit 3ee506e

Browse files
committed
Added TypeScript compiler checks on types and JavaScript files
1 parent e07e751 commit 3ee506e

File tree

8 files changed

+56
-52
lines changed

8 files changed

+56
-52
lines changed

app/[locale]/components/ui/form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import { Slot } from "@radix-ui/react-slot";
66
import { merge } from "@/utilities/tailwind";
77
import { Controller,
8-
FieldPath,
9-
FieldValues,
108
FormProvider,
119
useFormContext,
12-
ControllerProps } from "react-hook-form";
10+
type FieldPath,
11+
type FieldValues,
12+
type ControllerProps } from "react-hook-form";
1313
import { useTranslations } from "next-intl";
1414
import * as LabelPrimitive from "@radix-ui/react-label";
1515
import { useId,

app/[locale]/dashboard/components/column-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"use client";
77

88
import { merge } from "@/utilities/tailwind";
9-
import { Column } from "@tanstack/react-table";
9+
import { type Column } from "@tanstack/react-table";
1010
import { useTranslations } from "next-intl";
1111
import { useSearchParams } from "next/navigation";
1212
import { type HTMLAttributes } from "react";

app/[locale]/dashboard/components/data-table.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import { useSearchParams } from "next/navigation";
1212
import { SessionProvider } from "next-auth/react";
1313
import { type TableMeta,
1414
flexRender,
15-
SortingState,
1615
useReactTable,
17-
VisibilityState,
1816
getCoreRowModel,
1917
getSortedRowModel,
20-
ColumnFiltersState,
18+
type SortingState,
2119
getFilteredRowModel,
22-
getPaginationRowModel } from "@tanstack/react-table";
20+
type VisibilityState,
21+
getPaginationRowModel,
22+
type ColumnFiltersState } from "@tanstack/react-table";
2323
import type { FileAttributes } from "@/interfaces/File";
2424
import { useLocale, useMessages } from "next-intl";
2525

app/[locale]/dashboard/components/pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
"use client";
77

8-
import { Table } from "@tanstack/react-table";
98
import { ChevronLeft,
109
ChevronRight,
1110
ChevronsLeft,
1211
ChevronsRight } from "lucide-react";
12+
import type { Table } from "@tanstack/react-table";
1313
import { useTranslations } from "next-intl";
1414
import { useSearchParams } from "next/navigation";
1515

app/manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Route vers le manifeste de l'application.
33
// Source : https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest
44
//
5-
import { MetadataRoute } from "next";
5+
import { type MetadataRoute } from "next";
66
import { generateMetadata } from "./[locale]/layout";
77

88
export default async function manifest(): Promise<MetadataRoute.Manifest>

config/columns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"use client";
66

77
import { merge } from "@/utilities/tailwind";
8-
import { ColumnDef } from "@tanstack/react-table";
98
import { formatSize } from "@/utilities/react-table";
9+
import type { ColumnDef } from "@tanstack/react-table";
1010
import type { FileAttributes } from "@/interfaces/File";
1111

1212
import { Badge } from "@/components/ui/badge";

playwright.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { join } from "path";
2-
import { PlaywrightTestConfig, defineConfig, devices } from "@playwright/test";
2+
import { devices,
3+
defineConfig,
4+
type PlaywrightTestConfig } from "@playwright/test";
35

46
const port = process.env.PORT ?? 3000;
57
const baseURL = `http://localhost:${ port }`;

tsconfig.json

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,44 @@
11
{
2-
"exclude": ["node_modules"],
3-
"include": ["next-env.d.ts", "**/*.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
4-
"compilerOptions": {
5-
"lib": ["dom", "dom.iterable", "esnext"],
6-
"jsx": "preserve",
7-
"paths": {
8-
"@/*": ["./*"],
9-
"@/app/*": ["./app/[locale]/*"],
10-
"@/images/*": ["./public/assets/images/*"],
11-
"@/settings/*": ["./app/[locale]/settings/*"],
12-
"@/dashboard/*": ["./app/[locale]/dashboard/*"],
13-
"@/components/*": ["./app/[locale]/components/*"],
14-
},
15-
"noEmit": true,
16-
"strict": true,
17-
"target": "esnext",
18-
"module": "esnext",
19-
"allowJs": true,
20-
"plugins": [
21-
{"name": "next"}
22-
],
23-
"incremental": true,
24-
"skipLibCheck": true,
25-
"noImplicitAny": true,
26-
"importHelpers": true,
27-
"removeComments": true,
28-
"noImplicitThis": true,
29-
"noUnusedLocals": true,
30-
"isolatedModules": true,
31-
"esModuleInterop": true,
32-
"strictNullChecks": true,
33-
"moduleResolution": "bundler",
34-
"resolveJsonModule": true,
35-
"noImplicitOverride": true,
36-
"noUnusedParameters": true,
37-
"strictFunctionTypes": true,
38-
"noFallthroughCasesInSwitch": true,
39-
"allowSyntheticDefaultImports": true,
40-
"forceConsistentCasingInFileNames": true
41-
}
2+
"exclude": ["node_modules"],
3+
"include": ["next-env.d.ts", "**/*.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
4+
"compilerOptions": {
5+
"lib": ["dom", "dom.iterable", "esnext"],
6+
"jsx": "preserve",
7+
"paths": {
8+
"@/*": ["./*"],
9+
"@/app/*": ["./app/[locale]/*"],
10+
"@/images/*": ["./public/assets/images/*"],
11+
"@/settings/*": ["./app/[locale]/settings/*"],
12+
"@/dashboard/*": ["./app/[locale]/dashboard/*"],
13+
"@/components/*": ["./app/[locale]/components/*"],
14+
},
15+
"noEmit": true,
16+
"strict": true,
17+
"target": "esnext",
18+
"module": "esnext",
19+
"allowJs": true,
20+
"checkJs": true,
21+
"plugins": [
22+
{"name": "next"}
23+
],
24+
"incremental": true,
25+
"skipLibCheck": true,
26+
"noImplicitAny": true,
27+
"importHelpers": true,
28+
"removeComments": true,
29+
"noImplicitThis": true,
30+
"noUnusedLocals": true,
31+
"isolatedModules": true,
32+
"esModuleInterop": true,
33+
"strictNullChecks": true,
34+
"moduleResolution": "bundler",
35+
"resolveJsonModule": true,
36+
"noImplicitOverride": true,
37+
"noUnusedParameters": true,
38+
"strictFunctionTypes": true,
39+
"verbatimModuleSyntax": true,
40+
"noFallthroughCasesInSwitch": true,
41+
"allowSyntheticDefaultImports": true,
42+
"forceConsistentCasingInFileNames": true
43+
}
4244
}

0 commit comments

Comments
 (0)