@peerigon/configs 14.0.8 → 14.1.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [14.1.0](https://github.com/peerigon/configs/compare/v14.0.8...v14.1.0) (2026-02-13)
2
+
3
+ ### Features
4
+
5
+ - Add file and class structure to coding style guidelines ([265c438](https://github.com/peerigon/configs/commit/265c4383d95cd4748d9c94fd6266cf3b3b54cad7))
6
+
1
7
  ## [14.0.8](https://github.com/peerigon/configs/compare/v14.0.7...v14.0.8) (2026-02-12)
2
8
 
3
9
  ### Bug Fixes
@@ -20,6 +20,15 @@ globs: **/*.js, **/*.ts, **/*.mjs, **/*.cjs, **/*.mts, **/*.cts
20
20
  - Avoid default imports and default exports
21
21
  - Avoid barrel files (index files that only re-export) unless its a package entry file
22
22
 
23
+ ## File structure
24
+
25
+ - Begin with a `@file` overview JSDoc comment (**not** for test or config files)
26
+ - Then imports
27
+ - Then important top-level constants or variables
28
+ - Then order by importance (in relation to the file purpose): the most important classes/functions of the file should be at the beginning
29
+ - Unimportant helper functions and variables should be at the bottom of the file
30
+ - Exception: when module execution requires a function to be defined before it is used, define it earlier
31
+
23
32
  ## Naming Conventions
24
33
 
25
34
  - `camelCase` for variables, functions, methods
@@ -63,6 +72,12 @@ globs: **/*.js, **/*.ts, **/*.mjs, **/*.cjs, **/*.mts, **/*.cts
63
72
  - Write pure functions when possible
64
73
  - Optimize function names for readability on the call side
65
74
 
75
+ ## Class structure
76
+
77
+ - Constructor **must** be at the top of the class
78
+ - Then properties: public first, then private; order by importance in relation to the class purpose
79
+ - Then methods: public first, then private; order by importance in relation to the class purpose
80
+
66
81
  ## Types
67
82
 
68
83
  - Use strict mode
@@ -81,7 +96,6 @@ globs: **/*.js, **/*.ts, **/*.mjs, **/*.cjs, **/*.mts, **/*.cts
81
96
  ## Comments
82
97
 
83
98
  - Use JSDoc comments and its tags where appropriate
84
- - When generating new files, include a `@file` overview at the top of the file (**not** for test files or config files)
85
99
 
86
100
  ## Testing
87
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerigon/configs",
3
- "version": "14.0.8",
3
+ "version": "14.1.0",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",