@peerigon/configs 14.7.0 → 14.8.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.8.0](https://github.com/peerigon/configs/compare/v14.7.0...v14.8.0) (2026-03-16)
2
+
3
+ ### Features
4
+
5
+ - **ai:** Apply best practices from "A Philosophy of Software Design" ([ad5f17d](https://github.com/peerigon/configs/commit/ad5f17dfc6534196fb65813682a2a429f7eb0495))
6
+
1
7
  # [14.7.0](https://github.com/peerigon/configs/compare/v14.6.0...v14.7.0) (2026-03-16)
2
8
 
3
9
  ### Features
@@ -100,7 +100,9 @@ globs: **/*.js, **/*.ts, **/*.mjs, **/*.cjs, **/*.mts, **/*.cts
100
100
 
101
101
  ## Comments
102
102
 
103
- - Use JSDoc comments and its tags where appropriate
103
+ - Use comments to explain why, invariants, constraints, and non-obvious trade-offs
104
+ - Do not write comments that only restate what the code already makes obvious
105
+ - Add short contract comments only for complex or high-impact exports. Focus on purpose, guarantees, and important caveats.
104
106
 
105
107
  ## Testing
106
108
 
@@ -9,6 +9,7 @@ globs: **/*.tsx, **/*.jsx
9
9
  - Inline component props next to the component prop argument
10
10
  - Derive state where possible
11
11
  - Avoid unnecessary `useState` and `useEffect`
12
- - `useEffect` **must** contain an async function call (unless it's a synchronous browser api like `localStorage`)
12
+ - Use `useEffect` only when synchronizing with external systems (for example browser APIs, subscriptions, timers, network interactions)
13
+ - Keep effects small, deterministic, and cleanup-safe
13
14
  - Avoid `useMemo` and `useCallback` unless its absolutely necessary
14
15
  - Create a story for each React component if Storybook is used
@@ -7,7 +7,7 @@ globs: **/*.test.js, **/*.test.ts, **/*.test.tsx
7
7
 
8
8
  ## General principle
9
9
 
10
- **Important**: Write as less tests as possible while covering all relevant scenarios. Focus on testing the behavior of the code rather than implementation details.
10
+ **Important**: Aim for the smallest high-value test set that protects behavior, interface contracts, invariants, and regression-prone paths. Focus on testing behavior rather than implementation details.
11
11
 
12
12
  ## Structure & Organization
13
13
 
package/ai/rules.mdc CHANGED
@@ -14,6 +14,12 @@ alwaysApply: true
14
14
  - Prefer explicit over implicit
15
15
  - Keep code close together that belongs together
16
16
 
17
+ ## Complexity and module design
18
+
19
+ - Treat complexity as the primary enemy. Prefer designs that reduce mental load, special cases, and cross-module coupling.
20
+ - Prefer deep modules with shallow interfaces: expose minimal API surface and hide implementation details by default.
21
+ - Avoid pass-through abstractions that add layers but do not hide meaningful complexity.
22
+
17
23
  ## JavaScript & TypeScript
18
24
 
19
25
  See [Coding Styleguide JavaScript & TypeScript](./coding-styleguide-js-ts.mdc)
@@ -37,7 +43,7 @@ See [Coding Styleguide Shell Scripts](./coding-styleguide-sh.mdc)
37
43
  - Write unit tests for simple, pure functions
38
44
  - Unit test files are colocated with source files (\*.test.ts)
39
45
  - Write integration or e2e tests for more complex functions/classes/components
40
- - Run the linter and type checker only once after the implementation is complete and the tests are passing
46
+ - Prefer staged validation for non-trivial tasks: run focused checks after meaningful changes, then run broader lint/type/test checks before handoff. For trivial tasks, a single final validation is acceptable.
41
47
  - Adjust documentation both in comments and markdown files once you're done
42
48
 
43
49
  ## Consumer-repo uncertainty protocol
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerigon/configs",
3
- "version": "14.7.0",
3
+ "version": "14.8.0",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",