@gspothq/cli 0.1.1 → 0.2.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 (205) hide show
  1. package/README.md +58 -11
  2. package/configurations/database/postgres/manifest.toml +51 -57
  3. package/configurations/database/postgres/rules/POSTGRES.md +14 -13
  4. package/configurations/framework/astro/manifest.toml +33 -35
  5. package/configurations/framework/astro/rules/ASTRO.md +2 -2
  6. package/configurations/framework/expo/manifest.toml +19 -19
  7. package/configurations/framework/express/manifest.toml +10 -4
  8. package/configurations/framework/express/rules/EXPRESS.md +9 -7
  9. package/configurations/framework/fastapi/manifest.toml +9 -3
  10. package/configurations/framework/fastapi/rules/FASTAPI.md +19 -18
  11. package/configurations/framework/nestjs/manifest.toml +12 -12
  12. package/configurations/framework/nestjs/rules/NESTJS.md +9 -9
  13. package/configurations/framework/nextjs/manifest.toml +39 -79
  14. package/configurations/framework/nextjs/rules/NEXTJS.md +9 -7
  15. package/configurations/framework/nextjs/tool-files/semgrep/nextjs.yml +35 -0
  16. package/configurations/framework/react/manifest.toml +33 -43
  17. package/configurations/framework/react/rules/REACT.md +14 -20
  18. package/configurations/framework/react-dom/manifest.toml +6 -6
  19. package/configurations/framework/react-native/manifest.toml +11 -11
  20. package/configurations/framework/react-native/rules/REACT-NATIVE.md +3 -5
  21. package/configurations/framework/site/manifest.toml +57 -110
  22. package/configurations/framework/site/rules/SITE.md +1 -1
  23. package/configurations/framework/svelte/manifest.toml +29 -31
  24. package/configurations/framework/svelte/rules/SVELTE.md +6 -6
  25. package/configurations/framework/vue/manifest.toml +37 -37
  26. package/configurations/framework/vue/rules/VUE.md +6 -6
  27. package/configurations/general/commits/manifest.toml +20 -84
  28. package/configurations/general/commits/rules/GIT.md +24 -13
  29. package/configurations/general/coverage/manifest.toml +1 -1
  30. package/configurations/general/dependencies/manifest.toml +47 -107
  31. package/configurations/general/dependencies/rules/DEPENDENCIES.md +13 -7
  32. package/configurations/general/docs/manifest.toml +28 -43
  33. package/configurations/general/docs/rules/DOCS.md +16 -9
  34. package/configurations/general/duplication/manifest.toml +12 -14
  35. package/configurations/general/engineering/manifest.toml +6 -2
  36. package/configurations/general/engineering/rules/agent/PLANNING.md +9 -6
  37. package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +20 -11
  38. package/configurations/general/engineering/rules/agent/TASKS.md +6 -2
  39. package/configurations/general/engineering/rules/agent/WORKING.md +34 -29
  40. package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +9 -7
  41. package/configurations/general/engineering/rules/code/CLI.md +12 -9
  42. package/configurations/general/engineering/rules/code/COMMENTS.md +11 -1
  43. package/configurations/general/engineering/rules/code/CONFIGURATION.md +2 -0
  44. package/configurations/general/engineering/rules/code/ERRORS.md +5 -3
  45. package/configurations/general/engineering/rules/code/HTTP.md +9 -10
  46. package/configurations/general/engineering/rules/code/LOGGING.md +10 -9
  47. package/configurations/general/engineering/rules/code/TESTING.md +18 -11
  48. package/configurations/general/files/manifest.toml +45 -73
  49. package/configurations/general/files/rules/YAML.md +20 -10
  50. package/configurations/general/format/manifest.toml +53 -106
  51. package/configurations/general/gspot/manifest.toml +19 -39
  52. package/configurations/general/gspot/rules/GENERATED.md +14 -4
  53. package/configurations/general/licenses/manifest.toml +12 -14
  54. package/configurations/general/naming/defaults.json +14 -13
  55. package/configurations/general/naming/manifest.toml +17 -17
  56. package/configurations/general/naming/rules/NAMING.md +87 -67
  57. package/configurations/general/prose/manifest.toml +166 -25
  58. package/configurations/general/prose/rules/WRITING.md +6 -2
  59. package/configurations/general/repository/manifest.toml +12 -12
  60. package/configurations/general/secrets/manifest.toml +52 -73
  61. package/configurations/general/secrets/rules/SECRETS.md +3 -1
  62. package/configurations/general/security/manifest.toml +29 -52
  63. package/configurations/general/security/rules/SECURITY.md +8 -6
  64. package/configurations/general/spelling/manifest.toml +15 -25
  65. package/configurations/general/structure/manifest.toml +31 -31
  66. package/configurations/infrastructure/ansible/manifest.toml +15 -15
  67. package/configurations/infrastructure/docker/manifest.toml +55 -67
  68. package/configurations/infrastructure/docker/rules/DOCKER.md +15 -13
  69. package/configurations/infrastructure/github-actions/manifest.toml +21 -41
  70. package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +16 -12
  71. package/configurations/infrastructure/github-actions/tool-files/zizmor.yml +5 -0
  72. package/configurations/infrastructure/nginx/manifest.toml +20 -20
  73. package/configurations/infrastructure/nginx/rules/NGINX.md +5 -4
  74. package/configurations/infrastructure/openapi/manifest.toml +20 -20
  75. package/configurations/infrastructure/openapi/rules/OPENAPI.md +3 -1
  76. package/configurations/infrastructure/xcode/manifest.toml +55 -75
  77. package/configurations/infrastructure/xcode/rules/XCODE.md +5 -3
  78. package/configurations/language/bash/manifest.toml +89 -170
  79. package/configurations/language/bash/rules/BASH.md +79 -17
  80. package/configurations/language/bash/rules/LANGUAGE.md +30 -26
  81. package/configurations/language/bash/rules/OPERATIONS.md +10 -8
  82. package/configurations/language/bash/rules/SAFETY.md +39 -35
  83. package/configurations/language/css/manifest.toml +22 -61
  84. package/configurations/language/css/rules/CSS.md +21 -2
  85. package/configurations/language/css/rules/TAILWIND.md +7 -5
  86. package/configurations/language/html/manifest.toml +16 -35
  87. package/configurations/language/html/rules/HTML.md +23 -5
  88. package/configurations/language/javascript/eslint-runtime-names.json +66 -61
  89. package/configurations/language/javascript/eslint-runtime.mjs +118 -0
  90. package/configurations/language/javascript/manifest.toml +135 -207
  91. package/configurations/language/javascript/rules/BUN.md +2 -2
  92. package/configurations/language/javascript/rules/COMPONENTS.md +4 -4
  93. package/configurations/language/javascript/rules/DENO.md +1 -1
  94. package/configurations/language/javascript/rules/JAVASCRIPT.md +30 -17
  95. package/configurations/language/javascript/rules/NODE.md +2 -2
  96. package/configurations/language/javascript/rules/PLAYWRIGHT.md +10 -9
  97. package/configurations/language/markdown/manifest.toml +20 -51
  98. package/configurations/language/python/manifest.toml +231 -342
  99. package/configurations/language/python/rules/DESIGN.md +40 -33
  100. package/configurations/language/python/rules/FLOW.md +8 -6
  101. package/configurations/language/python/rules/PACKAGING.md +14 -7
  102. package/configurations/language/python/rules/PYTHON.md +83 -33
  103. package/configurations/language/python/rules/TYPING.md +25 -23
  104. package/configurations/language/sql/manifest.toml +19 -37
  105. package/configurations/language/sql/rules/SQL.md +90 -2
  106. package/configurations/language/swift/manifest.toml +67 -78
  107. package/configurations/language/swift/rules/SWIFT.md +138 -40
  108. package/configurations/language/swift/rules/SWIFTUI.md +11 -9
  109. package/configurations/language/swift/rules/UIKIT.md +21 -19
  110. package/configurations/language/typescript/manifest.toml +34 -34
  111. package/configurations/language/typescript/rules/TYPESCRIPT.md +62 -10
  112. package/configurations/library/drizzle/manifest.toml +25 -38
  113. package/configurations/library/drizzle/rules/DRIZZLE.md +4 -2
  114. package/configurations/library/react-hook-form/manifest.toml +4 -4
  115. package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +15 -13
  116. package/configurations/library/tanstack-query/manifest.toml +6 -6
  117. package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +5 -3
  118. package/configurations/library/testing-library/manifest.toml +6 -6
  119. package/configurations/library/translations/manifest.toml +22 -22
  120. package/configurations/library/translations/rules/NEXT-INTL.md +6 -8
  121. package/configurations/library/translations/rules/TRANSLATIONS.md +22 -23
  122. package/configurations/library/trpc/manifest.toml +3 -3
  123. package/configurations/library/trpc/rules/TRPC.md +8 -6
  124. package/configurations/library/zod/manifest.toml +6 -6
  125. package/configurations/library/zod/rules/ZOD.md +4 -2
  126. package/configurations/library/zustand/manifest.toml +4 -4
  127. package/configurations/library/zustand/rules/ZUSTAND.md +16 -14
  128. package/configurations/platform/cloudflare/manifest.toml +28 -47
  129. package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +11 -6
  130. package/configurations/platform/supabase/manifest.toml +48 -61
  131. package/configurations/platform/supabase/rules/SUPABASE.md +27 -28
  132. package/configurations/testing/jest/manifest.toml +21 -22
  133. package/configurations/testing/pytest/manifest.toml +28 -28
  134. package/configurations/testing/swift-tests/manifest.toml +18 -29
  135. package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +7 -5
  136. package/configurations/testing/vitest/manifest.toml +32 -32
  137. package/configurations/testing/vitest/rules/VITEST.md +3 -1
  138. package/dist/gspot.js +22297 -24707
  139. package/dist/{linkinator-program.js → linkinator-process.js} +5 -7
  140. package/dist/{purgecss-program.js → purgecss-process.js} +12 -12
  141. package/package.json +7 -9
  142. package/configurations/infrastructure/github-actions/zizmor.yml +0 -3
  143. package/configurations/language/bash/rules/NAMING.md +0 -62
  144. package/configurations/language/css/rules/NAMING.md +0 -17
  145. package/configurations/language/html/rules/NAMING.md +0 -16
  146. package/configurations/language/javascript/rules/NAMING.md +0 -31
  147. package/configurations/language/markdown/markdownlint-cli2.mjs +0 -19
  148. package/configurations/language/python/rules/NAMING.md +0 -53
  149. package/configurations/language/sql/rules/NAMING.md +0 -90
  150. package/configurations/language/swift/rules/NAMING.md +0 -88
  151. package/configurations/language/typescript/rules/NAMING.md +0 -73
  152. package/configurations/library/swift-snapshot-testing/manifest.toml +0 -32
  153. package/dist/THIRD-PARTY-NOTICES.md +0 -25
  154. package/dist/eslint-rule-levels.json +0 -10
  155. package/dist/tool-versions.json +0 -3
  156. package/gspot.schema.json +0 -45991
  157. /package/{dist/LICENSE.md → LICENSE.md} +0 -0
  158. /package/configurations/framework/express/{semgrep → tool-files/semgrep}/express.yml +0 -0
  159. /package/configurations/framework/fastapi/{semgrep → tool-files/semgrep}/fastapi.yml +0 -0
  160. /package/configurations/general/dependencies/{syncpack.json → tool-files/syncpack.json} +0 -0
  161. /package/configurations/general/prose/{vale → tool-files/vale}/styles/LICENSES.md +0 -0
  162. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ampm.yml +0 -0
  163. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/conscious-language.yml +0 -0
  164. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/contractions.yml +0 -0
  165. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/currency.yml +0 -0
  166. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dashes.yml +0 -0
  167. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/date-ordinals.yml +0 -0
  168. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dates.yml +0 -0
  169. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/file-paths.yml +0 -0
  170. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/future.yml +0 -0
  171. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/hedging.yml +0 -0
  172. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/history.yml +0 -0
  173. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/idioms.yml +0 -0
  174. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/interface-verbs.yml +0 -0
  175. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/jargon.yml +0 -0
  176. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/leading-conjunctions.yml +0 -0
  177. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/link-text.yml +0 -0
  178. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/locations.yml +0 -0
  179. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/marketing.yml +0 -0
  180. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/merge-conflict-markers.yml +0 -0
  181. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/militaristic-language.yml +0 -0
  182. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/modals.yml +0 -0
  183. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/numbered-units.yml +0 -0
  184. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/obvious-fields.yml +0 -0
  185. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ordinal-adverbs.yml +0 -0
  186. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/percentage-numbers.yml +0 -0
  187. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/placeholders.yml +0 -0
  188. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/product-centric-writing.yml +0 -0
  189. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/punctuated-headings.yml +0 -0
  190. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/self-reference.yml +0 -0
  191. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/session-identifiers.yml +0 -0
  192. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/since.yml +0 -0
  193. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/straight-quotes.yml +0 -0
  194. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/suspended-hyphens.yml +0 -0
  195. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/symbols.yml +0 -0
  196. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/time-ranges.yml +0 -0
  197. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/url-prepositions.yml +0 -0
  198. /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/version-range.yml +0 -0
  199. /package/configurations/general/secrets/{gitleaks.toml → tool-files/gitleaks.toml} +0 -0
  200. /package/configurations/infrastructure/docker/{trivyignore → tool-files/trivyignore} +0 -0
  201. /package/configurations/language/bash/{semgrep → tool-files/semgrep}/bash.yml +0 -0
  202. /package/configurations/language/javascript/{semgrep → tool-files/semgrep}/javascript.yml +0 -0
  203. /package/configurations/language/swift/{semgrep → tool-files/semgrep}/swift.yml +0 -0
  204. /package/configurations/platform/cloudflare/{semgrep → tool-files/semgrep}/cloudflare.yml +0 -0
  205. /package/configurations/platform/supabase/{semgrep → tool-files/semgrep}/supabase.yml +0 -0
