Skip to content

Commit f2d478f

Browse files
committed
refactor: ♻️ code structure for improved readability and maintainability
1 parent 7144e44 commit f2d478f

8 files changed

Lines changed: 275 additions & 292 deletions

File tree

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm commitlint --edit $1 --config config/commitlint.config.ts
1+
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm lint-staged --config config/lint-staged.config.mjs
1+
pnpm lint-staged --config lint-staged.config.mjs

.vscode/settings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"quickfix.biome": "explicit",
4-
"source.fixAll": "explicit",
5-
"source.organizeImports.biome": "explicit"
3+
"source.fixAll.biome": "explicit"
64
},
75
"editor.defaultFormatter": "biomejs.biome",
86
"editor.formatOnSave": true

biome.json

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
33
"assist": {
44
"actions": {
55
"source": {
@@ -22,7 +22,8 @@
2222
}
2323
},
2424
"useSortedAttributes": "on",
25-
"useSortedKeys": "on"
25+
"useSortedKeys": "on",
26+
"useSortedProperties": "on"
2627
}
2728
},
2829
"enabled": true
@@ -37,8 +38,7 @@
3738
"!**/dist",
3839
"!**/node_modules",
3940
"!**/pnpm-lock.yaml",
40-
"!**/*.log",
41-
"!turbo/generators/templates/**"
41+
"!**/*.log"
4242
]
4343
},
4444
"formatter": {
@@ -66,12 +66,7 @@
6666
"test": "all"
6767
},
6868
"enabled": true,
69-
"includes": [
70-
"**",
71-
"!**/.vscode",
72-
"!**/dist",
73-
"!turbo/generators/templates/**"
74-
],
69+
"includes": ["**", "!**/.vscode", "!**/dist"],
7570
"rules": {
7671
"complexity": {
7772
"noExcessiveCognitiveComplexity": "error",
@@ -81,26 +76,21 @@
8176
},
8277
"correctness": {
8378
"noConstantMathMinMaxClamp": "error",
79+
"noNestedComponentDefinitions": "error",
8480
"noPrivateImports": "error",
8581
"noUnusedFunctionParameters": "error",
8682
"noUnusedImports": "error",
8783
"noUnusedPrivateClassMembers": "error",
8884
"noUnusedVariables": "error",
89-
"useHookAtTopLevel": "error"
85+
"useHookAtTopLevel": "error",
86+
"useJsxKeyInIterable": "error",
87+
"useParseIntRadix": "error",
88+
"useSingleJsDocAsterisk": "error"
9089
},
9190
"nursery": {
9291
"noFloatingPromises": "error",
93-
"noUselessBackrefInRegex": "error",
94-
"noUselessEscapeInString": "error",
9592
"noUselessUndefined": "error",
96-
"useConsistentObjectDefinition": "error",
97-
"useConsistentResponse": "error",
98-
"useExhaustiveSwitchCases": "error",
99-
"useNumericSeparators": "error",
100-
"useObjectSpread": "error",
101-
"useParseIntRadix": "error",
102-
"useSingleJsDocAsterisk": "error",
103-
"useSymbolDescription": "error"
93+
"useExhaustiveSwitchCases": "error"
10494
},
10595
"recommended": true,
10696
"style": {
@@ -118,6 +108,7 @@
118108
"useCollapsedElseIf": "error",
119109
"useConsistentArrayType": "error",
120110
"useConsistentBuiltinInstantiation": "error",
111+
"useConsistentObjectDefinitions": "error",
121112
"useDefaultParameterLast": "error",
122113
"useDefaultSwitchClause": "error",
123114
"useEnumInitializers": "error",
@@ -136,20 +127,25 @@
136127
}
137128
},
138129
"useNumberNamespace": "error",
130+
"useNumericSeparators": "error",
131+
"useObjectSpread": "error",
139132
"useSelfClosingElements": "error",
140133
"useSingleVarDeclarator": "error",
134+
"useSymbolDescription": "error",
141135
"useThrowNewError": "error"
142136
},
143137
"suspicious": {
144138
"noEmptyBlockStatements": "error",
145-
"useAwait": "off",
146-
"useErrorMessage": "error"
139+
"noUselessEscapeInString": "error",
140+
"noUselessRegexBackrefs": "error",
141+
"useErrorMessage": "error",
142+
"useStaticResponseMethods": "error"
147143
}
148144
}
149145
},
150146
"vcs": {
151147
"clientKind": "git",
152-
"enabled": false,
153-
"useIgnoreFile": false
148+
"enabled": true,
149+
"useIgnoreFile": true
154150
}
155151
}

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
"name": "gracefullight"
55
},
66
"devDependencies": {
7-
"@biomejs/biome": "^2.1.1",
8-
"@changesets/cli": "^2.29.6",
9-
"@commitlint/cli": "^19.8.1",
10-
"@commitlint/config-conventional": "^19.8.1",
11-
"@commitlint/types": "^19.8.1",
12-
"@turbo/gen": "^2.5.6",
7+
"@biomejs/biome": "^2.2.6",
8+
"@changesets/cli": "^2.29.7",
9+
"@commitlint/cli": "^20.1.0",
10+
"@commitlint/config-conventional": "^20.0.0",
11+
"@commitlint/types": "^20.0.0",
12+
"@turbo/gen": "^2.5.8",
1313
"devmoji": "^2.3.0",
14-
"es-toolkit": "^1.39.10",
14+
"es-toolkit": "^1.40.0",
1515
"husky": "^9.1.7",
16-
"lint-staged": "^16.1.6",
16+
"lint-staged": "^16.2.5",
1717
"tsup": "^8.5.0",
18-
"tsx": "^4.20.5",
19-
"turbo": "^2.5.6"
18+
"tsx": "^4.20.6",
19+
"turbo": "^2.5.8"
2020
},
2121
"engines": {
2222
"node": "22",
2323
"pnpm": "10"
2424
},
2525
"name": "@gracefullight/docusaurus-plugins",
26-
"packageManager": "pnpm@10.15.1",
26+
"packageManager": "pnpm@10.19.0",
2727
"private": true,
2828
"repository": "https://github.com/gracefullight/docusaurus-plugins",
2929
"scripts": {

0 commit comments

Comments
 (0)