@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,24 +1,24 @@
1
1
  [configuration]
2
- title = "React DOM"
2
+ description = "React applications rendered into the DOM: JSX accessibility rules for labels, alternative text, keyboard access, and valid ARIA attributes. Native-only applications get React without these browser rules."
3
3
  requires = ["react"]
4
- description = "React applications rendered into the DOM: JSX accessibility rules for labels, alternative text, keyboard access, and valid ARIA attributes. Native-only applications retain React without these browser rules."
4
+ title = "React DOM"
5
5
 
6
6
  [detect]
7
7
  dependencies = ["react-dom"]
8
8
 
9
9
  [[tool]]
10
+ kind = "library"
10
11
  name = "eslint-plugin-jsx-a11y"
12
+ npm = "eslint-plugin-jsx-a11y"
11
13
  rule_prefix = "jsx-a11y"
12
- kind = "library"
13
14
  version = "6.10.2"
14
- npm = "eslint-plugin-jsx-a11y"
15
15
 
16
16
  [eslint.presets.accessibility]
17
17
  package = "eslint-plugin-jsx-a11y"
18
18
  source = "flatConfigs.recommended"
19
19
 
20
20
  [[tool_file]]
21
- target = ".gspot/config/eslint.config.mjs"
22
- tool = "eslint"
23
21
  fragment = true
24
22
  required_tools = ["eslint-plugin-jsx-a11y"]
23
+ target = ".gspot/config/eslint.config.mjs"
24
+ tool = "eslint"
@@ -1,8 +1,8 @@
1
1
  [configuration]
2
- title = "React Native"
2
+ description = "React Native components, styles, and native APIs. Lists take stable keys and virtualized rendering, touch targets use Pressable, and AsyncStorage holds no credentials."
3
3
  requires = ["react"]
4
4
  suggests = ["typescript"]
5
- description = "React Native components, styles, and native APIs. Lists use stable keys and virtualized rendering, touch targets use Pressable, and AsyncStorage stores no credentials."
5
+ title = "React Native"
6
6
 
7
7
  [detect]
8
8
  dependencies = ["react-native"]
@@ -11,36 +11,36 @@ dependencies = ["react-native"]
11
11
  filenames = ["app.json", "app.config.js", "app.config.ts", "metro.config.js", "eas.json"]
12
12
 
13
13
  [[tool]]
14
+ kind = "library"
14
15
  name = "@react-native/eslint-plugin"
16
+ npm = "@react-native/eslint-plugin"
15
17
  rule_prefix = "@react-native"
16
- kind = "library"
17
18
  version = "0.87.1"
18
- npm = "@react-native/eslint-plugin"
19
19
 
20
20
  [[tool]]
21
+ kind = "library"
21
22
  name = "eslint-plugin-react-native"
23
+ npm = "eslint-plugin-react-native"
22
24
  rule_prefix = "react-native"
23
- kind = "library"
24
25
  version = "5.0.0"
25
- npm = "eslint-plugin-react-native"
26
26
 
27
27
  [eslint]
28
28
  all_level_rules = ["react-native/no-color-literals", "react-native/no-inline-styles", "react-native/split-platform-components"]
29
29
 
30
30
  [[eslint.selectors]]
31
- selector = "ImportDeclaration[source.value='react-native'] > ImportSpecifier[imported.name=/^Touchable(Opacity|Highlight|WithoutFeedback|NativeFeedback)$/]"
32
31
  message = "Use Pressable. The Touchable components are kept for old code and get no new behavior."
32
+ selector = "ImportDeclaration[source.value='react-native'] > ImportSpecifier[imported.name=/^Touchable(Opacity|Highlight|WithoutFeedback|NativeFeedback)$/]"
33
33
 
34
34
  [[eslint.selectors]]
35
- selector = "JSXElement[openingElement.name.name='ScrollView'] > JSXExpressionContainer > CallExpression[callee.property.name='map']"
36
35
  message = "A ScrollView renders every row at once. Render a list that grows through FlatList."
