@webority/biome-config 0.38.0 → 0.40.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 CHANGED
@@ -46,6 +46,26 @@ fails every file in the repo at once, drowning any real violation (one repo's le
46
46
  static-list exceptions get a documented per-line `biome-ignore`.
47
47
  - **`noConsole`** off for `scripts/**` + `logger.js`; CSS/SCSS not linted; the icon
48
48
  module's mixed export allowed.
49
+ - **`StyleSheet.absoluteFillObject`** is an error, through the `no-absolute-fill-object` plugin
50
+ (below).
51
+
52
+ ## Plugins (GritQL)
53
+
54
+ The config ships lint plugins in `plugins/` and turns them on for every product that extends it:
55
+
56
+ | Plugin | Fails on | Why |
57
+ |---|---|---|
58
+ | `no-absolute-fill-object` | `StyleSheet.absoluteFillObject` | React Native 0.86 removed it. It is `undefined`, and spreading it silently leaves the view in the layout flow. Use `StyleSheet.absoluteFill` (spread it or use it directly). |
59
+
60
+ A plugin finding is an error, so `biome check` and `biome lint` fail on it.
61
+
62
+ **Your `biome.json` must sit beside the `node_modules` that holds `@webority/biome-config`.** Biome
63
+ resolves a plugin path against the folder of your own `biome.json`, not against this package, so the
64
+ config names its plugins as `./node_modules/@webority/biome-config/plugins/…`. That is the normal layout
65
+ for an app folder (`biome.json`, `package.json` and `node_modules` together). In any other layout Biome
66
+ stops with `Cannot read file` for the plugin on every run, so a wrong layout is never silent; a
67
+ workspace root that runs Biome adds `@webority/biome-config` to its own `devDependencies`. Needs
68
+ `@biomejs/biome` 2.5 or newer (checked on 2.5.5 and 2.5.15).
49
69
 
50
70
  Product-specific one-offs (a bespoke file that co-exports, etc.) still use a local
51
71
  `overrides` entry or a documented inline `biome-ignore` in that product.
package/biome.jsonc CHANGED
@@ -24,6 +24,12 @@
24
24
  "lineEnding": "lf",
25
25
  "useEditorconfig": false
26
26
  },
27
+ // GritQL lint plugins shipped in this package. Biome resolves a plugin path against the folder of
28
+ // the product's own biome.json, not against this file, so the path goes through node_modules:
29
+ // the product's biome.json must sit beside the node_modules that holds @webority/biome-config.
30
+ // A plugin that cannot be read fails every lint run, so a wrong layout is never silent.
31
+ // no-absolute-fill-object: StyleSheet.absoluteFillObject is gone in React Native 0.86 (undefined).
32
+ "plugins": ["./node_modules/@webority/biome-config/plugins/no-absolute-fill-object.grit"],
27
33
  "linter": {
28
34
  "enabled": true,
29
35
  "rules": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/biome-config",
3
- "version": "0.38.0",
3
+ "version": "0.40.0",
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": {
@@ -8,10 +8,12 @@
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "files": [
11
- "biome.jsonc"
11
+ "biome.jsonc",
12
+ "plugins"
12
13
  ],
13
14
  "exports": {
14
15
  "./biome.jsonc": "./biome.jsonc",
16
+ "./plugins/*": "./plugins/*",
15
17
  "./package.json": "./package.json"
16
18
  },
17
19
  "main": "biome.jsonc",
@@ -0,0 +1,7 @@
1
+ language js
2
+
3
+ // React Native 0.86 removed StyleSheet.absoluteFillObject. Spreading the undefined it now returns
4
+ // silently leaves the view in the layout flow, so the name is an error everywhere.
5
+ `StyleSheet.absoluteFillObject` as $use where {
6
+ register_diagnostic(span=$use, message="StyleSheet.absoluteFillObject was removed in React Native 0.86 and is undefined. Use StyleSheet.absoluteFill (spread it or use it directly).", severity="error")
7
+ }