Przeglądaj źródła

chore(tooling): align knip config and remove unused exports

Update Knip ignores for generated/aux files and drop unused exports/types to
keep `knip`, TypeScript, and ESLint checks green after upgrades.
satnaing 3 miesięcy temu
rodzic
commit
1e2593e08b

+ 8 - 5
knip.config.ts

@@ -1,8 +1,11 @@
-import type { KnipConfig } from 'knip';
+import type { KnipConfig } from 'knip'
 
 const config: KnipConfig = {
-  ignore: ['src/components/ui/**', 'src/routeTree.gen.ts'],
-  ignoreDependencies: ["tailwindcss", "tw-animate-css"]
-};
+  ignore: [
+    'src/components/ui/**',
+    'src/components/layout/app-title.tsx',
+    'src/tanstack-table.d.ts',
+  ],
+}
 
-export default config;
+export default config

+ 0 - 2
src/components/data-table/index.ts

@@ -1,6 +1,4 @@
 export { DataTablePagination } from './pagination'
 export { DataTableColumnHeader } from './column-header'
-export { DataTableFacetedFilter } from './faceted-filter'
-export { DataTableViewOptions } from './view-options'
 export { DataTableToolbar } from './toolbar'
 export { DataTableBulkActions } from './bulk-actions'

+ 1 - 1
src/context/layout-provider.tsx

@@ -2,7 +2,7 @@ import { createContext, useContext, useState } from 'react'
 import { getCookie, setCookie } from '@/lib/cookies'
 
 export type Collapsible = 'offcanvas' | 'icon' | 'none'
-export type Variant = 'inset' | 'sidebar' | 'floating'
+type Variant = 'inset' | 'sidebar' | 'floating'
 
 // Cookie constants following the pattern from sidebar.tsx
 const LAYOUT_COLLAPSIBLE_COOKIE_NAME = 'layout_collapsible'

+ 2 - 4
src/features/users/data/schema.ts

@@ -15,7 +15,7 @@ const userRoleSchema = z.union([
   z.literal('manager'),
 ])
 
-const userSchema = z.object({
+const _userSchema = z.object({
   id: z.string(),
   firstName: z.string(),
   lastName: z.string(),
@@ -27,6 +27,4 @@ const userSchema = z.object({
   createdAt: z.coerce.date(),
   updatedAt: z.coerce.date(),
 })
-export type User = z.infer<typeof userSchema>
-
-export const userListSchema = z.array(userSchema)
+export type User = z.infer<typeof _userSchema>