36
+ selector = "JSXElement[openingElement.name.name='ScrollView'] > JSXExpressionContainer > CallExpression[callee.property.name='map']"
37
37
 
38
38
  [[eslint.selectors]]
39
- selector = "CallExpression[callee.object.name='AsyncStorage'][callee.property.name='setItem'] > Literal:first-child[value=/token|secret|password|credential/i]"
40
39
  message = "AsyncStorage is plain text on the device. Keep a secret in the secure store of the platform."
40
+ selector = "CallExpression[callee.object.name='AsyncStorage'][callee.property.name='setItem'] > Literal:first-child[value=/token|secret|password|credential/i]"
41
41
 
42
42
  [[tool_file]]
43
- target = ".gspot/config/eslint.config.mjs"
44
- tool = "eslint"
45
43
  fragment = true
46
44
  required_tools = ["@react-native/eslint-plugin", "eslint-plugin-react-native"]
45
+ target = ".gspot/config/eslint.config.mjs"
46
+ tool = "eslint"
@@ -1,7 +1,6 @@
1
1
  # React Native
2
2
 
3
- These rules cover React Native and Expo apps: components, lists, styles, navigation, native data, and releases.
4
- The React rules apply first. These add what a phone changes.
3
+ Read this rule when you change a React Native or Expo app. Read the React rule first.
5
4
 
6
5
  ## Components and touch
7
6
 
@@ -22,13 +21,12 @@ The React rules apply first. These add what a phone changes.
22
21
 
23
22
  <!-- level: all -->
24
23
 
25
- - Branch on `Platform.OS` in one place for one concern. Split a component full of platform checks into two components.
24
+ - Branch on `Platform.OS` in one place for one concern. Split a component full of platform checks into two.
26
25
 
27
26
  ## Navigation and state
28
27
 
29
28
  - Type the route parameters of every screen, and pass ids through them, not whole objects.
30
29
  - A screen loads its own data from the id it receives.
31
- - Do not keep server data in a global store by hand. Use a query cache that knows about refetching and staleness.
32
30
  - Stop a subscription, a timer, and a listener when the screen loses focus or unmounts.
33
31
 
34
32
  ## Native data and secrets
@@ -46,6 +44,6 @@ The React rules apply first. These add what a phone changes.
46
44
 
47
45
  ## Releases
48
46
 
49
- - Version the native build and the JavaScript bundle together, and know which bundles a given native build accepts.
47
+ - Version the app binary and the JavaScript bundle together, and track which bundles each build accepts.
50
48
  - An over-the-air update never changes native code or a permission.
51
49
  - Tell the user to check the upgrade path from the last release with its stored data.
@@ -1,170 +1,117 @@
1
1
  [configuration]
2
- title = "Static Site"
2
+ description = "A site built to a folder and served as files: its build, links, weight, and sitemap."
3
3
  requires = ["html"]
4
4
  suggests = ["css", "javascript"]
5
- description = "A site built to a folder and served as files: its build, links, weight, and sitemap."
5
+ title = "Static Site"
6
6
 
7
7
  [detect]
8
8
  paths = ["site.webmanifest", "sitemap.xml"]
9
9
 
10
10
  [files]
11
- filenames = ["site.webmanifest", "sitemap.xml", "robots.txt"]
12
11
  extensions = [".svg"]
12
+ filenames = ["site.webmanifest", "sitemap.xml", "robots.txt"]
13
13
 
14
14
  [[tool]]
15
15
  name = "linkinator"
16
- version = "8.1.0"
17
16
  npm = "linkinator"
18
- [[tool.replace]]
19
- file = "linkinator.config.json"
20
- shared = false
21
-
22
- [[tool]]
23
- name = "svgo"
24
- version = "4.1.0"
25
- npm = "svgo"
17
+ replace = ["linkinator.config.json"]
18
+ version = "8.1.0"
26
19
 
