@codedrifters/configulator 0.0.162 → 0.0.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +21 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +21 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1214,7 +1214,27 @@ var typescriptBundle = {
|
|
|
1214
1214
|
"- **Functions/Methods**: camelCase (e.g., `configureProject`)",
|
|
1215
1215
|
"- **Constants**: UPPER_SNAKE_CASE (e.g., `VERSION`, `AWS_STAGE_TYPE`)",
|
|
1216
1216
|
"- **Files**: kebab-case for multi-word files (e.g., `aws-deployment-config.ts`)",
|
|
1217
|
-
"- **
|
|
1217
|
+
"- **Component file naming**: kebab-case filename must mirror the PascalCase class name (e.g., `ResetTask` \u2192 `reset-task.ts`)",
|
|
1218
|
+
"- **Private members**: No prefix needed (TypeScript handles visibility)",
|
|
1219
|
+
"",
|
|
1220
|
+
"## Array Type Syntax",
|
|
1221
|
+
"",
|
|
1222
|
+
"- Prefer `Array<T>` over `T[]` for readability",
|
|
1223
|
+
"- For nested generics this is especially important: `Array<Array<string>>` is clearer than `string[][]`",
|
|
1224
|
+
"",
|
|
1225
|
+
"## Enum Preference",
|
|
1226
|
+
"",
|
|
1227
|
+
"- Prefer `as const` objects over TypeScript `enum` declarations",
|
|
1228
|
+
"- `as const` objects are more flexible: they support computed values, work with `keyof typeof`, and tree-shake better",
|
|
1229
|
+
"- Example:",
|
|
1230
|
+
" ```typescript",
|
|
1231
|
+
" // Prefer this:",
|
|
1232
|
+
" const Status = { Active: 'active', Inactive: 'inactive' } as const;",
|
|
1233
|
+
" type Status = (typeof Status)[keyof typeof Status];",
|
|
1234
|
+
"",
|
|
1235
|
+
" // Over this:",
|
|
1236
|
+
" enum Status { Active = 'active', Inactive = 'inactive' }",
|
|
1237
|
+
" ```"
|
|
1218
1238
|
].join("\n"),
|
|
1219
1239
|
tags: ["coding"]
|
|
1220
1240
|
}
|