@@ -1,9 +1,11 @@
1
1
  # UIKit
2
2
 
3
+ Read this rule when you change UIKit screens, lists, or cells.
4
+
3
5
  ## Framework boundaries
4
6
 
5
- Use UIKit for UIKit screens and components. Use SwiftUI for SwiftUI screens. Preserve the
6
- project's chosen presentation framework; importing UIKit does not require a SwiftUI migration.
7
+ Keep each screen and component in the presentation framework the project chose for it.
8
+ Importing UIKit does not require a SwiftUI migration.
7
9
  When the two frameworks meet, use `UIViewRepresentable`, `UIViewControllerRepresentable`, or
8
10
  `UIHostingController` at the presentation boundary appropriate to the direction of integration.
9
11
 
@@ -14,19 +16,19 @@ without moving network, persistence, or authorization work into reusable views.
14
16
 
15
17
  <!-- level: all -->
16
18
 
17
- Keep framework types out of domain contracts unless those contracts explicitly represent UI.
19
+ Keep framework types out of domain contracts unless they explicitly represent UI.
18
20
  Follow declared import boundaries. Put reusable delegate or data-source behavior in a dedicated
19
- owner when multiple screens need it or the controller mixes unrelated responsibilities.
21
+ type when multiple screens need it or the controller mixes unrelated responsibilities.
20
22
  A view controller can own a small list's data source and delegate directly.
