@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.
- package/README.md +12 -13
- package/docs/Guides/_category_.json +2 -2
- package/docs/Guides/migrating.md +33 -16
- package/docs/Guides/setup.md +46 -18
- package/docs/Standards/_category_.json +2 -2
- package/docs/Standards/agent-skills.md +29 -29
- package/docs/Standards/agent-specs.md +17 -32
- package/docs/Standards/direnv.mdx +8 -8
- package/docs/Standards/documentation.md +5 -2
- package/docs/Standards/editorconfig.md +23 -21
- package/docs/Standards/eslint.md +593 -402
- package/docs/Standards/human-readable-names.md +61 -21
- package/docs/Standards/lint-errors.md +37 -5
- package/docs/Standards/prettier.md +35 -26
- package/docs/Standards/readable-code.md +30 -0
- package/docs/Standards/stylelint.md +26 -11
- package/docs/Standards/styling.md +9 -3
- package/docs/Standards/tech-stack.md +3 -1
- package/docs/Structure/_category_.json +2 -2
- package/docs/Structure/component-organization.md +9 -2
- package/docs/Structure/folder-structure.md +26 -13
- package/docs/Structure/naming-conventions.md +0 -2
- package/docs/intro.md +1 -3
- package/docs/ontology.md +21 -26
- package/docs/templates.mdx +15 -38
- package/docs/version-history.md +133 -6
- package/package.json +6 -2
- package/scripts/renameSymbol.mjs +188 -0
- package/static/templates/.editorconfig +8 -11
- package/static/templates/AGENTS.md +16 -13
- package/static/templates/docs/development/coding-standards.md +4 -0
- package/static/templates/docsSite/docusaurus.config.mjs +144 -0
- package/static/templates/docsSite/sidebars.mjs +7 -0
- package/static/templates/docsSite/src/css/custom.css +6 -0
- package/static/templates/docsSite/tsconfig.json +5 -5
- package/static/templates/eslint/base/eslint.config.mjs +95 -70
- package/static/templates/eslint/nextjs/eslint.config.mjs +170 -126
- package/static/templates/eslint/react/eslint.config.mjs +160 -125
- package/static/templates/eslint/typescript/eslint.config.mjs +143 -115
- package/static/templates/globals.css +9 -9
- package/static/templates/next.config.mjs +13 -10
- package/static/templates/prettier.config.mjs +26 -0
- package/static/templates/stylelint/css/stylelint.config.mjs +37 -25
- package/static/templates/stylelint/scss/stylelint.config.mjs +10 -7
- package/docs/Standards/branch-naming.md +0 -66
- package/docs/Standards/conventional-commits.md +0 -189
- package/static/templates/.commitlintrc.json +0 -3
- package/static/templates/docsSite/docusaurus.config.ts +0 -119
- package/static/templates/docsSite/sidebars.ts +0 -8
- package/static/templates/husky/commit-msg +0 -1
- 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 =
|
|
20
|
+
indent_style = tab
|
|
21
21
|
insert_final_newline = true
|
|
22
22
|
trim_trailing_whitespace = true
|
|
23
23
|
|
|
24
|
-
|
|
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
|
-
|
|
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
|
|
49
|
-
|
|
|
50
|
-
| `charset`
|
|
51
|
-
| `end_of_line`
|
|
52
|
-
| `indent_size`
|
|
53
|
-
| `indent_style`
|
|
54
|
-
| `insert_final_newline`
|
|
55
|
-
| `trim_trailing_whitespace` | `true`
|
|
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
|
-
##
|
|
58
|
+
## Files that use spaces
|
|
62
59
|
|
|
63
|
-
|
|
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
|
|