oxlint-plugin-arch 0.11.0 → 0.12.1

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 (221) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/README.md +52 -218
  3. package/dist/index.js +5205 -4073
  4. package/dist/preset/groups/backend.d.ts +2 -0
  5. package/dist/preset/groups/basics.d.ts +2 -0
  6. package/dist/preset/groups/comments.d.ts +2 -0
  7. package/dist/preset/groups/console.d.ts +2 -0
  8. package/dist/preset/groups/deny.d.ts +2 -0
  9. package/dist/preset/groups/expo.d.ts +2 -0
  10. package/dist/preset/groups/externals.d.ts +2 -0
  11. package/dist/preset/groups/forms.d.ts +2 -0
  12. package/dist/preset/groups/imports.d.ts +2 -0
  13. package/dist/preset/groups/layout.d.ts +2 -0
  14. package/dist/preset/groups/limits.d.ts +2 -0
  15. package/dist/preset/groups/naming.d.ts +2 -0
  16. package/dist/preset/groups/next.d.ts +2 -0
  17. package/dist/preset/groups/orpc.d.ts +2 -0
  18. package/dist/preset/groups/react.d.ts +2 -0
  19. package/dist/preset/groups/schemas.d.ts +2 -0
  20. package/dist/preset/groups/shadcn.d.ts +2 -0
  21. package/dist/preset/groups/sql.d.ts +2 -0
  22. package/dist/preset/groups/style.d.ts +2 -0
  23. package/dist/preset/groups/tailwind.d.ts +2 -0
  24. package/dist/preset/groups/tanstack.d.ts +2 -0
  25. package/dist/preset/groups/tests.d.ts +2 -0
  26. package/dist/preset/groups/types.d.ts +2 -0
  27. package/dist/preset/preset-detect.d.ts +3 -0
  28. package/dist/preset/preset-folders.d.ts +2 -0
  29. package/dist/preset/preset-recipes.d.ts +82 -0
  30. package/dist/preset/preset-stylesheet.d.ts +1 -0
  31. package/dist/preset/preset-units.d.ts +2 -0
  32. package/dist/preset/preset.constants.d.ts +79 -0
  33. package/dist/preset/preset.d.ts +89 -0
  34. package/dist/preset/preset.js +2299 -0
  35. package/dist/preset/preset.utils.d.ts +14 -0
  36. package/dist/rules/backend/backend-orpc-output.d.ts +1 -0
  37. package/dist/rules/backend/backend-registry.d.ts +1 -0
  38. package/dist/rules/backend/backend-service-functions.d.ts +1 -0
  39. package/dist/rules/backend/backend-sql-like.d.ts +1 -0
  40. package/dist/rules/boundaries/boundaries-deny.d.ts +1 -0
  41. package/dist/rules/boundaries/boundaries-imports.d.ts +1 -0
  42. package/dist/rules/boundaries/boundaries-next.d.ts +1 -0
  43. package/dist/rules/boundaries/boundaries-rpc-database.d.ts +1 -0
  44. package/dist/rules/boundaries/boundaries-tanstack.d.ts +1 -0
  45. package/dist/rules/boundaries/boundaries-token-owner.d.ts +1 -0
  46. package/dist/rules/code/code-constructor.d.ts +1 -0
  47. package/dist/rules/code/code-double-negation.d.ts +1 -0
  48. package/dist/rules/code/code-literal-in.d.ts +1 -0
  49. package/dist/rules/code/code-mutable-state.d.ts +1 -0
  50. package/dist/rules/code/code-object-params.d.ts +1 -0
  51. package/dist/rules/code/code-paired-call.d.ts +1 -0
  52. package/dist/rules/code/code-promise-mutation.d.ts +1 -0
  53. package/dist/rules/code/code-switch.d.ts +1 -0
  54. package/dist/rules/code/code-trivial-functions.d.ts +1 -0
  55. package/dist/rules/comments/comments-code.d.ts +1 -0
  56. package/dist/rules/comments/comments-directives.d.ts +1 -0
  57. package/dist/rules/copy/copy-dashes.d.ts +1 -0
  58. package/dist/rules/files/files-components-only.d.ts +1 -0
  59. package/dist/rules/files/files-constants-only.d.ts +1 -0
  60. package/dist/rules/files/files-domain-constants.d.ts +1 -0
  61. package/dist/rules/files/files-exports.d.ts +1 -0
  62. package/dist/rules/files/files-externals.d.ts +1 -0
  63. package/dist/rules/files/files-factory-keys.d.ts +1 -0
  64. package/dist/rules/files/files-helpers.d.ts +1 -0
  65. package/dist/rules/files/files-no-functions.d.ts +1 -0
  66. package/dist/rules/files/files-restricted.d.ts +1 -0
  67. package/dist/rules/files/files-route.d.ts +1 -0
  68. package/dist/rules/files/files-types-only.d.ts +1 -0
  69. package/dist/rules/layout/layout-call-arguments.d.ts +1 -0
  70. package/dist/rules/layout/layout-call-array.d.ts +1 -0
  71. package/dist/rules/layout/layout-chain.d.ts +1 -0
  72. package/dist/rules/layout/layout-jsx-attributes.d.ts +1 -0
  73. package/dist/rules/layout/layout-key-value.d.ts +1 -0
  74. package/dist/rules/layout/layout-object.d.ts +1 -0
  75. package/dist/rules/layout/layout-padding.d.ts +1 -0
  76. package/dist/rules/layout/layout-ternary.d.ts +1 -0
  77. package/dist/rules/naming/naming-declarations.d.ts +1 -0
  78. package/dist/rules/naming/naming-exports.d.ts +1 -0
  79. package/dist/rules/naming/naming-file.d.ts +1 -0
  80. package/dist/rules/naming/naming-folder.d.ts +1 -0
  81. package/dist/rules/naming/naming-types.d.ts +1 -0
  82. package/dist/rules/react/react-dynamic-classes.d.ts +1 -0
  83. package/dist/rules/react/react-empty-effect.d.ts +1 -0
  84. package/dist/rules/react/react-memo.d.ts +1 -0
  85. package/dist/rules/react/react-props.d.ts +1 -0
  86. package/dist/rules/schemas/schemas-inline.d.ts +1 -0
  87. package/dist/rules/schemas/schemas-local.d.ts +1 -0
  88. package/dist/rules/schemas/schemas-rederive.d.ts +1 -0
  89. package/dist/rules/schemas/schemas-single-use.d.ts +1 -0
  90. package/dist/rules/tests/tests-assertions.d.ts +1 -0
  91. package/dist/rules/tests/tests-concurrent-db.d.ts +1 -0
  92. package/dist/rules/tests/tests-modifiers.d.ts +1 -0
  93. package/dist/rules/tests/tests-titles.d.ts +1 -0
  94. package/dist/rules/types/types-declarations.d.ts +1 -0
  95. package/dist/rules/types/types-imported-alias.d.ts +1 -0
  96. package/dist/rules/types/types-inline.d.ts +1 -0
  97. package/dist/rules/types/types-local-alias.d.ts +1 -0
  98. package/dist/rules/types/types-namespace-import.d.ts +1 -0
  99. package/dist/rules/types/types-service.d.ts +1 -0
  100. package/dist/rules/types/types-unknown.d.ts +1 -0
  101. package/dist/types/ast.types.d.ts +2 -0
  102. package/dist/types/backend.types.d.ts +24 -0
  103. package/dist/types/boundaries.types.d.ts +72 -0
  104. package/dist/types/code.types.d.ts +59 -0
  105. package/dist/types/comments.types.d.ts +12 -0
  106. package/dist/types/copy.types.d.ts +4 -0
  107. package/dist/types/declarations.types.d.ts +20 -0
  108. package/dist/types/dillon-anti-slop.types.d.ts +55 -0
  109. package/dist/types/exports.types.d.ts +11 -0
  110. package/dist/types/files.types.d.ts +85 -0
  111. package/dist/types/layout.types.d.ts +55 -0
  112. package/dist/types/naming.types.d.ts +52 -0
  113. package/dist/types/options.types.d.ts +4 -0
  114. package/dist/types/preset.types.d.ts +248 -129
  115. package/dist/types/react.types.d.ts +14 -0
  116. package/dist/types/schemas.types.d.ts +20 -0
  117. package/dist/types/source.types.d.ts +1 -0
  118. package/dist/types/tests.types.d.ts +39 -0
  119. package/dist/types/types.types.d.ts +20 -0
  120. package/dist/utils/ast.utils.d.ts +19 -0
  121. package/dist/utils/boundaries.utils.d.ts +85 -0
  122. package/dist/utils/declarations.utils.d.ts +21 -0
  123. package/dist/utils/exports.utils.d.ts +6 -0
  124. package/dist/utils/naming.utils.d.ts +11 -0
  125. package/dist/utils/options.utils.d.ts +11 -0
  126. package/dist/utils/react.utils.d.ts +3 -0
  127. package/dist/utils/schemas.utils.d.ts +36 -0
  128. package/dist/utils/source.utils.d.ts +18 -0
  129. package/dist/vendor/dillon-anti-slop/index.js +1770 -0
  130. package/dist/vendor/dillon-anti-slop/rules/no-known-value-widening.d.ts +2 -0
  131. package/dist/vendor/dillon-anti-slop/rules/no-module-mocking.d.ts +2 -0
  132. package/dist/vendor/dillon-anti-slop/shared/dictionary-types.d.ts +5 -0
  133. package/dist/vendor/dillon-anti-slop/shared/expressions.d.ts +5 -0
  134. package/dist/vendor/dillon-anti-slop/shared/lexical-type-parameters.d.ts +2 -0
  135. package/dist/vendor/dillon-anti-slop/shared/reflect-method.d.ts +1 -0
  136. package/dist/vendor/dillon-anti-slop/shared/resolve-variable.d.ts +2 -0
  137. package/dist/vendor/dillon-anti-slop/shared/signatures.d.ts +15 -0
  138. package/dist/vendor/dillon-anti-slop/shared/type-aliases.d.ts +4 -0
  139. package/dist/vendor/dillon-anti-slop/shared/type-environment.d.ts +9 -0
  140. package/dist/vendor/dillon-anti-slop/shared/type-reference-name.d.ts +2 -0
  141. package/dist/vendor/dillon-anti-slop/shared/widening-targets.d.ts +3 -0
  142. package/package.json +51 -43
  143. package/src/{rules → vendor}/dillon-anti-slop/UPSTREAM.md +9 -6
  144. package/dist/configs/boundaries.d.ts +0 -2
  145. package/dist/configs/modules.d.ts +0 -2
  146. package/dist/configs/plugins.d.ts +0 -3
  147. package/dist/configs/react.d.ts +0 -2
  148. package/dist/configs/source.d.ts +0 -2
  149. package/dist/configs/tests.d.ts +0 -2
  150. package/dist/configs/types.d.ts +0 -2
  151. package/dist/constants/preset.constants.d.ts +0 -38
  152. package/dist/constants/test.constants.d.ts +0 -1
  153. package/dist/presets/index.d.ts +0 -4
  154. package/dist/presets/index.js +0 -1736
  155. package/dist/presets/next-react-modules-preset.d.ts +0 -4
  156. package/dist/presets/next-react-modules-preset.js +0 -1729
  157. package/dist/presets/react-modules-preset.d.ts +0 -4
  158. package/dist/presets/react-modules-preset.js +0 -1724
  159. package/dist/presets/tanstack-start-react-modules-preset.d.ts +0 -4
  160. package/dist/presets/tanstack-start-react-modules-preset.js +0 -1729
  161. package/dist/rules/dillon-anti-slop/index.js +0 -2719
  162. package/dist/rules/dillon-anti-slop/rules/no-known-value-widening.d.ts +0 -1
  163. package/dist/rules/dillon-anti-slop/rules/no-module-mocking.d.ts +0 -8
  164. package/dist/rules/dillon-anti-slop/shared/dictionary-types.d.ts +0 -19
  165. package/dist/rules/dillon-anti-slop/shared/lexical-type-parameters.d.ts +0 -4
  166. package/dist/rules/dillon-anti-slop/shared/reflect-method.d.ts +0 -2
  167. package/dist/rules/module-policy/domain-constants.d.ts +0 -2
  168. package/dist/rules/module-policy/import-boundaries.d.ts +0 -2
  169. package/dist/rules/module-policy/index.js +0 -2266
  170. package/dist/rules/module-policy/memoization.d.ts +0 -2
  171. package/dist/rules/module-policy/next-runtime.d.ts +0 -7
  172. package/dist/rules/module-policy/no-unknown.d.ts +0 -6
  173. package/dist/rules/module-policy/reasoned-directives.d.ts +0 -2
  174. package/dist/rules/module-policy/service-functions.d.ts +0 -2
  175. package/dist/rules/module-policy/service-types.d.ts +0 -2
  176. package/dist/rules/module-policy/tanstack-runtime.d.ts +0 -2
  177. package/dist/rules/module-policy/test-assertions.d.ts +0 -2
  178. package/dist/rules/module-policy/test-modifiers.d.ts +0 -2
  179. package/dist/services/preset-compose.d.ts +0 -3
  180. package/dist/services/preset-context.d.ts +0 -2
  181. package/dist/types/module-policy.types.d.ts +0 -39
  182. package/dist/types/test-analysis.types.d.ts +0 -11
  183. package/dist/utils/helpers/ast.d.ts +0 -12
  184. package/dist/utils/helpers/boundaries.d.ts +0 -3
  185. package/dist/utils/helpers/comments.d.ts +0 -6
  186. package/dist/utils/helpers/declarations.d.ts +0 -35
  187. package/dist/utils/helpers/exports.d.ts +0 -18
  188. package/dist/utils/helpers/factories.d.ts +0 -9
  189. package/dist/utils/helpers/guards.d.ts +0 -11
  190. package/dist/utils/helpers/index.d.ts +0 -18
  191. package/dist/utils/helpers/layout.d.ts +0 -15
  192. package/dist/utils/helpers/mocking.d.ts +0 -2
  193. package/dist/utils/helpers/naming.d.ts +0 -13
  194. package/dist/utils/helpers/options.d.ts +0 -22
  195. package/dist/utils/helpers/orpc.d.ts +0 -3
  196. package/dist/utils/helpers/preset.d.ts +0 -9
  197. package/dist/utils/helpers/react-components.d.ts +0 -13
  198. package/dist/utils/helpers/routes.d.ts +0 -5
  199. package/dist/utils/helpers/runtime.d.ts +0 -14
  200. package/dist/utils/helpers/sanitizers.d.ts +0 -3
  201. package/dist/utils/helpers/schemas.d.ts +0 -10
  202. package/dist/utils/helpers/syntax.d.ts +0 -1
  203. package/dist/utils/helpers/test-tables.d.ts +0 -8
  204. package/dist/utils/helpers/trivial.d.ts +0 -6
  205. package/dist/utils/index.d.ts +0 -1
  206. /package/dist/{rules/module-policy/index.d.ts → index.d.ts} +0 -0
  207. /package/dist/{rules → vendor}/dillon-anti-slop/index.d.ts +0 -0
  208. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-chained-type-assertions.d.ts +0 -0
  209. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-conditional-empty-object-spread.d.ts +0 -0
  210. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-object-parameters.d.ts +0 -0
  211. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-reflect-apply.d.ts +0 -0
  212. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-reflect-get.d.ts +0 -0
  213. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-runtime-typeof.d.ts +0 -0
  214. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-shape-in-symbol-names.d.ts +0 -0
  215. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-parameters.d.ts +0 -0
  216. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-returns.d.ts +0 -0
  217. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-type-aliases.d.ts +0 -0
  218. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unsafe-dictionary-type.d.ts +0 -0
  219. /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-widen-then-assert.d.ts +0 -0
  220. /package/dist/{rules → vendor}/dillon-anti-slop/rules/require-safety-comment-for-type-assertion.d.ts +0 -0
  221. /package/src/{rules → vendor}/dillon-anti-slop/LICENSE +0 -0
