@activatus/code-standards 2.0.0 → 3.0.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.
Files changed (51) hide show
  1. package/README.md +12 -13
  2. package/docs/Guides/_category_.json +2 -2
  3. package/docs/Guides/migrating.md +33 -16
  4. package/docs/Guides/setup.md +46 -18
  5. package/docs/Standards/_category_.json +2 -2
  6. package/docs/Standards/agent-skills.md +29 -29
  7. package/docs/Standards/agent-specs.md +17 -32
  8. package/docs/Standards/direnv.mdx +8 -8
  9. package/docs/Standards/documentation.md +5 -2
  10. package/docs/Standards/editorconfig.md +23 -21
  11. package/docs/Standards/eslint.md +593 -402
  12. package/docs/Standards/human-readable-names.md +61 -21
  13. package/docs/Standards/lint-errors.md +37 -5
  14. package/docs/Standards/prettier.md +35 -26
  15. package/docs/Standards/readable-code.md +30 -0
  16. package/docs/Standards/stylelint.md +26 -11
  17. package/docs/Standards/styling.md +9 -3
  18. package/docs/Standards/tech-stack.md +3 -1
  19. package/docs/Structure/_category_.json +2 -2
  20. package/docs/Structure/component-organization.md +9 -2
  21. package/docs/Structure/folder-structure.md +26 -13
  22. package/docs/Structure/naming-conventions.md +0 -2
  23. package/docs/intro.md +1 -3
  24. package/docs/ontology.md +21 -26
  25. package/docs/templates.mdx +15 -38
  26. package/docs/version-history.md +133 -6
  27. package/package.json +6 -2
  28. package/scripts/renameSymbol.mjs +188 -0
  29. package/static/templates/.editorconfig +8 -11
  30. package/static/templates/AGENTS.md +16 -13
  31. package/static/templates/docs/development/coding-standards.md +4 -0
  32. package/static/templates/docsSite/docusaurus.config.mjs +144 -0
  33. package/static/templates/docsSite/sidebars.mjs +7 -0
  34. package/static/templates/docsSite/src/css/custom.css +6 -0
  35. package/static/templates/docsSite/tsconfig.json +5 -5
  36. package/static/templates/eslint/base/eslint.config.mjs +95 -70
  37. package/static/templates/eslint/nextjs/eslint.config.mjs +170 -126
  38. package/static/templates/eslint/react/eslint.config.mjs +160 -125
  39. package/static/templates/eslint/typescript/eslint.config.mjs +143 -115
  40. package/static/templates/globals.css +9 -9
  41. package/static/templates/next.config.mjs +13 -10
  42. package/static/templates/prettier.config.mjs +26 -0
  43. package/static/templates/stylelint/css/stylelint.config.mjs +37 -25
  44. package/static/templates/stylelint/scss/stylelint.config.mjs +10 -7
  45. package/docs/Standards/branch-naming.md +0 -66
  46. package/docs/Standards/conventional-commits.md +0 -189
  47. package/static/templates/.commitlintrc.json +0 -3
  48. package/static/templates/docsSite/docusaurus.config.ts +0 -119
  49. package/static/templates/docsSite/sidebars.ts +0 -8
  50. package/static/templates/husky/commit-msg +0 -1
  51. package/static/templates/prettier.config.js +0 -17
@@ -17,27 +17,24 @@ root = true
17
17
  charset = utf-8
18
18
  end_of_line = lf
19
19
  indent_size = 2
20
- indent_style = space
20
+ indent_style = tab
21
21
  insert_final_newline = true
22
22
  trim_trailing_whitespace = true
23
23
 
24
- [*.md]
24
+ # Markdown reads a tab as four spaces, so it uses spaces.
25
+ [*.{md,mdx}]
26
+ indent_style = space
25
27
  trim_trailing_whitespace = false
26
28
  max_line_length = off
27
29
 
30
+ # YAML does not allow tabs.
28
31
  [*.{yml,yaml}]
32
+ indent_style = space
29
33
  indent_size = 2
30
34
 
31
- [*.json]
32
- indent_size = 2
33
-
34
- [Makefile]
35
- indent_style = tab
36
-
37
- [*.go]
38
- indent_style = tab
39
-
35
+ # Python's own style guide uses 4 spaces.
40
36
  [*.py]
37
+ indent_style = space
41
38
  indent_size = 4
42
39
  ```
43
40
 
@@ -45,27 +42,32 @@ No package installation required — EditorConfig is a file-based standard.
45
42
 
46
43
  ## Rule reference
47
44
 
48
- | Rule | Value | Rationale |
49
- | --- | --- | --- |
50
- | `charset` | `utf-8` | Universal default; avoids encoding issues on cross-platform teams |
51
- | `end_of_line` | `lf` | Unix line endings everywhere; Windows devs should set `core.autocrlf = input` in git |
52
- | `indent_size` | `2` | Standard for JS/TS/JSON/YAML; overridden for Python (`4`) and tab-based languages |
53
- | `indent_style` | `space` | Consistent rendering across editors; tab width is a display preference that breaks alignment |
54
- | `insert_final_newline` | `true` | POSIX standard; avoids noisy diffs when appending to files |
55
- | `trim_trailing_whitespace` | `true` | Prevents invisible diff noise; **disabled for Markdown** where trailing spaces are significant |
45
+ | Rule | Value | Rationale |
46
+ | -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
47
+ | `charset` | `utf-8` | Universal default; avoids encoding issues on cross-platform teams |
48
+ | `end_of_line` | `lf` | Unix line endings everywhere; Windows devs should set `core.autocrlf = input` in git |
49
+ | `indent_size` | `2` | How wide a tab shows, and the indent for files that use spaces. Python uses `4` |
50
+ | `indent_style` | `tab` | Tabs indent code. Each person sees the indent at the width they like, and files are smaller. Markdown, YAML and Python use spaces |
51
+ | `insert_final_newline` | `true` | POSIX standard; avoids noisy diffs when appending to files |
52
+ | `trim_trailing_whitespace` | `true` | Prevents invisible diff noise; **disabled for Markdown** where trailing spaces are significant |
56
53
 
57
54
  ## Markdown exception
58
55
 
59
56
  In Markdown, two trailing spaces before a newline produce a `<br>` (hard line break). Trimming trailing whitespace would silently corrupt Markdown documents, so `trim_trailing_whitespace = false` is set for `*.md` files.
60
57
 
61
- ## Go & Makefile exception
58
+ ## Files that use spaces
62
59
 
63
- Both Go source files (enforced by `gofmt`) and Makefiles **require** tab indentation. The config sets `indent_style = tab` for these file types to stay consistent with their tooling.
60
+ | Files | Why |
61
+ | -------------------------- | ----------------------------------------------------------------- |
62
+ | Markdown (`*.md`, `*.mdx`) | Markdown reads a tab as four spaces, which can break nested lists |
63
+ | YAML (`*.yml`, `*.yaml`) | YAML does not allow tabs |
64
+ | Python (`*.py`) | Python's own style guide uses 4 spaces |
64
65
 
65
66
  ## Alignment with other tools
66
67
 
67
68
  The EditorConfig settings deliberately mirror the Prettier config:
68
69
 
70
+ - `indent_style: tab` ↔ `useTabs: true`
69
71
  - `indent_size: 2` ↔ `tabWidth: 2`
70
72
  - `end_of_line: lf` ↔ `endOfLine: "lf"`
71
73