@webority/biome-config 0.155.1 → 0.156.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/biome-config",
3
- "version": "0.155.1",
3
+ "version": "0.156.0",
4
4
  "description": "Shared Webority code standards: the Biome lint and format policy and the TypeScript compiler presets for web apps, phone apps, Razor page scripts and Node packages.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -1,7 +1,7 @@
1
1
  language js
2
2
 
3
3
  // react.md → API data: a screen reads an RTK Query result only as a DataState.
4
- // useListQuery and useInfiniteListQuery are web-core list hooks, not generated RTK Query hooks.
4
+ // A hook counts only when the file imports it from an API slice module (a path with an api segment, or a name ending in Api) or destructures it from a slice, so a boolean useMediaQuery passes.
5
5
  // A read that draws nothing for loading or error passes: one fed to a data hook through a variable, one that
6
6
  // picks its own fields with selectFromResult, a bare call that only holds the cache subscription, and one
7
7
  // destructured with none of the loading and error fields. A read of data alone draws without a loading state.
@@ -9,8 +9,13 @@ or {
9
9
  `$hook($args)` as $call where {
10
10
  $hook <: r"^use[A-Z][A-Za-z0-9]*Query$",
11
11
  $hook <: not r"^useLazy.*",
12
- $hook <: not r"^useListQuery$",
13
- $hook <: not r"^useInfiniteListQuery$"
12
+ or {
13
+ $program <: contains `import $clause from $source` where {
14
+ $clause <: contains $hook,
15
+ $source <: r"[\"'](?:.*/)?(?:api|apiSlice|[A-Za-z0-9_]*Api)(?:/.*)?[\"']"
16
+ },
17
+ $program <: contains `const $pat = $_` where { $pat <: JsObjectBindingPattern(), $pat <: contains $hook }
18
+ }
14
19
  },
15
20
  `$endpoint.useQuery($args)` as $call,
16
21
  `$endpoint.useInfiniteQuery($args)` as $call