27
20
  [[tool]]
28
21
  name = "purgecss"
29
- version = "7.0.2"
30
22
  npm = "purgecss"
23
+ version = "7.0.2"
31
24
 
32
25
  [[tool_file]]
33
- target = ".gspot/config/html-validate-built.json"
26
+ check = "site/html-validate"
34
27
  per_scope = true
28
+ target = ".gspot/config/html-validate-built.json"
35
29
  tool = "html-validate"
36
- check = "site/html-validate"
37
- rule_keys = ["rules"]
38
30
 
39
31
  [[tool_file]]
40
- target = ".gspot/config/purgecss.config.mjs"
32
+ check = "site/purgecss"
41
33
  per_scope = true
34
+ target = ".gspot/config/purgecss.config.mjs"
42
35
  tool = "purgecss"
43
- check = "site/purgecss"
44
36
 
45
37
  [[check]]
46
- name = "build"
47
- example = "If the configured site build imports a missing template, the build check reports the command failure. Correct the template import or restore the template, then rerun the same configured build."
38
+ example = "A build that imports a missing template fails the check. Fix the import, or restore that file."
39
+ help = "Run the build command by hand and fix what it prints. Name the command under site.build_command."
48
40
  level = "recommended"
49
- stage = "push"
50
- runs = "scope"
41
+ name = "build"
51
42
  needs = ["build"]
52
- summary = "Runs the site build command and fails when it fails or writes no build folder."
53
- why = "Other site checks read the built files, so a failed build hides their findings."
54
- help = "Run the build command by hand and fix what it prints. Name the command under site.build_command."
55
-
56
- [[check]]
57
- name = "build-reproducible"
58
- example = "A build that embeds the current timestamp produces different bytes across repeated builds. Remove the timestamp from built files or derive it from a stable declared input, then rerun the reproducibility check."
59
- level = "all"
60
- stage = "push"
61
43
  runs = "scope"
62
- needs = ["build"]
63
- summary = "Builds the site twice and compares its files."
64
- why = "A build that differs from run to run cannot be cached, compared, or trusted to hold what was reviewed."
65
- help = "Take the timestamp, the random value, or the unordered list out of the build."
44
+ stage = "push"
45
+ summary = "Runs `site.build_command`, and fails on an error or a missing output folder."
46
+ why = "Other site checks read the built files, so a failed build hides their findings."
66
47
 
67
48
  [[check]]
68
- name = "html-validate"
69
- tool = "html-validate"
70
- example = "A template emitting `<img src=\"logo.png\">` without alternative text can produce an accessibility finding in the built HTML. Add meaningful `alt` text in the template, or `alt=\"\"` for a decorative image, and rebuild."
49
+ example = "A template that writes `<img src=\"logo.png\">` without alternative text reports a finding in the built HTML. Add `alt` text in the template, or `alt=\"\"` for a decorative image."
50
+ help = "Fix the template or the content that writes the markup the rule names."
71
51
  level = "recommended"
72
- stage = "push"
73
- runs = "scope"
52
+ name = "html-validate"
74
53
  needs = ["build"]
54
+ output = { format = "json", children = "messages", fields = { file = "filePath", line = "line", column = "column", rule = "ruleId", message = "message" } }
55
+ runs = "scope"
56
+ stage = "push"
75
57
  summary = "Validates every built page with html-validate."
58
+ tool = "html-validate"
76
59
  why = "Templates can each be valid and still join into a page with two main elements or a missing label."
77
- help = "Fix the template or the content that writes the markup the rule names."
78
60
 
79
61
  [[check]]
80
- name = "purgecss"
81
- tool = "purgecss"
82
- example = "A built stylesheet containing `.unused-banner` that no scanned HTML or script uses reports an unused selector. Delete the unused rule. For a class added at runtime, declare the actual class in the configured safelist with a reason."
62
+ example = "A built `.unused-banner` selector that no page or script uses reports a finding. Delete the rule, or list a class that a script adds under `tools.purgecss.safelist` with a reason."
63
+ help = "Delete the rule, or list a name a script adds at run time under tools.purgecss.safelist with a reason."
83
64
  level = "recommended"
