@webority/biome-config 0.8.5 → 0.8.6

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 (3) hide show
  1. package/README.md +16 -7
  2. package/biome.jsonc +9 -3
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -8,12 +8,15 @@ drifts. Same model as the shared `@webority/theme` + `@webority/ui-react`.
8
8
  ## Use
9
9
 
10
10
  ```bash
11
- npm install -D @webority/biome-config @biomejs/biome
11
+ npm install -D --save-exact @webority/biome-config
12
+ npm install -D @biomejs/biome
12
13
  ```
13
14
 
15
+ `--save-exact` is deliberate — pin `@webority/*` to an exact version, never `^`, so a
16
+ policy change arrives when you bump it rather than on someone's next `npm install`.
17
+
14
18
  Then a product's `biome.json` extends this base and adds **only** its own repo-specific
15
- bits — `vcs.root`, `files.includes`, and `formatter.lineEnding` (LF is Biome's default;
16
- set `crlf` only for a CRLF repo):
19
+ bits — `vcs.root` and `files.includes`:
17
20
 
18
21
  ```jsonc
19
22
  {
@@ -23,15 +26,21 @@ set `crlf` only for a CRLF repo):
23
26
  "files": {
24
27
  "ignoreUnknown": true,
25
28
  "includes": ["**", "!!**/dist", "!!**/build", "!!**/node_modules", "!**/src/appsettings.Compiled.json", "!**/public/version.json"]
26
- },
27
- // Only if the repo is CRLF (e.g. a Windows repo with `end_of_line = crlf`).
28
- "formatter": { "lineEnding": "crlf" }
29
+ }
29
30
  }
30
31
  ```
31
32
 
33
+ **Never set `formatter.lineEnding` in a product.** It is `lf` here, for every consuming
34
+ repo, matching their `.gitattributes` (`* text=auto eol=lf`) and `.editorconfig`
35
+ (`end_of_line = lf`). This config sets `useEditorconfig: false`, so the value above is the
36
+ *only* place the line ending is stated — a local override is the deviation, and a stale one
37
+ fails every file in the repo at once, drowning any real violation (one repo's leftover
38
+ `"lineEnding": "crlf"` failed 198 of its 203 files; removing it left 1).
39
+
32
40
  ## What's decided here (once, for every repo)
33
41
 
34
- - **Format:** 4-space, width 140, double quotes, semicolons, trailing commas.
42
+ - **Format:** 4-space, width 140, double quotes, semicolons, trailing commas, **LF line
43
+ endings** (`useEditorconfig: false`, so this file is the sole authority — see above).
35
44
  - **`useExhaustiveDependencies: off`** — noise-by-nature on correct React effect/RHF code.
36
45
  - **`noArrayIndexKey: warn`** — kept on (catches real dynamic-list bugs); genuine
37
46
  static-list exceptions get a documented per-line `biome-ignore`.
package/biome.jsonc CHANGED
@@ -5,7 +5,8 @@
5
5
  // competing root inside the monorepo that ships it.
6
6
  "root": false,
7
7
  // Shared Webority frontend lint + format policy. Products EXTEND this and add
8
- // only their own repo-specific bits (vcs.root, files.includes, formatter.lineEnding).
8
+ // only their own repo-specific bits (vcs.root, files.includes). Never
9
+ // formatter.lineEnding — that is decided here, once, for every consuming repo.
9
10
  // Every rule decision below is made ONCE for every Webority repo, with rationale, and inherited
10
11
  // by every product via a version bump — no per-repo drift.
11
12
  "formatter": {
@@ -16,6 +17,11 @@
16
17
  "attributePosition": "auto",
17
18
  "bracketSameLine": false,
18
19
  "bracketSpacing": true,
20
+ // LF everywhere, matching every repo's `.gitattributes` (`* text=auto eol=lf`).
21
+ // A product must not override this: a stale `crlf` here fails every file at once
22
+ // and drowns real violations. With useEditorconfig off, this is the only place
23
+ // the line ending is stated, so it must be stated.
24
+ "lineEnding": "lf",
19
25
  "useEditorconfig": false
20
26
  },
21
27
  "linter": {
@@ -93,8 +99,8 @@
93
99
  }
94
100
  },
95
101
  {
96
- // The icon module co-exports a component + its glyph map by design.
97
- "includes": ["**/icons.jsx"],
102
+ // The icon modules co-export a component + their glyph/name maps by design.
103
+ "includes": ["**/AppIcon.jsx", "**/ModalIcons.jsx"],
98
104
  "linter": {
99
105
  "rules": {
100
106
  "style": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/biome-config",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "description": "Shared Biome lint + format policy for Webority frontend products. Extend it from a product biome.json so every repo inherits one fleet-decided ruleset, bumped by version — no per-repo drift.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -15,6 +15,10 @@
15
15
  "files": [
16
16
  "biome.jsonc"
17
17
  ],
18
+ "exports": {
19
+ "./biome.jsonc": "./biome.jsonc",
20
+ "./package.json": "./package.json"
21
+ },
18
22
  "main": "biome.jsonc",
19
23
  "peerDependencies": {
20
24
  "@biomejs/biome": ">=2.5.0"