@@ -0,0 +1,14 @@
1
+ import type * as PresetTypes from '../types/preset.types.ts';
2
+ import type { OxlintOverride } from 'oxlint';
3
+ export declare class PresetError extends Error {
4
+ }
5
+ export declare function presetScopes(roots: string[], suffix?: string): string[];
6
+ export declare function presetOverride(files: string[], rules: PresetTypes.PresetRules, excludeFiles?: string[]): OxlintOverride;
7
+ export declare function presetSeverity(rules: PresetTypes.PresetRules, level: PresetTypes.PresetLevel): PresetTypes.PresetRules;
8
+ export declare function presetPackageName(root: string, directory: string): string | undefined;
9
+ export declare function presetIntersect(glob: string, scope: string): string[];
10
+ export declare function presetAliases(root: string, aliases: Record<string, string> | undefined): Record<string, string>;
11
+ export declare function presetRuntime(project: PresetTypes.PresetProject, settings: Required<PresetTypes.PresetFrameworkOptions>, framework: PresetTypes.PresetFramework, rule: string): OxlintOverride[];
12
+ export declare function presetManifest(root: string, directory: string): PresetTypes.PresetManifest;
13
+ export declare function presetIsDirectory(path: string): boolean;
14
+ export declare function presetIsFile(path: string): boolean;
@@ -0,0 +1 @@
1
+ export declare const backendOrpcOutput: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const backendRegistry: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const backendServiceFunctions: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const backendSqlLike: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesDeny: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesImports: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesNext: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesRpcDatabase: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesTanstack: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const boundariesTokenOwner: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeConstructor: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeDoubleNegation: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeLiteralIn: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeMutableState: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeObjectParams: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codePairedCall: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codePromiseMutation: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeSwitch: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const codeTrivialFunctions: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const commentsCode: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const commentsDirectives: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const copyDashes: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesComponentsOnly: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesConstantsOnly: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesDomainConstants: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesExports: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesExternals: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesFactoryKeys: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesHelpers: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesNoFunctions: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesRestricted: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesRoute: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesTypesOnly: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutCallArguments: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutCallArray: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutChain: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutJsxAttributes: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutKeyValue: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutObject: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutPadding: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutTernary: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingDeclarations: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingExports: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingFile: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingFolder: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingTypes: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const reactDynamicClasses: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const reactEmptyEffect: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const reactMemo: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const reactProps: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const schemasInline: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const schemasLocal: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const schemasRederive: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const schemasSingleUse: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const testsAssertions: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const testsConcurrentDb: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const testsModifiers: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const testsTitles: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesDeclarations: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesImportedAlias: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesInline: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesLocalAlias: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesNamespaceImport: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesService: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const typesUnknown: import("@oxlint/plugins").Rule;
@@ -0,0 +1,2 @@
1
+ import type { ESTree } from '@oxlint/plugins';
2
+ export type AstFunction = ESTree.Function | ESTree.ArrowFunctionExpression;
@@ -0,0 +1,24 @@
1
+ export interface BackendOrpcOutputOptions {
2
+ composers: string[];
3
+ handler?: string;
4
+ output?: string;
5
+ }
6
+ export interface BackendServiceFunctionsOptions {
7
+ frontend?: boolean;
8
+ helpers?: boolean;
9
+ methods?: boolean;
10
+ single?: boolean;
11
+ message?: string;
12
+ }
13
+ export interface BackendSqlLikeOptions {
14
+ methods: string[];
15
+ sanitizers: string[];
16
+ bindings?: boolean;
17
+ operators?: string[];
18
+ }
19
+ export interface BackendRegistryOptions {
20
+ registry: string;
21
+ services: string;
22
+ skip?: string[];
23
+ object?: string;
24
+ }
@@ -0,0 +1,72 @@
1
+ import type { ESTree } from '@oxlint/plugins';
2
+ export interface BoundariesOptions {
3
+ web: string[];
4
+ backend: string[];
5
+ packages: string | string[];
6
+ roles?: string[];
7
+ portable?: boolean;
8
+ backendPackages: string[];
9
+ appPackages: string[];
10
+ aliases: Record<string, string>;
11
+ entrypoints: string[];
12
+ uiPackages?: string[];
13
+ }
14
+ export interface BoundariesImport {
15
+ options: BoundariesOptions;
16
+ file: string;
17
+ source: string;
18
+ target: string;
19
+ typeOnly: boolean;
20
+ reExport: boolean;
21
+ roots: string[];
22
+ owner?: string;
23
+ web?: string;
24
+ backendImport: boolean;
25
+ }
26
+ export interface BoundariesNextOptions extends Partial<Pick<BoundariesOptions, 'web' | 'backend' | 'aliases' | 'backendPackages'>> {
27
+ server?: string[];
28
+ client?: string[];
29
+ dynamic?: string[];
30
+ serverPackages?: string[];
31
+ clientPackages?: string[];
32
+ hookPackages?: string[];
33
+ publicEnv?: string;
34
+ }
35
+ export interface BoundariesTanstackOptions extends BoundariesNextOptions {
36
+ rpc?: string[];
37
+ startPackages?: string[];
38
+ rscPackages?: string[];
39
+ }
40
+ export type BoundariesIdentifier = Extract<ESTree.Node, {
41
+ type: 'Identifier';
42
+ }>;
43
+ export type BoundariesSide = 'server' | 'client';
44
+ export interface BoundariesTanstackImport {
45
+ node: BoundariesIdentifier;
46
+ name: string;
47
+ }
48
+ export interface BoundariesTanstackBoundary {
49
+ start: number;
50
+ end: number;
51
+ side: BoundariesSide;
52
+ kind: string;
53
+ }
54
+ export interface BoundariesTokenOwnerRestriction {
55
+ token?: string;
56
+ member?: string;
57
+ allow?: string[];
58
+ patterns?: string[];
59
+ message?: string;
60
+ }
61
+ export interface BoundariesTokenOwnerOptions extends BoundariesTokenOwnerRestriction {
62
+ restrictions?: BoundariesTokenOwnerRestriction[];
63
+ }
64
+ export interface BoundariesTokenOwnerTarget {
65
+ kind: 'token' | 'member';
66
+ value: string;
67
+ message?: string;
68
+ }
69
+ export interface BoundariesDenyOptions {
70
+ imports?: Record<string, string>;
71
+ calls?: Record<string, string>;
72
+ }
@@ -0,0 +1,59 @@
1
+ import type { OptionsPattern } from './options.types.ts';
2
+ import type { ESTree } from '@oxlint/plugins';
3
+ export type CodeConstructorEntry = string | {
4
+ name: string;
5
+ message?: string;
6
+ };
7
+ export interface CodeConstructorOptions {
8
+ constructors: CodeConstructorEntry[];
9
+ calls?: boolean;
10
+ message?: string;
11
+ }
12
+ export interface CodeLiteralInOptions {
13
+ allow: string[];
14
+ }
15
+ export interface CodeMutableStateOptions {
16
+ kinds?: ('let' | 'var')[];
17
+ allow?: OptionsPattern;
18
+ }
19
+ export interface CodeObjectParamsOptions {
20
+ max?: number;
21
+ all?: boolean;
22
+ services?: boolean;
23
+ allow?: OptionsPattern;
24
+ }
25
+ export interface CodePairedCallPair {
26
+ when: string;
27
+ require: string;
28
+ }
29
+ export interface CodePairedCallOptions {
30
+ when?: string;
31
+ require?: string;
32
+ pairs?: CodePairedCallPair[];
33
+ }
34
+ export interface CodePairedCallState extends CodePairedCallPair {
35
+ firstWhen: ESTree.CallExpression | null;
36
+ sawRequired: boolean;
37
+ }
38
+ export interface CodePromiseMutationOptions {
39
+ combinators: string[];
40
+ methods: string[];
41
+ assignments: boolean;
42
+ }
43
+ export type CodePromiseMutationBinding = Pick<ESTree.IdentifierReference, 'name' | 'range'>;
44
+ export interface CodeTrivialFunctionsOptions {
45
+ allow?: OptionsPattern;
46
+ callees?: string[];
47
+ async?: boolean;
48
+ mode?: 'legacy' | 'precise';
49
+ services?: boolean;
50
+ deny?: string[];
51
+ guards?: boolean;
52
+ }
53
+ export interface CodeTrivialFunctionsGuardState {
54
+ values: Set<string>;
55
+ predicates: Set<string>;
56
+ primitive: boolean;
57
+ returned: boolean;
58
+ globalArray: (node: ESTree.Node) => boolean;
59
+ }
@@ -0,0 +1,12 @@
1
+ import type { ESTree } from '@oxlint/plugins';
2
+ export interface CommentsOptions {
3
+ why?: boolean;
4
+ allow?: string[];
5
+ jsdoc?: boolean;
6
+ members?: 'off' | 'also' | 'only';
7
+ }
8
+ export interface CommentsLines {
9
+ starts: number[];
10
+ ends: number[];
11
+ }
12
+ export type CommentsMemberNode = ESTree.TSPropertySignature | ESTree.TSMethodSignature | ESTree.TSIndexSignature | ESTree.TSCallSignatureDeclaration | ESTree.TSConstructSignatureDeclaration | ESTree.ObjectProperty | ESTree.BindingProperty | ESTree.AssignmentTargetProperty | ESTree.SpreadElement;
@@ -0,0 +1,4 @@
1
+ export interface CopyDashesOptions {
2
+ deny?: string[];
3
+ message?: string;
4
+ }
@@ -0,0 +1,20 @@
1
+ import type { AstFunction } from './ast.types.ts';
2
+ import type { ESTree } from '@oxlint/plugins';
3
+ export type DeclarationsKind = 'function' | 'const' | 'let' | 'var' | 'class' | 'type' | 'interface' | 'enum';
4
+ export type DeclarationsRuntime = ESTree.VariableDeclaration | ESTree.Function | ESTree.Class | ESTree.TSEnumDeclaration;
5
+ export interface DeclarationsNamed {
6
+ name: string;
7
+ node: ESTree.Node;
8
+ kind?: DeclarationsKind;
9
+ }
10
+ export interface DeclarationsFunction {
11
+ name: string;
12
+ node: AstFunction;
13
+ }
14
+ export interface DeclarationsCandidate {
15
+ name: string;
16
+ node: ESTree.Node;
17
+ declaration?: ESTree.Declaration;
18
+ initializer?: ESTree.Expression | null;
19
+ typeOnly?: boolean;
20
+ }
@@ -0,0 +1,55 @@
1
+ import type { ESTree } from '@oxlint/plugins';
2
+ export type DillonAntiSlopTypeAssertion = ESTree.TSAsExpression | ESTree.TSTypeAssertion;
3
+ export type DillonAntiSlopSignature = ESTree.ArrowFunctionExpression | ESTree.Function | ESTree.TSCallSignatureDeclaration | ESTree.TSConstructSignatureDeclaration | ESTree.TSConstructorType | ESTree.TSFunctionType | ESTree.TSMethodSignature;
4
+ export interface DillonAntiSlopAliasResolution {
5
+ readonly aliases: ReadonlyMap<string, ESTree.TSTypeAliasDeclaration>;
6
+ readonly keyword: 'TSObjectKeyword' | 'TSUnknownKeyword';
7
+ readonly shadowed: ReadonlySet<string>;
8
+ readonly unions: boolean;
9
+ readonly promises: boolean;
10
+ }
11
+ export type DillonAntiSlopTestFramework = 'vi' | 'jest';
12
+ export interface DillonAntiSlopDeniedApi {
13
+ api: string;
14
+ message?: string;
15
+ }
16
+ export interface DillonAntiSlopModuleMockingOptions {
17
+ deny?: (string | DillonAntiSlopDeniedApi)[];
18
+ allow?: string[];
19
+ checkDestructured?: boolean;
20
+ }
21
+ export interface DillonAntiSlopRuntimeTypeofOptions {
22
+ allowInTypeGuards?: boolean;
23
+ }
24
+ export type DillonAntiSlopSubstitutions = ReadonlyMap<string, ESTree.TSType>;
25
+ export interface DillonAntiSlopResolvedType {
26
+ readonly type: ESTree.TSType;
27
+ readonly substitutions: DillonAntiSlopSubstitutions;
28
+ }
29
+ export interface DillonAntiSlopAliasStep extends DillonAntiSlopResolvedType {
30
+ readonly resolving: ReadonlySet<string>;
31
+ }
32
+ export interface DillonAntiSlopNamedReference {
33
+ readonly reference: ESTree.TSTypeReference;
34
+ readonly name: string;
35
+ readonly transparent: boolean;
36
+ readonly argument: ESTree.TSType | undefined;
37
+ }
38
+ export type DillonAntiSlopUnsafeValue = 'any' | 'empty-object' | 'object' | 'union' | 'unknown';
39
+ export type DillonAntiSlopWideningTargetKind = 'anonymous object' | 'generic container' | 'object' | 'open dictionary' | 'unknown';
40
+ export interface DillonAntiSlopWideningTarget {
41
+ readonly kind: DillonAntiSlopWideningTargetKind;
42
+ }
43
+ export interface DillonAntiSlopTypeEnvironment {
44
+ readonly aliases: ReadonlyMap<string, ESTree.TSTypeAliasDeclaration>;
45
+ readonly interfaces: ReadonlyMap<string, readonly ESTree.TSInterfaceDeclaration[]>;
46
+ readonly shadowedBuiltIns: ReadonlySet<string>;
47
+ }
48
+ export type DillonAntiSlopBroadTypeKind = 'top' | 'object' | 'record';
49
+ export interface DillonAntiSlopKnownValueEvidence {
50
+ readonly type: ESTree.TSType | null;
51
+ }
52
+ export interface DillonAntiSlopConstBinding {
53
+ readonly declarator: ESTree.VariableDeclarator;
54
+ readonly init: ESTree.Expression;
55
+ }
@@ -0,0 +1,11 @@
1
+ import type { ESTree } from '@oxlint/plugins';
2
+ export interface ExportsBinding {
3
+ exportedName: string;
4
+ localName?: string;
5
+ node: ESTree.Node;
6
+ declaration?: ESTree.Declaration;
7
+ initializer?: ESTree.Expression | null;
8
+ typeOnly: boolean;
9
+ default: boolean;
10
+ reExport: boolean;
11
+ }
@@ -0,0 +1,85 @@
1
+ import type { NamingExportsStem } from './naming.types.ts';
2
+ import type { OptionsPattern } from './options.types.ts';
3
+ import type { ESTree } from '@oxlint/plugins';
4
+ export interface FilesComponentsOnlyOptions {
5
+ filename?: boolean;
6
+ roles?: string[];
7
+ types?: boolean;
8
+ deny?: OptionsPattern;
9
+ }
10
+ export interface FilesConstantsOnlyOptions {
11
+ functions?: boolean;
12
+ types?: boolean;
13
+ reexports?: boolean;
14
+ }
15
+ export interface FilesConstantsOnlyBinding {
16
+ kind: 'const' | 'type' | 'import' | 'function' | 'class' | 'other';
17
+ value?: ESTree.Expression | null;
18
+ }
19
+ export interface FilesDomainConstantsOptions {
20
+ services?: boolean;
21
+ data?: boolean;
22
+ }
23
+ export interface FilesExportsOptions extends Pick<NamingExportsStem, 'stem' | 'roles' | 'separators'> {
24
+ names?: string[];
25
+ patterns?: string[];
26
+ types?: boolean;
27
+ factory?: string;
28
+ scope?: 'exports' | 'declarations';
29
+ }
30
+ export interface FilesFactoryKeySet {
31
+ factory: OptionsPattern;
32
+ keys: string[];
33
+ required?: string[];
34
+ }
35
+ export interface FilesFactoryKeysOptions {
36
+ keys?: string[];
37
+ factory?: OptionsPattern;
38
+ required?: string[];
39
+ sets?: FilesFactoryKeySet[];
40
+ }
41
+ export interface FilesFactoryKeysCompiled {
42
+ patterns: RegExp[];
43
+ allowed: Set<string>;
44
+ allowedList: string[];
45
+ required: string[];
46
+ }
47
+ export interface FilesHelpersOptions {
48
+ allow?: OptionsPattern;
49
+ components?: boolean;
50
+ message?: string;
51
+ hooks?: OptionsPattern;
52
+ }
53
+ export interface FilesNoFunctionsOptions {
54
+ reexports: boolean;
55
+ allow?: OptionsPattern;
56
+ }
57
+ export interface FilesRestrictedOptions {
58
+ message: string;
59
+ }
60
+ export interface FilesRouteOptions {
61
+ export: string;
62
+ exports: string[];
63
+ inspect: boolean;
64
+ hooks: string[];
65
+ intrinsic: boolean;
66
+ }
67
+ export type FilesTypesOnlyAllow = 'class' | 'default' | 'enum' | 'function' | 'variable';
68
+ export interface FilesTypesOnlyOptions {
69
+ allow?: FilesTypesOnlyAllow[];
70
+ imports?: 'allow' | 'ban';
71
+ sources?: string[];
72
+ reexports?: boolean;
73
+ }
74
+ export interface FilesTypesOnlyImport {
75
+ node: ESTree.Node;
76
+ source: string;
77
+ locals: string[];
78
+ }
79
+ export interface FilesExternalsOptions {
80
+ packages?: string[];
81
+ }
82
+ export interface FilesExternalsManifest {
83
+ dependencies?: Record<string, string>;
84
+ optionalDependencies?: Record<string, string>;
85
+ }