84
- stage = "push"
85
- runs = "scope"
65
+ name = "purgecss"
86
66
  needs = ["build"]
87
- summary = "Finds selectors of the built stylesheets that no built page or script uses."
88
- why = "A selector nobody uses is downloaded by every visitor and read by every maintainer."
89
- help = "Delete the rule, or list a name a script adds at run time under tools.purgecss.safelist with a reason."
67
+ runs = "scope"
68
+ stage = "push"
69
+ summary = "Finds selectors in the built stylesheets that no page or script uses."
70
+ tool = "purgecss"
71
+ why = "Visitors download an unused selector, and maintainers still read it."
90
72
 
91
73
  [[check]]
92
- name = "linkinator"
93
- tool = "linkinator"
94
- example = "A built page linking to `/missing/` reports a missing destination when no such page exists. Point the source link at an existing page or add the intended page, then rebuild."
74
+ example = "A link to `/missing/` reports a broken destination when that page does not exist. Point it at an existing page, or add the page."
75
+ help = "Fix the link, or the page it points at."
95
76
  level = "recommended"
96
- stage = "push"
97
- runs = "scope"
77
+ name = "linkinator"
98
78
  needs = ["build"]
79
+ runs = "scope"
80
+ stage = "push"
99
81
  summary = "Serves the built site and follows every link between its pages, stylesheets, and fragments."
100
- why = "A broken internal link is a dead end a visitor finds before the author does."
101
- help = "Fix the link, or the page it points at."
102
-
103
- [[check]]
104
- name = "linkinator-external"
105
82
  tool = "linkinator"
106
- example = "A built link to an external URL that responds with HTTP 404 reports a link failure. Replace it with the verified destination or remove the obsolete link, then rerun with network access."
107
- level = "recommended"
108
- stage = "manual"
109
- runs = "scope"
110
- needs = ["network"]
111
- summary = "Follows every link of the built site, the ones that leave it included."
112
- why = "Other sites move their pages, and a link nobody rechecks rots."
113
- help = "Update the link, or allow its URL under docs.allowed_urls with a reason."
83
+ why = "A visitor hits a broken internal link before the author notices it."
114
84
 
115
85
  [[check]]
116
- name = "size"
117
- example = "A built page larger than its configured byte ceiling reports its measured size. Remove unused assets or reduce the page payload, rebuild, and rerun to verify it fits the ceiling."
86
+ example = "A built page over its limit reports the measured size. Remove unused assets or shrink the page, then rebuild."
87
+ help = "Remove what the page does not need, or raise the ceiling with a reason."
118
88
  level = "recommended"
119
- when = { setting = "site.size_limit" }
120
- stage = "push"
121
- runs = "scope"
89
+ name = "size"
122
90
  needs = ["build"]
91
+ runs = "scope"
92
+ stage = "push"
123
93
  summary = "Sums the compressed weight of the built paths each ceiling in site.size_limit names."
124
- why = "Weight arrives a kilobyte at a time, and only a ceiling notices."
125
- help = "Remove what the page does not need, or raise the ceiling with a reason."
94
+ when = { setting = "site.size_limit" }
95
+ why = "Page weight grows a kilobyte at a time, and only a limit catches it."
126
96
 
127
97
  [[check]]
128
- name = "sitemap"
129
- example = "A sitemap entry for `/removed/` with no corresponding built page reports a stale entry. Remove that entry from the sitemap source and rebuild. Add missing public pages to the sitemap instead of excluding them without a reason."
98
+ example = "A sitemap URL for `/removed/` with no built page reports a stale route. Remove it from the sitemap source, and rebuild."
99
+ help = "Add the page to the sitemap, remove the dead URL, or leave a page out under site.allowed_unlisted_pages."
130
100
  level = "recommended"