21
23
 
22
- Use existing navigation and dependency-construction owners. Do not introduce a coordinator,
23
- router, view model, or composition type solely to satisfy a prescribed type layout.
24
+ Use the types that build navigation and dependencies. Do not introduce a coordinator,
25
+ router, view model, or composition type only to satisfy a prescribed layout.
24
26
 
25
27
  ## View-controller lifecycle
26
28
 
27
- Install and constrain owned views through the controller's lifecycle. Balance child-controller
28
- containment calls when embedding controllers. Retain objects whose lifetime the screen owns,
29
- and cancel screen-owned asynchronous work when its results become irrelevant.
29
+ Install and constrain owned views through the controller's lifecycle. Balance containment
30
+ calls when embedding child controllers. Retain objects whose lifetime the screen owns.
31
+ Cancel asynchronous work the screen owns when its results become irrelevant.
30
32
 
31
33
  An asynchronous result must still belong to the visible item
32
34
  or current screen before it changes the UI.
@@ -35,8 +37,8 @@ or current screen before it changes the UI.
35
37
 
36
38
  <!-- level: all -->
37
39
 
38
- Large `viewDidLoad`, `viewDidAppear`, app delegate, or scene delegate methods move their
39
- setup into named private methods or composition objects. A mode flag that forces the same
40
+ Large `viewDidLoad`, `viewDidAppear`, and app or scene delegate methods move their
41
+ setup into named private functions or composition objects. A mode flag that forces the same
40
42
  branching across several methods becomes separate strategy or data source objects or an
41
43
  explicit state type. Composition shares UI behavior. Inheritance serves framework
42
44
  requirements or stable shared behavior rather than default reuse:
