Skip to content

Commit 3383b0c

Browse files
committed
chore: remove unused dependencies and configuration
- Removed unused Tailwind CSS and ESLint plugins - Simplified `RefCallback` type definition - Updated `composeRefs` utility to use `RefCallback` from React
1 parent c62a3f1 commit 3383b0c

10 files changed

+3
-70
lines changed

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
dist
22
pnpm-lock.yaml
33
package.json
4-
eslint-typegen.d.ts
54
*.md
65
*.tsbuildinfo
76
.next

eslint.config.js

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import { zayne } from "@zayne-labs/eslint-config";
33
export default zayne({
44
ignores: ["packages/toolkit/dist/**"],
55
react: true,
6-
tailwindcss: {
7-
settings: {
8-
config: "packages/toolkit/tailwind.config.ts",
9-
},
10-
},
116
type: "lib",
127
typescript: {
138
tsconfigPath: ["**/tsconfig.json"],

lint-staged.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
"*.{js,ts,jsx,tsx}": () => "pnpm lint:eslint:dev",
2+
"*.{js,ts,jsx,tsx}": () => "pnpm lint:eslint",
33
"*.{ts,tsx}": () => "pnpm lint:check-types",
44
"package.json": ["pnpm lint:publint"],
55
"packages/**/*.{js,ts,jsx,tsx}": () => "pnpm lint:size",

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"eslint": "^9.17.0",
3333
"eslint-plugin-react-hooks": "^5.1.0",
3434
"eslint-plugin-react-refresh": "^0.4.16",
35-
"eslint-plugin-tailwindcss": "^3.17.5",
3635
"husky": "^9.1.7",
3736
"lint-staged": "^15.3.0",
3837
"prettier": "^3.4.2",

packages/toolkit-react/.prettierrc.json

-16
This file was deleted.

packages/toolkit-react/package.json

-4
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,10 @@
7777
"@zayne-labs/tsconfig": "catalog:",
7878
"concurrently": "^9.1.2",
7979
"cross-env": "^7.0.3",
80-
"prettier-plugin-classnames": "^0.7.5",
81-
"prettier-plugin-merge": "^0.7.2",
82-
"prettier-plugin-tailwindcss": "^0.6.9",
8380
"publint": "^0.2.12",
8481
"react": "^19.0.0",
8582
"react-dom": "^19.0.0",
8683
"size-limit": "^11.1.6",
87-
"tailwindcss": "^3.4.17",
8884
"terser": "^5.37.0",
8985
"tsup": "^8.3.5",
9086
"typescript": "catalog:",

packages/toolkit-react/src/hooks/useScrollObserver.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { isBrowser } from "@zayne-labs/toolkit-core";
2-
import { useState } from "react";
3-
import type { RefCallback } from "../utils";
2+
import { type RefCallback, useState } from "react";
43
import { useCallbackRef } from "./useCallbackRef";
54
import { useConstant } from "./useConstant";
65

packages/toolkit-react/src/utils/composeRefs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isFunction } from "@zayne-labs/toolkit-type-helpers";
2-
import type { RefCallback } from "./types";
2+
import type { RefCallback } from "react";
33

44
/**
55
* @description Set a given ref to a given value.

packages/toolkit-react/src/utils/types/global.ts

-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ export type StateSetter<TSetter = unknown> = React.Dispatch<React.SetStateAction
1515
export type MyCustomCss<TExtra extends Record<string, string> = NonNullable<unknown>> =
1616
React.CSSProperties & Record<`--${string}`, string> & TExtra; // Allows Ts support for inline css variables
1717

18-
/**
19-
* @description Using this instead of the official react one to avoid build errors
20-
*/
21-
// eslint-disable-next-line perfectionist/sort-union-types, ts-eslint/no-invalid-void-type -- I want void to be first in union
22-
export type RefCallback<TElement> = (instance: TElement | null) => void | (() => void);
23-
2418
/**
2519
* @description Represents a set of props that can be used to render a component conditionally based on a discriminated union type.
2620
* This type allows for the use of either a render prop or children prop, but not both at the same time.

packages/toolkit-react/tailwind.config.ts

-33
This file was deleted.

0 commit comments

Comments
 (0)