131
- stage = "push"
132
- runs = "scope"
101
+ name = "sitemap"
133
102
  needs = ["build"]
134
- summary = "Compares the sitemap with the built pages: every listed route is a page, and every page is listed."
135
- why = "A page outside the sitemap is found late by search engines, and a listed page that does not exist costs trust with them."
136
- help = "Add the page to the sitemap, remove the dead entry, or leave a page out under site.allowed_unlisted_pages."
103
+ runs = "scope"
104
+ stage = "push"
105
+ summary = "Compares the sitemap with the built pages, and reports a listed route with no page or a page left out."
106
+ why = "Search engines find an unlisted page late, and a listed route with nothing behind it costs their trust."
137
107
 
138
108
  [[check]]
139
- name = "unused-assets"
140
- example = "An image in the build folder that no built page or stylesheet references reports an unused asset. Remove it from the source asset set and rebuild."
141
- level = "all"
142
- stage = "push"
143
- runs = "scope"
109
+ example = "An image that no built page or stylesheet references reports an unused asset. Delete it from the source assets, and rebuild."
144
110
  files = { paths = ["**/*"], kinds = ["source", "binary"] }
145
- summary = "Finds files under an assets folder that no page, stylesheet, or script names."
146
- why = "An asset nobody references ships with every deploy and is kept by everyone who fears deleting it."
147
111
  help = "Delete the file."
148
-
149
- [[check]]
150
- name = "svgo"
151
- tool = "svgo"
152
- example = "An SVG containing removable editor metadata differs from optimized output. Run the configured SVGO formatter on its source, inspect the result, and rebuild before checking again."
153
- level = "recommended"
154
- stage = "commit"
155
- files = { extensions = [".svg"] }
156
- fix = ["svgo", "--quiet", "{files}"]
157
- summary = "Reports SVG byte reductions above tools.svgo.min_saving_percent, which defaults to 10 at level `recommended` and 0 at level `all`."
158
- why = "An SVG straight from an editor carries metadata and precision a browser never needs."
159
- help = "Run svgo over the file."
160
-
161
- [[check]]
162
- name = "webmanifest"
163
- example = "A web manifest referencing `icon-192.png` reports a missing icon when no such file sits beside the manifest. Add the icon to the build or correct the manifest path, then rebuild."
164
- level = "recommended"
165
- stage = "commit"
112
+ level = "all"
113
+ name = "unused-assets"
166
114
  runs = "scope"
167
- files = { extensions = [".webmanifest", ".html", ".htm", ".json"] }
168
- summary = "Checks that the web manifest parses, names the app, and lists icons that exist."
169
- why = "A manifest with a missing icon installs an app with a blank tile."
170
- help = "Correct the manifest, or add the icon."
115
+ stage = "push"
116
+ summary = "Finds files under an assets folder that no page, stylesheet, or script names."
117
+ why = "An unreferenced asset ships with every deploy, and nobody dares to delete it."
@@ -1,6 +1,6 @@
1
1
  # Static Site
2
2
 
3
- Rules for a repository that produces HTML for a content delivery network (CDN) or an edge platform.
3
+ Read this rule when you change a site that a build turns into static HTML.
4
4
 
5
5
  ## Build
6
6
 
@@ -1,10 +1,8 @@
1
-
2
-
3
1
  [configuration]
4
- title = "Svelte"
2
+ description = "ESLint checks Svelte markup and scripts. DOM manipulation and event-dispatcher typing rules apply at level all; HTML injection rules apply at both levels."
5
3
  requires = ["javascript"]
6
4
  suggests = ["typescript", "css"]
7
- description = "ESLint checks Svelte markup and scripts. DOM manipulation and event-dispatcher typing rules run at level all; HTML injection checks run at both levels."
5
+ title = "Svelte"
8
6
 
9
7
  [detect]
10
8
  dependencies = ["svelte"]
@@ -14,32 +12,35 @@ extensions = [".svelte"]
14
12
  extensions = [".svelte"]