@@ -48,19 +50,19 @@ tableView.reloadData()
48
50
  ```
49
51
 
50
52
  Preserve supported storyboard, nib, and programmatic construction paths. Mark an initializer
51
- unavailable only when the component's actual construction contract excludes it.
53
+ unavailable only when the construction contract of the component excludes it.
52
54
 
53
55
  ## Lists and reusable cells
54
56
 
55
57
  - Retain separately owned data sources and delegates. Table and collection views do not keep
56
- these weakly referenced owners alive for the screen.
58
+ these weakly referenced objects alive for the screen.
57
59
  - Use stable item identifiers. An `IndexPath` identifies a position in the current collection,
58
60
  not an item across insertions, removals, or asynchronous work.
59
61
  - Look up the current item before handling selection. Do not retain an old index path as identity.
60
62
  - Configure every reusable cell's visible and accessibility state for its current item.
61
63
  - Cancel or replace image work when the table reuses a cell. Apply a result only when its item identity
62
- still matches, and keep UI updates on the main actor.
63
- - Preserve the relationship between cell registration, dequeueing, and the expected cell type.
64
+ still matches.
65
+ - Preserve the relationship between cell registration, dequeueing, and the expected type.
64
66
  Do not force-cast unrelated cells to conceal a registration mismatch.
65
67
  - Keep list mutations and data-source updates consistent so the view never receives impossible
66
68
  row or section counts.
@@ -69,7 +71,7 @@ unavailable only when the component's actual construction contract excludes it.
69
71
 
70
72
  Create a `UICollectionView.CellRegistration` outside the diffable data source's cell-provider
71
73
  closure and reuse it for configured dequeueing. Creating it inside that closure prevents cell
72
- reuse and can raise an exception. See [Apple's cell-registration documentation](https://developer.apple.com/documentation/uikit/uicollectionviewcellregistration?language=swift).
74
+ reuse and can raise an exception. See the [Apple cell-registration documentation](https://developer.apple.com/documentation/uikit/uicollectionviewcellregistration?language=swift).
73
75
 
74
76
  ### Cell models
75
77
 
@@ -78,7 +80,7 @@ reuse and can raise an exception. See [Apple's cell-registration documentation](
78
80
  Pass cells the values needed for rendering and interaction. Keep provider records and database
79
81
  mechanics at their existing boundary. Use a feature-owned enum for a closed set of heterogeneous
80
82
  rows when it makes the relationship explicit. Add a shared configurator only for repeated
81
- behavior that existing registration APIs do not already own.
83
+ behavior that registration APIs do not already own.
82
84
 
83
85
  ## Diffable data sources
84
86
 
@@ -87,13 +89,13 @@ unique and stable across snapshots. Do not identify an item by mutable display t
87
89
 
88
90
  Build each snapshot from a consistent state. Resolve cells and selection through the current
89
91
  data source. When you write tests, cover insertion, removal, reordering, and asynchronous refresh
90
- when the screen owns those transitions. Keep snapshot-building code with the presentation behavior
92
+ if the screen owns those transitions. Keep snapshot-building code with the presentation behavior
91
93
  it serves.
92
94
 
93
95
  ## Accessibility and interaction
94
96
 
95
97
  Expose meaningful values, traits, and actions, and keep accessibility state correct after cell
96
- reuse and snapshot updates. When you write tests, cover focus and selection when content changes
98
+ reuse and snapshot updates. When you write tests, cover focus and selection after content changes
97
99
  or a modal screen closes.
98
100
 
99
101
  Use constraints that fit Dynamic Type, safe areas, and every supported size class.
@@ -1,13 +1,10 @@
1
1
  allowed_words = ["TypeScript"]
2
2
 
3
- [prefix_collisions]
4
- prefixes = ["tsconfig"]
5
-
6
3
  [configuration]
7
- title = "TypeScript"
4
+ description = "The strict compiler, ESLint with typescript-eslint and the gspot structural rules over every TypeScript file, and knip for dead code."
8
5
  requires = ["javascript"]
9
6
  suggests = []
10
- description = "The strict compiler, ESLint with typescript-eslint and the gspot structural rules over every TypeScript file, and knip for dead code."
7
+ title = "TypeScript"
11
8
 
12
9
  [detect]
13
10
  extensions = [".ts", ".tsx", ".mts", ".cts"]
@@ -17,43 +14,21 @@ filenames = ["tsconfig.json"]
17
14
  extensions = [".ts", ".tsx", ".mts", ".cts", ".d.ts"]
18
15
  filenames = ["tsconfig.json", "tsconfig.*.json"]
19
16
 
17
+ [shared_prefixes]
18
+ prefixes = ["tsconfig"]
19
+
20
20
  [[tool]]
21
+ kind = "library"
21
22
  name = "typescript-eslint"
23
+ npm = "typescript-eslint"
22
24
  requires = ["tsc"]
23
25
  rule_prefix = "@typescript-eslint"
24
26
  rule_url = "https://typescript-eslint.io/rules/{rule}"
25
- kind = "library"
26
27
  version = "8.70.0"
27
- npm = "typescript-eslint"
28
28
 
29
29
  [tool.eslint]
30
30
  extensions = [".ts", ".tsx", ".mts", ".cts"]
31
31
 
32
- [[check]]
33
- name = "tsc"
34
- example = "The TypeScript declaration `const count: number = \"one\";` reports an incompatible assignment. Correct it to `const count: number = 1;` when the contract requires a number."
35
- level = "recommended"
36
- stage = "push"
37
- runs = "scope"
38
- cwd = "scope"
39
- tool = "tsc"
40
- summary = "Checks that every TypeScript file type-checks with the strict compiler options."
41
- why = "A file that does not type-check can crash at run time in a way the editor already knew about."
42
- help = "Read the first error tsc prints and fix that file; later errors are often the same mistake."
43
-
44
- [check.output]
45
- format = "regex"
46
- pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"
47
-
48
- [[check]]
49
- name = "tsconfig"
50
- example = "Your TypeScript configuration setting `strict` to `false` reports the required compiler option. Enable `strict` and fix the type errors it reports."
51
- level = "recommended"
52
- stage = "commit"
53
- summary = "Requires strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, and noFallthroughCasesInSwitch in every tsconfig you write. Level all also requires noImplicitReturns and noPropertyAccessFromIndexSignature."
54
- why = "One tsconfig that drops strict lets untyped code back in for that whole scope."
55
- help = "Enable the reported compiler option in your TypeScript configuration."
56
-
57
32
  [eslint]
