Skip to content

Commit ab3ff7a

Browse files
committed
fix(types): add data fetching logic for performance
1 parent 2c0a970 commit ab3ff7a

44 files changed

Lines changed: 2254 additions & 3065 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
23
"endOfLine": "auto",
34
"trailingComma": "none",
45
"semi": true,
@@ -10,12 +11,29 @@
1011
"quoteProps": "as-needed",
1112
"singleAttributePerLine": true,
1213
"htmlWhitespaceSensitivity": "css",
13-
"printWidth": 150,
14+
"printWidth": 120,
1415
"tabWidth": 2,
15-
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
16-
"tailwindFunctions": ["cn", "cn", "cn", "clsx", "ctl", "cva", "tv"],
17-
"tailwindStylesheet": "src/css/main.css",
18-
"organizeImportsSkipDestructiveCodeActions": true,
16+
"plugins": ["@ianvs/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
17+
"importOrder": [
18+
"^react(/.*)?$",
19+
"^next(/.*)?$",
20+
"<THIRD_PARTY_MODULES>",
21+
22+
"^lib(/.*)?$",
23+
"^types(/.*)?$",
24+
"^schema(/.*)?$",
25+
26+
"^@content-source(/.*)?$",
27+
28+
"^([~@])(?!react)(/.*)?$",
29+
30+
"^[./](?!.*\\.css$)",
31+
32+
"^([~@])/.*\\.css$",
33+
"^[./].*\\.css$",
34+
"^[.]"
35+
],
36+
"tailwindFunctions": ["cn", "classnames", "className", "classNames", "clsx", "ctl", "cva", "tv"],
1937
"overrides": [
2038
{
2139
"files": "Makefile",

eslint.config.js

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
1-
const { FlatCompat } = require('@eslint/eslintrc');
21
const js = require('@eslint/js');
3-
const prettier = require('eslint-config-prettier');
2+
const { defineConfig } = require('eslint/config');
3+
const prettierConfig = require('eslint-config-prettier');
44
const pluginPrettier = require('eslint-plugin-prettier');
55
const react = require('eslint-plugin-react');
6-
const reactHooks = require('eslint-plugin-react-hooks');
6+
const pluginReactHooks = require('eslint-plugin-react-hooks');
77
const globals = require('globals');
8-
const typescript = require('typescript-eslint');
9-
10-
const compat = new FlatCompat({
11-
baseDirectory: __dirname
12-
});
8+
const tseslint = require('typescript-eslint');
9+
const pluginNext = require('@next/eslint-plugin-next');
10+
const pluginQuery = require('@tanstack/eslint-plugin-query');
1311

1412
/** @type {import('eslint').Linter.Config[]} */
15-
module.exports = typescript.config(
13+
module.exports = defineConfig(
1614
js.configs.recommended,
17-
typescript.configs.recommended,
18-
...compat.extends('next/core-web-vitals'),
15+
...tseslint.configs.recommended,
1916
{
20-
...react.configs.flat.recommended,
21-
...react.configs.flat['jsx-runtime'],
17+
plugins: {
18+
react
19+
},
20+
rules: {
21+
...react.configs.recommended.rules,
22+
...react.configs['jsx-runtime'].rules,
23+
'react/react-in-jsx-scope': 'off',
24+
'react/prop-types': 'off',
25+
'react/no-unescaped-entities': 'off',
26+
'react/no-unknown-property': [2, { ignore: ['jsx'] }]
27+
},
28+
settings: {
29+
react: { version: 'detect' }
30+
}
31+
},
32+
33+
{
34+
plugins: {
35+
'@typescript-eslint': tseslint.plugin
36+
},
2237
languageOptions: {
38+
parser: tseslint.parser,
2339
globals: {
2440
...globals.browser,
2541
...globals.commonjs,
@@ -35,10 +51,6 @@ module.exports = typescript.config(
3551
}
3652
},
3753
rules: {
38-
'react/react-in-jsx-scope': 'off',
39-
'react/prop-types': 'off',
40-
'react/no-unescaped-entities': 'off',
41-
// ts overrides
4254
'@typescript-eslint/no-unused-vars': [
4355
'warn',
4456
{
@@ -53,9 +65,6 @@ module.exports = typescript.config(
5365
],
5466
'@typescript-eslint/no-explicit-any': 'off',
5567
'@typescript-eslint/no-require-imports': 'off',
56-
57-
'@next/next/no-img-element': 'off',
58-
'@next/next/no-html-link-for-pages': 'off',
5968
'@typescript-eslint/no-empty-function': 'off',
6069
'@typescript-eslint/no-console': 'off'
6170
},
@@ -64,23 +73,40 @@ module.exports = typescript.config(
6473
version: 'detect'
6574
},
6675
tailwindcss: {
67-
callees: ['cn', 'cn', 'cn', 'clsx', 'ctl', 'cva', 'tv']
76+
callees: ['classNames', 'className', 'classname', 'cn', 'clsx', 'ctl', 'cva', 'tv']
6877
}
6978
}
7079
},
80+
7181
{
7282
plugins: {
73-
'react-hooks': reactHooks,
74-
prettier: pluginPrettier
83+
'@next/next': pluginNext
84+
},
85+
rules: {
86+
...pluginNext.configs.recommended.rules,
87+
...pluginNext.configs['core-web-vitals'].rules,
88+
'@next/next/no-img-element': 'off',
89+
'@next/next/no-html-link-for-pages': 'off'
90+
}
91+
},
92+
93+
{
94+
files: ['**/*.{js,jsx,ts,tsx,mjs,mts,mdx,md}'],
95+
plugins: {
96+
'react-hooks': pluginReactHooks,
97+
prettier: pluginPrettier,
98+
'@tanstack/query': pluginQuery
7599
},
76100
rules: {
77101
'react-hooks/rules-of-hooks': 'error',
78102
'react-hooks/exhaustive-deps': 'off',
79-
'prettier/prettier': 'warn'
103+
'prettier/prettier': 'warn',
104+
...pluginQuery.configs.recommended.rules
80105
}
81106
},
82107
{
83108
ignores: ['node_modules/*', '.next/', '.turbo/', '.out/', '**/build', '**/coverage']
84109
},
85-
prettier
110+
111+
prettierConfig
86112
);

index.d.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
declare module 'color-name-list' {
2-
export const colornames: {
3-
name: string;
4-
hex: string;
5-
}[];
6-
}
1+
// declare module 'color-name-list' {
2+
// export const colornames: {
3+
// name: string;
4+
// hex: string;
5+
// }[];
6+
// }
7+
8+
declare module '*.css';

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
import "./.next/dev/types/routes.d.ts";
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

package.json

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -25,87 +25,91 @@
2525
"author": "Braswell Azu Kenneth Junior < [braswellkenneth7@gmail.com] >",
2626
"license": "MIT",
2727
"dependencies": {
28-
"@hookform/resolvers": "^5.2.1",
29-
"@radix-ui/react-dialog": "^1.1.14",
30-
"@radix-ui/react-dropdown-menu": "^2.1.15",
31-
"@radix-ui/react-label": "^2.1.7",
32-
"@radix-ui/react-radio-group": "^1.3.7",
33-
"@radix-ui/react-scroll-area": "^1.2.9",
34-
"@radix-ui/react-select": "^2.2.5",
35-
"@radix-ui/react-separator": "^1.1.7",
36-
"@radix-ui/react-slider": "^1.3.5",
37-
"@radix-ui/react-slot": "^1.2.3",
38-
"@radix-ui/react-tabs": "^1.1.12",
39-
"@radix-ui/react-toast": "^1.2.14",
40-
"@radix-ui/react-tooltip": "^1.2.7",
41-
"@tanstack/react-virtual": "^3.13.12",
42-
"autoprefixer": "^10.4.21",
28+
"@hookform/resolvers": "^5.2.2",
29+
"@radix-ui/react-dialog": "^1.1.15",
30+
"@radix-ui/react-dropdown-menu": "^2.1.16",
31+
"@radix-ui/react-label": "^2.1.8",
32+
"@radix-ui/react-radio-group": "^1.3.8",
33+
"@radix-ui/react-scroll-area": "^1.2.10",
34+
"@radix-ui/react-select": "^2.2.6",
35+
"@radix-ui/react-separator": "^1.1.8",
36+
"@radix-ui/react-slider": "^1.3.6",
37+
"@radix-ui/react-slot": "^1.2.4",
38+
"@radix-ui/react-tabs": "^1.1.13",
39+
"@radix-ui/react-toast": "^1.2.15",
40+
"@radix-ui/react-tooltip": "^1.2.8",
41+
"@tanstack/react-query": "^5.90.16",
42+
"@tanstack/react-virtual": "^3.13.14",
43+
"autoprefixer": "^10.4.23",
4344
"class-variance-authority": "^0.7.1",
4445
"clsx": "^2.1.1",
45-
"color-name-list": "^11.24.0",
46+
"color-name-list": "^14.15.1",
4647
"colord": "latest",
47-
"concurrently": "^9.2.0",
48-
"cssnano": "^7.1.0",
48+
"concurrently": "^9.2.1",
49+
"cssnano": "^7.1.2",
4950
"culori": "^4.0.2",
5051
"date-fns": "^4.1.0",
51-
"jotai": "^2.12.5",
52-
"lucide-react": "^0.535.0",
53-
"match-sorter": "^8.1.0",
52+
"jotai": "^2.16.1",
53+
"lucide-react": "^0.562.0",
54+
"match-sorter": "^8.2.0",
5455
"merge-refs": "^2.0.0",
5556
"million": "^3.1.11",
56-
"motion": "^12.23.12",
57+
"motion": "^12.23.26",
58+
"multithreading": "^0.3.45",
5759
"nearest-color": "^0.4.4",
58-
"next": "^15.4.5",
60+
"next": "^16.1.1",
5961
"next-pwa": "^5.6.0",
6062
"next-themes": "^0.4.6",
61-
"nuqs": "^2.4.3",
63+
"nuqs": "^2.8.6",
6264
"postcss": "^8.5.6",
6365
"react": "^19",
6466
"react-dom": "^19",
6567
"react-icons": "^5.5.0",
66-
"react-intersection-observer": "^9.16.0",
67-
"react-resizable-panels": "^3.0.4",
68+
"react-intersection-observer": "^10.0.0",
69+
"react-resizable-panels": "^4.1.1",
6870
"react-use": "^17.6.0",
6971
"react-use-measure": "^2.1.7",
7072
"seedrandom": "^3.0.5",
71-
"sonner": "^2.0.6",
72-
"swr": "^2.3.4",
73-
"tailwind-merge": "^3.3.1",
73+
"sonner": "^2.0.7",
74+
"swr": "^2.3.8",
75+
"tailwind-merge": "^3.4.0",
7476
"tailwindcss-animate": "^1.0.7",
7577
"tailwindcss-hocus": "^1.0.0",
7678
"ts-node": "^10",
77-
"tw-animate-css": "^1.3.6",
78-
"use-sync-external-store": "^1.5.0",
79+
"tw-animate-css": "^1.4.0",
80+
"use-sync-external-store": "^1.6.0",
7981
"vaul": "^1.1.2",
80-
"zustand": "^5.0.7"
82+
"zustand": "^5.0.9"
8183
},
8284
"devDependencies": {
83-
"@eslint/eslintrc": "^3.3.1",
85+
"@eslint/eslintrc": "^3.3.3",
8486
"@eslint/js": "^9",
87+
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
88+
"@next/eslint-plugin-next": "^16.1.1",
8589
"@tailwindcss/postcss": "^4",
86-
"@types/culori": "^4.0.0",
87-
"@types/lodash": "^4.17.20",
90+
"@tanstack/eslint-plugin-query": "^5.91.2",
91+
"@types/culori": "^4.0.1",
92+
"@types/lodash": "^4.17.21",
8893
"@types/nearest-color": "^0.4.1",
89-
"@types/node": "^24",
94+
"@types/node": "^25",
9095
"@types/react": "^19",
9196
"@types/react-dom": "^19",
9297
"eslint": "^9",
93-
"eslint-config-next": "15.4.5",
98+
"eslint-config-next": "16.1.1",
9499
"eslint-config-prettier": "^10.1.8",
95-
"eslint-plugin-prettier": "^5.5.3",
100+
"eslint-plugin-prettier": "^5.5.4",
96101
"eslint-plugin-react": "^7.37.5",
97-
"eslint-plugin-react-hooks": "^5.2.0",
98-
"globals": "^16.3.0",
102+
"eslint-plugin-react-hooks": "^7.0.1",
103+
"globals": "^16.5.0",
99104
"husky": "^9",
100105
"prettier": "^3",
101-
"prettier-plugin-organize-imports": "^4.2.0",
102-
"prettier-plugin-tailwindcss": "^0.6.14",
106+
"prettier-plugin-tailwindcss": "^0.7.2",
103107
"tailwindcss": "^4",
104-
"terser": "^5.43.1",
105-
"tsx": "^4.20.3",
108+
"terser": "^5.44.1",
109+
"tsx": "^4.21.0",
106110
"typescript": "^5",
107111
"typescript-eslint": "^8",
108-
"vitest": "^3.2.4"
112+
"vitest": "^4.0.16"
109113
},
110114
"engines": {
111115
"node": ">=20"

0 commit comments

Comments
 (0)