15
13
  filenames = ["svelte.config.js", "svelte.config.ts"]
16
14
 
15
+ [defaults]
16
+ "tools.eslint.import_extension" = "extensionless"
17
+
17
18
  [[tool]]
19
+ kind = "library"
18
20
  name = "eslint-plugin-svelte"
21
+ npm = "eslint-plugin-svelte"
19
22
  rule_prefix = "svelte"
20
- kind = "library"
21
23
  version = "3.23.0"
22
- npm = "eslint-plugin-svelte"
23
24
 
24
25
  [tool.eslint]
25
26
  extensions = [".svelte"]
26
27
 
27
28
  [[tool]]
28
- name = "svelte-eslint-parser"
29
29
  kind = "library"
30
- version = "1.8.1"
30
+ name = "svelte-eslint-parser"
31
31
  npm = "svelte-eslint-parser"
32
+ version = "1.8.1"
32
33
 
33
34
  [[tool]]
34
35
  name = "svelte-check"
35
- version = "4.7.6"
36
36
  npm = "svelte-check"
37
+ version = "4.7.6"
37
38
 
38
39
  [[tool]]
39
- name = "prettier-plugin-svelte"
40
40
  kind = "library"
41
- version = "4.1.1"
41
+ name = "prettier-plugin-svelte"
42
42
  npm = "prettier-plugin-svelte"
43
+ version = "4.1.1"
43
44
 
44
45
  [tool.prettier]
45
46
  entry = "plugin.js"
@@ -51,21 +52,6 @@ files = "*.svelte"
51
52
  [tool.prettier.overrides.options]
52
53
  embeddedLanguageFormatting = "auto"
53
54
 
54
- [[check]]
55
- name = "svelte-check"
56
- tool = "svelte-check"
57
- example = "A component containing `<img src={source} />` reports `a11y_missing_attribute`. Give the image a text alternative, such as `<img src={source} alt={caption} />`."
58
- level = "recommended"
59
- stage = "push"
60
- runs = "scope"
61
- instead_of = "typescript/tsc"
62
- summary = "Runs svelte-check over the scope: the warnings of the Svelte compiler, its accessibility warnings, and the types of every component and TypeScript file."
63
- why = "The TypeScript compiler cannot read a component file, and the Svelte compiler warns about markup that no browser reports."
64
- help = "Read the warning or error svelte-check prints for the file and fix it there; a warning fails the check as an error does."
65
-
66
- [check.files]
67
- extensions = [".svelte"]
68
-
69
55
  [eslint]
70
56
  all_level_rules = ["svelte/no-useless-mustaches", "svelte/prefer-const", "svelte/no-dom-manipulating", "svelte/require-event-dispatcher-types"]
71
57
 