58
33
  all_level_rules = ["@typescript-eslint/ban-ts-comment", "@typescript-eslint/consistent-type-definitions", "@typescript-eslint/consistent-type-exports", "@typescript-eslint/consistent-type-imports", "@typescript-eslint/explicit-module-boundary-types", "@typescript-eslint/no-explicit-any", "@typescript-eslint/no-extraneous-class", "@typescript-eslint/no-magic-numbers", "@typescript-eslint/no-mixed-enums", "@typescript-eslint/no-namespace", "@typescript-eslint/no-non-null-assertion", "@typescript-eslint/no-require-imports", "@typescript-eslint/no-this-alias", "@typescript-eslint/no-unnecessary-type-parameters", "@typescript-eslint/prefer-readonly", "@typescript-eslint/prefer-reduce-type-parameter", "@typescript-eslint/prefer-return-this-type", "@typescript-eslint/strict-boolean-expressions", "@typescript-eslint/triple-slash-reference", "@typescript-eslint/unified-signatures"]
59
34
 
@@ -66,7 +41,32 @@ package = "typescript-eslint"
66
41
  source = "configs.disableTypeChecked"
67
42
 
68
43
  [[tool_file]]
69
- target = ".gspot/config/eslint.config.mjs"
70
- tool = "eslint"
71
44
  fragment = true
72
45
  required_tools = ["typescript-eslint"]
46
+ target = ".gspot/config/eslint.config.mjs"
47
+ tool = "eslint"
48
+
49
+ [[check]]
50
+ cwd = "scope"
51
+ example = "`const count: number = \"one\";` reports an incompatible assignment. Assign a number, such as `const count: number = 1;`."
52
+ help = "Fix the first error tsc prints; later errors often come from the same mistake."
53
+ level = "recommended"
54
+ name = "tsc"
55
+ runs = "scope"
56
+ stage = "push"
57
+ summary = "Runs tsc with the strict compiler options over every TypeScript file."
58
+ tool = "tsc"
59
+ why = "A type error left in a file can crash the program at run time, though the editor already showed it."
60
+
61
+ [check.output]
62
+ format = "regex"
63
+ pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"
64
+
65
+ [[check]]
66
+ example = "A tsconfig with `strict` set to `false` reports a finding. Set `strict` to `true`, and fix the new type errors."
67
+ help = "Turn on the reported compiler option in your tsconfig."
68
+ level = "recommended"
69
+ name = "tsconfig"
70
+ stage = "commit"
71
+ summary = "Requires strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, and noFallthroughCasesInSwitch in every tsconfig you write. Level all also requires noImplicitReturns and noPropertyAccessFromIndexSignature."
72
+ why = "One tsconfig that drops strict lets untyped code back in for that whole scope."
@@ -1,17 +1,21 @@
1
1
  # TypeScript
2
2
 
3
+ Read this rule when you change TypeScript code.
4
+
3
5
  TypeScript checks static types. JavaScript and runtime rules cover modules and execution.
4
6
 
5
7
  ## Philosophy
6
8
 
7
9
  TypeScript makes types explicit at compile time. Plain values, small functions, discriminated
8
- unions, and clear modules keep types easier to read than elaborate type transformations.
10
+ unions, and clear modules read better than elaborate type transformations.
9
11
 
10
12
  ## Files and modules
11
13
 
12
- Diagnostics and process termination stay at executable boundaries. Check the effective lint
13
- configuration for a path before assuming a rule. Follow the project's arrangement for types
14
- and constants. Infer schema types from their authored schemas.
14
+ Error output and process exits stay at executable boundaries. Before you assume a lint rule
15
+ applies to a path, check the effective configuration.
16
+
17
+ Do not edit compiler output with string replacement. Change the source or the compiler options, then ship the
18
+ output.
15
19
 
16
20
  ## Values and shapes
17
21
 
@@ -34,14 +38,14 @@ missing fields, and nulls where they enter the program.
34
38
 
35
39
  ## Functions and classes
36
40
 
37
- Annotate callback parameters when inference does not give a clear type, rely on inference for local details,
41
+ Annotate callback parameters when inference gives no clear type, rely on it for local details,
38
42
  and keep generics minimal. A discriminated union or options object replaces overloads when
39
- clearer. Make a parameter optional only for an optional input.
43
+ clearer. Make a parameter optional only when callers can omit the input.
40
44
 
41
45
  ## Errors and async work
42
46
 
43
47
  `Promise.all` serves bounded independent fan-out. Order, rate limits, or failure isolation
44
- call for sequential `await`. Large fan-out, provider calls, and batch work use platform
48
+ call for sequential `await`. Large fan-out, provider calls, and batch work use runtime
45
49
  concurrency utilities. Detach a promise only deliberately. Log and supervise it; never swallow a rejection.
46
50
 
47
51
  This fragment uses the message and provider types, persistence functions, and lock operations
@@ -73,7 +77,55 @@ export async function createProviderOperation(request: ProviderOperationRequest)
73
77
  }
74
78
  ```
75
79
 
76
- ## Comments
80
+ ## Naming
81
+
82
+ ### TypeScript files and modules
83
+
84
+ <!-- level: all -->
85
+
86
+ - Do not use namespaces, `module`, triple-slash references, or
87
+ `import x = require(...)` to simulate ownership.
88
+ - Keep generator-style file names only for generator output.
89
+
90
+ ### TypeScript variables
91
+
92
+ <!-- level: all -->
93
+
94
+ - Use explanatory destructuring names.
95
+
96
+ For a range comparison, name the value `value` and the bounds `minimum` and
97
+ `maximum`. Use a type that supports the comparison, such as `number`; an
98
+ unconstrained generic does not establish ordering semantics.
99
+
100
+ When iterating a map of users, destructure its entries as `[userId, user]`
101
+ instead of naming each pair `keyValue`.
102
+
103
+ Name a reused daily timer duration `MILLISECONDS_PER_DAY` and define it as
104
+ `86_400_000`. The name explains both the interval and its unit.
105
+
106
+ ### TypeScript functions
107
+
108
+ <!-- level: all -->
109
+
110
+ - Use async/await in names only to distinguish a function from a blocking counterpart. The return type already shows async.
111
+
112
+ ### TypeScript types
113
+
114
+ <!-- level: all -->
115
+
116
+ - Use plain and discriminated unions for alternatives.
117
+ - Use interfaces only when a framework contract, declaration merging, or
118
+ `implements` relationship makes one the clearest tool.
119
+ - Use optional fields for values callers can omit.
120
+ - Avoid return-type-only generics. When you call an existing one, specify the
121
+ type argument explicitly.
122
+ - Give the keys of an index signature meaningful names.
123
+ - Prefer `Map` for key/value operations.
124
+
125
+ Name a coffee response union `CoffeeResponse`; put `| undefined` on an
126
+ operation that can return nothing. Name a user index `UsersById` and its
127
+ key `userId`.
77
128
 
78
- Comments document purpose, invariants, security boundaries, concurrency behavior, and runtime
79
- assumptions. Do not restate TypeScript syntax or code.
129
+ A function that selects a collection element ties its generic to the input.
130
+ Its return contract must account for an empty collection unless
131
+ the input type or validation proves that an element exists.
@@ -1,68 +1,55 @@
1
1
  allowed_words = ["Drizzle"]
2
2
 
3
3
  [configuration]
4
- title = "Drizzle"
4
+ description = "Drizzle: no update or delete without `where`, raw SQL only at paths the settings allow, and migrations that match the schema."
5
5
  requires = ["javascript"]
6
- description = "Drizzle: no update or delete without a where, raw SQL only where the settings allow it, relations for every reference, and migrations that match the schema."
6
+ title = "Drizzle"
7
7
 
8
8
  [detect]
9
9
  dependencies = ["drizzle-orm"]
10
10
 
11
+ [rules."DRIZZLE.md"]
12
+ dependencies = ["pg", "postgres"]
13
+
11
14
  [[tool]]
15
+ kind = "library"
12
16
  name = "eslint-plugin-drizzle"
17
+ npm = "eslint-plugin-drizzle"
13
18
  rule_prefix = "drizzle"
14
- kind = "library"
15
19
  version = "0.2.3"
16
- npm = "eslint-plugin-drizzle"
17
20
 
18
21
  [[tool]]
19
- name = "drizzle-kit"
20
22
  install_hint = "Run: npm install --save-dev drizzle-kit"
21
- system = true
22
- version_command = ["--version"]
23
23
  min_version = "0.21.0"
24
+ name = "drizzle-kit"
24
25
  npm = "drizzle-kit"
26
+ system = true
27
+ version_command = ["--version"]
25
28
 
26
- [[check]]
27
- name = "relations"
28
- example = "An exported `orders` table whose column uses `.references(() => users.id)` reports `relations` when the scope has no `relations(orders, ...)` declaration. Add that declaration with the table's actual relationships and rerun. The check recognizes the supported source forms; it does not execute the schema."
29
- level = "all"
30
- stage = "commit"
31
- runs = "scope"
32
- summary = "Checks that every table with a reference has a relations entry."
33
- why = "Relational queries through `db.query` read relations. SQL joins do not need them."
34
- help = "Add a relations call for the table."
29
+ [[eslint.selectors]]
30
+ message = "Raw SQL skips the types of the schema. Use the query builder, or accept this finding with a rule-specific ignore."
31
+ selector = "TaggedTemplateExpression[tag.name='sql']"
35
32
 
36
- [check.files]
37
- extensions = [".ts"]
33
+ [[tool_file]]
34
+ fragment = true
35
+ required_tools = ["eslint-plugin-drizzle"]
36
+ target = ".gspot/config/eslint.config.mjs"
37
+ tool = "eslint"
38
38
 
39
39
  [[check]]
40
- name = "stale-migrations"
41
40
  command = ["drizzle-kit", "generate"]
42
- example = "Changing a Drizzle schema without generating its migration reports drift. Run `drizzle-kit generate` with the project configuration, inspect the new migration, and retain it before rerunning."
41
+ example = "A schema change with no new migration reports drift. Run `drizzle-kit generate`, review the migration, and commit it."
42
+ help = "Run `drizzle-kit generate` and commit the migration."
43
43
  level = "recommended"
44
- stage = "push"
44
+ name = "stale-migrations"
45
45
  runs = "scope"
46
+ stage = "push"
47
+ summary = "Runs `drizzle-kit generate` and fails when it creates a migration."
46
48
  tool = "drizzle-kit"
47
- summary = "Asks drizzle-kit to write migrations, and fails when it writes one."
48
- why = "A schema change with no migration works on the machine that pushed the schema and nowhere else."
49
- help = "Run drizzle-kit generate and commit the migration."
49
+ why = "A schema change with no migration works only on the machine that pushed it."
50
50
 
51
- [[check.generated_paths]]
51
+ [[check.generator_outputs]]
52
52
  pattern = "**/*"
53
53
 
54
54
  [check.files]
55
55
  paths = ["drizzle.config.ts", "drizzle.config.js", "drizzle.config.mts", "drizzle.config.mjs", "drizzle.config.cts", "drizzle.config.cjs"]
56
-
57
- [rules."DRIZZLE.md"]
58
- dependencies = ["pg", "postgres"]
59
-
60
- [[eslint.selectors]]
61
- selector = "TaggedTemplateExpression[tag.name='sql']"
62
- message = "Raw SQL skips the types of the schema. Use the query builder, or accept this finding with a rule-specific ignore."
63
-
64
- [[tool_file]]
65
- target = ".gspot/config/eslint.config.mjs"
66
- tool = "eslint"
67
- fragment = true
68
- required_tools = ["eslint-plugin-drizzle"]
@@ -1,7 +1,9 @@
1
1
  # Drizzle
2
2
 
3
+ Read this rule when you change Drizzle schemas, queries, or migrations.
4
+
3
5
  These decisions cover Drizzle with PostgreSQL. Use the adapter and APIs of the installed release.
4
- Supabase connection and identity decisions remain in the Supabase rules.
6
+ Connection and identity decisions for Supabase stay in its rules.
5
7
 
6
8
  ## Connections and schema ownership
7
9
 
@@ -20,7 +22,7 @@ and [relations](https://orm.drizzle.team/docs/relations).
20
22
  ## Authorized operations
21
23
 
22
24
  Select only the fields the caller may see. Apply resource and tenant restrictions in the query or
23
- an enforced policy. A row identifier proves no permission, and an inferred insert type permits
25
+ an enforced policy. A row identifier proves no permission, and an inferred insert type allows
24
26
  fields a public request must not set. Keep public schemas apart from persistence types.
25
27
 
26
28
  Scope writes to the authorized resource and verify affected rows. Bound growing collections and
@@ -1,15 +1,15 @@
1
1
  [configuration]
2
- title = "React Hook Form"
2
+ description = "React Hook Form: each form validates through a resolver, and no registered field also acts as a controlled one."
3
3
  requires = ["javascript"]
4
- description = "React Hook Form: a form validates through a resolver, and a registered field is not also controlled."
4
+ title = "React Hook Form"
5
5
 
6
6
  [detect]
7
7
  dependencies = ["react-hook-form"]
8
8
 
9
9
  [[eslint.selectors]]
10
- selector = "CallExpression[callee.name='useForm']:not(:has(Property[key.name='resolver']))"
11
10
  message = "Give useForm a resolver, so the schema that types the form also validates it."
11
+ selector = "CallExpression[callee.name='useForm']:not(:has(Property[key.name='resolver']))"
12
12
 
13
13
  [[eslint.selectors]]
14
- selector = "JSXOpeningElement:has(JSXSpreadAttribute CallExpression[callee.name=register]):has(JSXAttribute[name.name=value]):not(:has([name.name=type]>[value=/^(checkbox|radio)$/]))"
15
14
  message = "Drop value or use Controller."
15
+ selector = "JSXOpeningElement:has(JSXSpreadAttribute CallExpression[callee.name=register]):has(JSXAttribute[name.name=value]):not(:has([name.name=type]>[value=/^(checkbox|radio)$/]))"
@@ -1,43 +1,45 @@
1
1
  # React Hook Form
2
2
 
3
+ Read this rule when you change a form built with React Hook Form.
4
+
3
5
  ## Form ownership and validation
4
6
 
5
- - One `useForm` instance owns a form. Use `FormProvider` when nested fields need that instance;
6
- never create a second form owner for the same submission.
7
+ - One `useForm` instance owns a form. Use `FormProvider` when nested fields need it;
8
+ never create a second `useForm` instance for the same submission.
7
9
  - The resolver owns schema validation. Keep coercion and validation in that path rather than
8
10
  maintaining competing rules in fields and submit handlers.
9
11
  - Initialize `defaultValues` with the form's complete starting values. Reset deliberately when the
10
- edited record changes; an incoming background response must not discard a user's changes.
12
+ edited record switches; an incoming background response must not discard a user's changes.
11
13
  - An input uses either `register` or `Controller`. A controlled widget forwards the controller's
12
- value, change handler, blur handler, ref, and disabled state through its supported interface.
14
+ value, change and blur handlers, ref, and disabled state through its supported interface.
13
15
  - Subscribe through `useWatch` or `useFormState` near the consumer instead of making the entire form
14
16
  rerender for every field. `getValues` reads a snapshot rather than subscribing.
15
- - Conditional fields distinguish hidden values that remain part of the submission from values that
17
+ - Conditional fields separate hidden values that stay in the submission from ones that
16
18
  need removal. The schema follows that choice.
17
19
 
18
20
  ## Field arrays
19
21
 
20
- - Give each field array one `useFieldArray` owner. Use `field.id` as the React key and the current
22
+ - Give each field array one `useFieldArray` call. Use `field.id` as the React key and the current
21
23
  index in a registered path. Store database identity in a separate property.
22
- - Treat `fields` as row structure. Read live values through the form's value APIs.
24
+ - Treat `fields` as row structure. Read live values through the form's APIs.
23
25
  - Add complete rows. Use a leaf `setValue` when an update must preserve the mounted row's focus and
24
- widget state; `update` remounts the row.
25
- - Keep one form owner across wizard steps. Validate a step before advancing and the whole payload
26
+ widget state; `update` remounts it.
27
+ - Keep one `useForm` instance across wizard steps. Validate a step before advancing and the whole payload
26
28
  before the final submission.
27
29
 
28
30
  ## Submission and errors
29
31
 
30
32
  - The submit handler awaits the real save. Pending state lasts until that operation settles;
31
33
  starting a request and returning early makes `isSubmitting` misleading.
32
- - Report field errors beside their fields and form errors at the form boundary. Keep entered values
34
+ - Show field errors beside their inputs and form errors at the boundary. Keep entered values
33
35
  after a failed save so the user can correct or retry them.
34
36
  - A save captures the edited record's identity. Its late result must not reset a different record.
35
- - When the project uses TanStack Query, await `mutateAsync` when submission needs the mutation result.
37
+ - When the project uses TanStack Query and submission needs the mutation result, await `mutateAsync`.
36
38
  Handle its rejection in the form's error path.
37
39
  - When the project uses Next.js Server Actions, await the action and map its returned validation or
38
40
  save result into the form's error state.
39
- - When the project uses an internationalization library, pass error messages through that library's
40
- message API rather than constructing translated sentences from fragments.
41
+ - When the project uses an internationalization library, pass error messages through its
42
+ message API rather than building translated sentences from fragments.
41
43
 
42
44
  ## References
43
45
 
@@ -1,26 +1,26 @@
1
1
  allowed_words = ["TanStack"]
2
2
 
3
3
  [configuration]
4
- title = "TanStack Query"
4
+ description = "TanStack Query: ESLint rules for dependency lists, stable clients, and the order of options."
5
5
  requires = ["javascript"]
6
- description = "TanStack Query: the query rules of ESLint for dependency lists, stable clients, and query options in order."
6
+ title = "TanStack Query"
7
7
 
8
8
  [detect]
9
9
  dependencies = ["@tanstack/react-query", "@tanstack/query-core", "@tanstack/vue-query", "@tanstack/svelte-query", "@tanstack/solid-query", "@tanstack/angular-query-experimental"]
10
10
 
11
11
  [[tool]]
12
+ kind = "library"
12
13
  name = "@tanstack/eslint-plugin-query"
14
+ npm = "@tanstack/eslint-plugin-query"
13
15
  rule_prefix = "@tanstack/query"
14
- kind = "library"
15
16
  version = "5.91.2"
16
- npm = "@tanstack/eslint-plugin-query"
17
17
 
18
18
  [eslint.presets.recommended]
19
19
  package = "@tanstack/eslint-plugin-query"
20
20
  source = "configs.flat/recommended"
21
21
 
22
22
  [[tool_file]]
23
- target = ".gspot/config/eslint.config.mjs"
24
- tool = "eslint"
25
23
  fragment = true
26
24
  required_tools = ["@tanstack/eslint-plugin-query"]
25
+ target = ".gspot/config/eslint.config.mjs"
26
+ tool = "eslint"
@@ -1,5 +1,7 @@
1
1
  # TanStack Query
2
2
 
3
+ Read this rule when you change TanStack Query queries, mutations, or cache keys.
4
+
3
5
  Use the integration and release the project has. Query data stays in its cache; do not copy it
4
6
  into a second store to share it with another component.
5
7
 
@@ -10,14 +12,14 @@ initial suspension. Clear or partition private state when identity or tenant cha
10
12
  response must not refill the next session's cache.
11
13
 
12
14
  Include every result-changing input in the key. Give list previews, detail records, and infinite
13
- pages different identities. When the project uses tRPC, use its generated options and key factories.
15
+ pages different identities. When the project has tRPC, use its generated options and key factories.
14
16
  Keep prefetch and consumption on the same keys and serialization contract; dehydrate no private data.
15
17
 
16
18
  See [server rendering and hydration](https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr).
17
19
 
18
20
  ## Writes and recovery
19
21
 
20
- Apply a save result to the resource captured when the save started, not the current selection.
22
+ Apply a save result to the resource captured at its start, not the current selection.
21
23
  An optimistic rollback reverses only its own change; restoring a whole snapshot can erase a newer
22
24
  success. Reconcile with the committed response, then invalidate affected lists and aggregates.
23
25
  A committed write stays successful when its refresh fails.
@@ -33,7 +35,7 @@ Distinguish first load, background refresh, and next-page loading. Keep useful d
33
35
  a refresh and expose its failure separately. A placeholder supplies display data, not a record ready
34
36
  for editing. Reset placeholders and pagination when identity or filters change.
35
37
 
36
- Choose freshness from the resource's risk. Never disable refetching globally to conceal duplicate
38
+ Choose freshness from the resource's risk. Never disable refetching globally to hide duplicate
37
39
  requests. Keep permission and account state out of static caches. Preserve both `pages` and
38
40
  `pageParams` when changing an infinite query.
39
41
 
@@ -1,17 +1,17 @@
1
1
  [configuration]
2
- title = "Testing Library"
2
+ description = "Lint rules for test files in projects that depend on Testing Library."
3
3
  requires = ["javascript"]
4
- description = "Testing Library rules over test files of projects that declare a Testing Library dependency."
4
+ title = "Testing Library"
5
5
 
6
6
  [detect]
7
7
  dependencies = ["@testing-library/*"]
8
8
 
9
9
  [[tool]]
10
+ kind = "library"
10
11
  name = "eslint-plugin-testing-library"
12
+ npm = "eslint-plugin-testing-library"
11
13
  rule_prefix = "testing-library"
12
- kind = "library"
13
14
  version = "7.16.2"
14
- npm = "eslint-plugin-testing-library"
15
15
 
16
16
  [eslint]
17
17
  all_level_rules = ["testing-library/no-container", "testing-library/no-node-access", "testing-library/no-render-in-lifecycle", "testing-library/prefer-screen-queries", "testing-library/render-result-naming-convention"]
@@ -41,7 +41,7 @@ package = "eslint-plugin-testing-library"
41
41
  source = "configs.flat/marko"
42
42
 
43
43
  [[tool_file]]
44
- target = ".gspot/config/eslint.config.mjs"
45
- tool = "eslint"
46
44
  fragment = true
47
45
  required_tools = ["eslint-plugin-testing-library"]
46
+ target = ".gspot/config/eslint.config.mjs"
47
+ tool = "eslint"