@@ -73,11 +59,23 @@ all_level_rules = ["svelte/no-useless-mustaches", "svelte/prefer-const", "svelte
73
59
  package = "eslint-plugin-svelte"
74
60
  source = "configs.recommended"
75
61
 
76
- [defaults]
77
- "tools.eslint.import_extension" = "extensionless"
78
-
79
62
  [[tool_file]]
80
- target = ".gspot/config/eslint.config.mjs"
81
- tool = "eslint"
82
63
  fragment = true
83
64
  required_tools = ["eslint-plugin-svelte", "svelte-eslint-parser"]
65
+ target = ".gspot/config/eslint.config.mjs"
66
+ tool = "eslint"
67
+
68
+ [[check]]
69
+ example = "A component containing `<img src={source} />` reports `a11y_missing_attribute`. Give the image a text alternative, such as `<img src={source} alt={caption} />`."
70
+ help = "Fix each warning and error svelte-check prints; both fail the check."
71
+ instead_of = "typescript/tsc"
72
+ level = "recommended"
73
+ name = "svelte-check"
74
+ runs = "scope"
75
+ stage = "push"
76
+ summary = "Runs svelte-check over the scope for compiler and accessibility warnings, and the types of every component and TypeScript file."
77
+ tool = "svelte-check"
78
+ why = "tsc cannot parse a component file, and the Svelte compiler warns about markup that no browser reports."
79
+
80
+ [check.files]
81
+ extensions = [".svelte"]
@@ -1,18 +1,18 @@
1
1
  # Svelte
2
2
 
3
- These rules cover Svelte 5 components, runes, props and events, markup, and data loading in SvelteKit.
3
+ Read this rule when you change Svelte components or SvelteKit routes.
4
4
 
5
5
  ## Components
6
6
 
7
7
  <!-- level: all -->
8
8
 
9
- - Use `$derived` for values used in markup.
9
+ - Use `$derived` for values in markup.
10
10
  - Pass a prop or callback instead of changing state through `bind:this`.
11
11
 
12
12
  ## Runes and reactivity
13
13
 
14
- - Use `$state` for a value that changes and `$derived` for a value computed from others.
15
- - Use `$effect` for work outside Svelte: a request, a timer, storage, the DOM. Do not use it to derive state.
14
+ - Use `$state` for a value that changes and `$derived` for one computed from others.
15
+ - Use `$effect` for work outside Svelte: a request, a timer, storage, or the DOM. Do not use it to derive state.
16
16
  - An `$effect` that starts something returns a function that stops it.
17
17
  - Keep derived expressions free of side effects. Do not mutate state while computing a derivation.
18
18
  - Temporarily override a mutable `$derived` value for optimistic UI only in Svelte 5.25 and later.
@@ -29,14 +29,14 @@ These rules cover Svelte 5 components, runes, props and events, markup, and data
29
29
 
30
30
  <!-- level: all -->
31
31
 
32
- Name a callback prop for what happened: `onsave`, `onclose`.
32
+ Name a callback prop for what happened, such as `onsave` or `onclose`.
33
33
 
34
34
  ## Data loading and the server
35
35
 
36
36
  - Load data in `load` functions, never in `onMount` for a page that can render on the server.
37
37
  - Code under `$lib/server` and in `+page.server` files stays on the server. Do not import it from a component.
38
38
  - Read a secret from `$env/static/private` or `$env/dynamic/private`, and only on the server.
39
- - A form posts to a form action and works with JavaScript off. Enhance it, do not replace it.
39
+ - A form posts to a form action and works with JavaScript off. Enhance it; do not replace it.
40
40
 
41
41
  ## Accessibility
42
42
 
@@ -1,8 +1,8 @@
1
1
  [configuration]
2
- title = "Vue"
2
+ description = "ESLint checks Vue templates, scripts, and accessibility. Rules for attribute spelling, component names, declarations, ordering, and default props apply at level all. HTML injection rules apply at both levels."
3
3
  requires = ["javascript"]
4
4
  suggests = ["typescript", "css"]
5
- description = "ESLint checks Vue templates, scripts, and accessibility. Attribute spelling, component names, declarations, ordering, and default props wait for level all. HTML injection checks run at both levels."
5
+ title = "Vue"
6
6
 
7
7
  [detect]
8
8
  dependencies = ["vue"]
@@ -11,56 +11,36 @@ extensions = [".vue"]
11
11
  [files]
12
12
  extensions = [".vue"]
13
13
 
14
+ [defaults]
15
+ "tools.eslint.import_extension" = "extensionless"
16
+
14
17
  [[tool]]
18
+ kind = "library"
15
19
  name = "eslint-plugin-vue"
20
+ npm = "eslint-plugin-vue"
16
21
  rule_prefix = "vue"
17
- kind = "library"
18
22
  version = "10.11.0"
19
- npm = "eslint-plugin-vue"
20
23
 
21
24
  [tool.eslint]
22
25
  extensions = [".vue"]
23
26
 
24
27
  [[tool]]
25
- name = "vue-eslint-parser"
26
28
  kind = "library"
27
- version = "10.4.1"
29
+ name = "vue-eslint-parser"
28
30
  npm = "vue-eslint-parser"
31
+ version = "10.4.1"
29
32
 
30
33
  [[tool]]
34
+ kind = "library"
31
35
  name = "eslint-plugin-vuejs-accessibility"
36
+ npm = "eslint-plugin-vuejs-accessibility"
32
37
  rule_prefix = "vuejs-accessibility"
33
- kind = "library"
34
38
  version = "2.6.0"
35
- npm = "eslint-plugin-vuejs-accessibility"
36
39
 
37
40
  [[tool]]
38
41
  name = "vue-tsc"
39
- version = "3.3.11"
40
42
  npm = "vue-tsc"
41
-
42
- [[check]]
43
- name = "vue-tsc"
44
- example = "A component script containing `const count: number = 'one';` reports an incompatible assignment. Correct it to `const count: number = 1;` when the contract requires a number."
45
- level = "recommended"
46
- stage = "push"
47
- runs = "scope"
48
- cwd = "scope"
49
- tool = "vue-tsc"
50
- instead_of = "typescript/tsc"
51
- summary = "Type-checks every Vue component and TypeScript file of the scope with the strict compiler options."
52
- why = "The TypeScript compiler cannot read a component file, so a type error inside one ships unless the Vue checker reads it."
53
- help = "Read the first error vue-tsc prints and fix that file; later errors are often the same mistake."
54
-
55
- [check.when]
56
- configuration = "typescript"
57
-
58
- [check.files]
59
- extensions = [".vue"]
60
-
61
- [check.output]
62
- format = "regex"
63
- pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"
43
+ version = "3.3.11"
64
44
 
65
45
  [eslint]
66
46
  all_level_rules = ["vue/no-useless-v-bind", "vue/prefer-true-attribute-shorthand", "vue/attribute-hyphenation", "vue/attributes-order", "vue/block-order", "vue/component-api-style", "vue/component-definition-name-casing", "vue/define-emits-declaration", "vue/define-props-declaration", "vue/multi-word-component-names", "vue/one-component-per-file", "vue/order-in-components", "vue/prop-name-casing", "vue/require-default-prop", "vue/this-in-template", "vue/v-bind-style", "vue/v-on-event-hyphenation", "vue/v-on-style", "vue/v-slot-style"]
@@ -73,11 +53,31 @@ source = "configs.flat/recommended"
73
53
  package = "eslint-plugin-vuejs-accessibility"
74
54
  source = "configs.flat/recommended"
75
55
 
76
- [defaults]
77
- "tools.eslint.import_extension" = "extensionless"
78
-
79
56
  [[tool_file]]
80
- target = ".gspot/config/eslint.config.mjs"
81
- tool = "eslint"
82
57
  fragment = true
83
58
  required_tools = ["eslint-plugin-vue", "vue-eslint-parser", "eslint-plugin-vuejs-accessibility"]
59
+ target = ".gspot/config/eslint.config.mjs"
60
+ tool = "eslint"
61
+
62
+ [[check]]
63
+ cwd = "scope"
64
+ example = "`const count: number = 'one';` in a component script reports an incompatible assignment. Assign a number, such as `const count: number = 1;`."
65
+ help = "Fix the first error vue-tsc prints; later errors often come from the same mistake."
66
+ instead_of = "typescript/tsc"
67
+ level = "recommended"
68
+ name = "vue-tsc"
69
+ runs = "scope"
70
+ stage = "push"
71
+ summary = "Type-checks every Vue component and TypeScript file of the scope with the strict compiler options."
72
+ tool = "vue-tsc"
73
+ why = "tsc cannot parse a component file, so a type error inside one ships unless vue-tsc catches it."
74
+
75
+ [check.when]
76
+ configuration = "typescript"
77
+
78
+ [check.files]
79
+ extensions = [".vue"]
80
+
81
+ [check.output]
82
+ format = "regex"
83
+ pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"