oxlint-plugin-arch 0.13.0 → 0.13.2

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 (38) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +7 -7
  3. package/dist/index.js +2154 -504
  4. package/dist/preset/groups/top.d.ts +2 -0
  5. package/dist/preset/preset-sets.d.ts +2 -0
  6. package/dist/preset/preset.constants.d.ts +4 -1
  7. package/dist/preset/preset.js +299 -57
  8. package/dist/preset/preset.utils.d.ts +2 -0
  9. package/dist/rules/code/code-inside.d.ts +1 -0
  10. package/dist/rules/effect/effect-layer-keys.d.ts +1 -0
  11. package/dist/rules/effect/effect-service-params.d.ts +1 -0
  12. package/dist/rules/effect/effect-yield-name.d.ts +1 -0
  13. package/dist/rules/effect/effect-yields-first.d.ts +1 -0
  14. package/dist/rules/files/files-siblings.d.ts +1 -0
  15. package/dist/rules/files/files-top-level.d.ts +1 -0
  16. package/dist/rules/layout/layout-type-arguments.d.ts +1 -0
  17. package/dist/rules/naming/naming-imports.d.ts +1 -0
  18. package/dist/rules/naming/naming-keys.d.ts +1 -0
  19. package/dist/rules/naming/naming-labels.d.ts +1 -0
  20. package/dist/rules/naming/naming-pairs.d.ts +1 -0
  21. package/dist/types/boundaries.types.d.ts +33 -1
  22. package/dist/types/code.types.d.ts +12 -0
  23. package/dist/types/comments.types.d.ts +1 -0
  24. package/dist/types/dillon-anti-slop.types.d.ts +6 -0
  25. package/dist/types/effect.types.d.ts +21 -0
  26. package/dist/types/files.types.d.ts +33 -3
  27. package/dist/types/layout.types.d.ts +16 -0
  28. package/dist/types/naming.types.d.ts +74 -2
  29. package/dist/types/preset.types.d.ts +26 -0
  30. package/dist/types/react.types.d.ts +13 -0
  31. package/dist/types/types.types.d.ts +4 -0
  32. package/dist/utils/ast.utils.d.ts +1 -2
  33. package/dist/utils/boundaries.utils.d.ts +72 -4
  34. package/dist/utils/naming.utils.d.ts +4 -1
  35. package/dist/utils/options.utils.d.ts +2 -0
  36. package/dist/vendor/dillon-anti-slop/index.js +40 -15
  37. package/package.json +1 -1
  38. package/src/vendor/dillon-anti-slop/UPSTREAM.md +3 -0
@@ -11,6 +11,7 @@ export declare function presetSeverity(rules: PresetTypes.PresetRules, level: Pr
11
11
  export declare function presetPackageName(root: string, directory: string): string | undefined;
12
12
  export declare function presetIntersect(glob: string, scope: string): string[];
13
13
  export declare function presetGlobEscape(path: string): string;
14
+ export declare function presetFileOverlaps(root: string, build: (pattern: string, folder: PresetTypes.PresetFolder) => PresetTypes.PresetFileKey, keys: PresetTypes.PresetFileKey[]): PresetTypes.PresetFileKey[];
14
15
  export declare function presetAliases(root: string, aliases: Record<string, string> | undefined): Record<string, string>;
15
16
  export declare function presetRuntime(project: PresetTypes.PresetProject, settings: Required<PresetTypes.PresetFrameworkOptions>, framework: PresetTypes.PresetFramework, rule: string): OxlintOverride[];
16
17
  export declare function presetManifest(root: string, directory: string): PresetTypes.PresetManifest;
@@ -20,3 +21,4 @@ export declare function presetIsFile(path: string): boolean;
20
21
  export declare function presetSource(root: string, directory: string, configured?: string): string;
21
22
  export declare function presetFilled(conventions: PresetTypes.PresetFolders, exists: (path: string) => boolean): PresetTypes.PresetFolders;
22
23
  export declare function presetMerge(base: boolean | PresetTypes.PresetFolder | undefined, top: boolean | PresetTypes.PresetFolder): boolean | PresetTypes.PresetFolder;
24
+ export declare function presetNames(inherited: string[], entries: unknown, option: string): string[];
@@ -0,0 +1 @@
1
+ export declare const codeInside: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const effectLayerKeys: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const effectServiceParams: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const effectYieldName: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const effectYieldsFirst: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesSiblings: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const filesTopLevel: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const layoutTypeArguments: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingImports: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingKeys: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingLabels: import("@oxlint/plugins").Rule;
@@ -0,0 +1 @@
1
+ export declare const namingPairs: import("@oxlint/plugins").Rule;
@@ -6,13 +6,27 @@ export interface BoundariesOptions {
6
6
  roles?: string[];
7
7
  surfaces?: string[];
8
8
  services?: string[];
9
- portable?: boolean;
9
+ portable?: boolean | string;
10
+ conventions?: BoundariesConventions;
10
11
  backendPackages: string[];
11
12
  appPackages: string[];
12
13
  aliases: Record<string, string>;
13
14
  entrypoints: string[];
14
15
  uiPackages?: string[];
15
16
  }
17
+ export interface BoundariesConventions {
18
+ services?: string;
19
+ registry?: string;
20
+ types?: string;
21
+ lib?: string;
22
+ contracts?: string[];
23
+ implementations?: string[];
24
+ implementationFolders?: string[];
25
+ operations?: string[];
26
+ operationFolders?: string[];
27
+ domainFiles?: string[];
28
+ clients?: string[];
29
+ }
16
30
  export interface BoundariesImport {
17
31
  options: BoundariesOptions;
18
32
  file: string;
@@ -25,7 +39,18 @@ export interface BoundariesImport {
25
39
  web?: string;
26
40
  backendImport: boolean;
27
41
  }
42
+ export interface BoundariesRuntimeConventions {
43
+ server?: string[];
44
+ rsc?: string[];
45
+ actions?: string[];
46
+ client?: string[];
47
+ clientOnly?: string[];
48
+ hooks?: string[];
49
+ shared?: string[];
50
+ lib?: string;
51
+ }
28
52
  export interface BoundariesNextOptions extends Partial<Pick<BoundariesOptions, 'web' | 'backend' | 'aliases' | 'backendPackages'>> {
53
+ conventions?: BoundariesRuntimeConventions;
29
54
  server?: string[];
30
55
  client?: string[];
31
56
  dynamic?: string[];
@@ -74,7 +99,14 @@ export interface BoundariesRpcDatabaseOptions {
74
99
  message?: string;
75
100
  methods?: string[];
76
101
  }
102
+ export interface BoundariesDenyOnly {
103
+ imports?: string | string[];
104
+ calls?: string | string[];
105
+ in: string | string[];
106
+ message?: string;
107
+ }
77
108
  export interface BoundariesDenyOptions {
78
109
  imports?: Record<string, string>;
79
110
  calls?: Record<string, string>;
111
+ only?: BoundariesDenyOnly[];
80
112
  }
@@ -69,6 +69,7 @@ export interface CodeTrivialFunctionsGuardState {
69
69
  export interface CodeInlineOptions {
70
70
  max?: number;
71
71
  nesting?: number;
72
+ callbacks?: boolean;
72
73
  allow?: OptionsPattern;
73
74
  keep?: OptionsPattern;
74
75
  services?: string[];
@@ -88,3 +89,14 @@ export interface CodeTracedOptions {
88
89
  skip?: OptionsPattern;
89
90
  message?: string;
90
91
  }
92
+ export interface CodeInsideEntry {
93
+ callee: OptionsPattern;
94
+ calls: Record<string, string>;
95
+ }
96
+ export interface CodeInsideOptions {
97
+ inside: CodeInsideEntry[];
98
+ }
99
+ export interface CodeInsideCompiled {
100
+ callees: RegExp[];
101
+ calls: [RegExp, string][];
102
+ }
@@ -4,6 +4,7 @@ export interface CommentsOptions {
4
4
  allow?: string[];
5
5
  jsdoc?: boolean;
6
6
  members?: 'off' | 'also' | 'only';
7
+ steps?: boolean;
7
8
  }
8
9
  export interface CommentsLines {
9
10
  starts: number[];
@@ -53,3 +53,9 @@ export interface DillonAntiSlopConstBinding {
53
53
  readonly declarator: ESTree.VariableDeclarator;
54
54
  readonly init: ESTree.Expression;
55
55
  }
56
+ export interface DillonAntiSlopSymbolNamesOptions {
57
+ terms?: string[];
58
+ }
59
+ export interface DillonAntiSlopSafetyCommentOptions {
60
+ comment?: string;
61
+ }
@@ -22,6 +22,7 @@ export interface EffectLayerFileOptions {
22
22
  layer?: string;
23
23
  make?: string;
24
24
  prefix?: string;
25
+ suffix?: string;
25
26
  builders?: string[];
26
27
  layers?: OptionsPattern;
27
28
  services?: OptionsPattern;
@@ -39,8 +40,28 @@ export interface EffectSchemaFirstDerived {
39
40
  export interface EffectSchemaFirstOptions {
40
41
  member?: string;
41
42
  keep?: OptionsPattern;
43
+ allow?: OptionsPattern;
42
44
  runtime?: string[];
43
45
  rows?: EffectSchemaFirstRows;
44
46
  order?: (EffectSchemaFirstSection | EffectSchemaFirstSection[])[];
45
47
  derived?: EffectSchemaFirstDerived;
46
48
  }
49
+ export interface EffectYieldNameOptions {
50
+ names?: Record<string, string | string[]>;
51
+ allow?: OptionsPattern;
52
+ }
53
+ export interface EffectLayerKeysOptions {
54
+ service: string;
55
+ callees?: string[];
56
+ declaration?: string;
57
+ }
58
+ export interface EffectLayerKeysFrame {
59
+ open: string;
60
+ key?: string;
61
+ members: number;
62
+ }
63
+ export interface EffectServiceParamsOptions {
64
+ name?: OptionsPattern;
65
+ allow?: OptionsPattern;
66
+ declaration?: string;
67
+ }
@@ -1,4 +1,4 @@
1
- import type { NamingExportsStem, NamingStemMode } from './naming.types.ts';
1
+ import type { NamingCaptureOptions } from './naming.types.ts';
2
2
  import type { OptionsPattern } from './options.types.ts';
3
3
  import type { ESTree } from '@oxlint/plugins';
4
4
  export interface FilesComponentsOnlyOptions {
@@ -24,8 +24,7 @@ export interface FilesDomainConstantsOptions {
24
24
  roles?: string[];
25
25
  file?: string;
26
26
  }
27
- export interface FilesExportsOptions extends Pick<NamingExportsStem, 'roles' | 'separators' | 'singularize'> {
28
- stem?: NamingStemMode | 'folder';
27
+ export interface FilesExportsOptions extends NamingCaptureOptions {
29
28
  names?: string[];
30
29
  patterns?: string[];
31
30
  types?: boolean;
@@ -89,3 +88,34 @@ export interface FilesExternalsManifest {
89
88
  dependencies?: Record<string, string>;
90
89
  optionalDependencies?: Record<string, string>;
91
90
  }
91
+ export type FilesTopLevelKind = 'import' | 'export' | 'reexport' | 'default' | 'type' | 'interface' | 'enum' | 'class' | 'namespace' | 'const' | 'let' | 'var' | 'function' | 'function-const' | 'call' | 'statement';
92
+ export interface FilesTopLevelEntry {
93
+ kind: FilesTopLevelKind | FilesTopLevelKind[];
94
+ names?: OptionsPattern;
95
+ from?: OptionsPattern;
96
+ exported?: boolean;
97
+ message?: string;
98
+ }
99
+ export interface FilesTopLevelOptions extends NamingCaptureOptions {
100
+ allow?: (string | FilesTopLevelEntry)[];
101
+ deny?: (string | FilesTopLevelEntry)[];
102
+ message?: string;
103
+ }
104
+ export interface FilesTopLevelItem {
105
+ kind: FilesTopLevelKind;
106
+ name: string;
107
+ from: string;
108
+ exported: boolean;
109
+ node: ESTree.Node;
110
+ }
111
+ export interface FilesTopLevelMatcher {
112
+ kinds: FilesTopLevelKind[];
113
+ names: RegExp[] | null;
114
+ from: RegExp[] | null;
115
+ exported?: boolean;
116
+ message: string;
117
+ }
118
+ export interface FilesSiblingsOptions {
119
+ require: OptionsPattern;
120
+ message?: string;
121
+ }
@@ -9,6 +9,10 @@ export interface LayoutCallArgumentsOptions {
9
9
  min?: number;
10
10
  indent?: SourceIndent;
11
11
  split?: boolean;
12
+ pipe?: {
13
+ min: number;
14
+ methods?: string[];
15
+ };
12
16
  hug?: {
13
17
  max: number;
14
18
  };
@@ -55,6 +59,10 @@ export interface LayoutObjectOptions {
55
59
  min?: number;
56
60
  scope?: LayoutObjectScope;
57
61
  indent?: SourceIndent;
62
+ params?: boolean;
63
+ nested?: boolean;
64
+ siblings?: boolean;
65
+ inner?: number;
58
66
  join?: {
59
67
  max: number;
60
68
  keep?: string[];
@@ -66,6 +74,13 @@ export interface LayoutPaddingOptions {
66
74
  multiline?: boolean;
67
75
  }
68
76
  export type LayoutPaddingKind = 'variable' | 'block' | 'control' | 'return' | 'other';
77
+ export interface LayoutPipeOptions {
78
+ methods?: string[];
79
+ }
80
+ export interface LayoutTypeArgumentsOptions {
81
+ min?: number;
82
+ indent?: SourceIndent;
83
+ }
69
84
  export interface LayoutTernaryOptions {
70
85
  max?: number;
71
86
  indent?: SourceIndent;
@@ -79,6 +94,7 @@ export interface LayoutItemsOptions {
79
94
  }
80
95
  export interface LayoutCallDepthOptions {
81
96
  max?: number;
97
+ callbacks?: boolean;
82
98
  }
83
99
  export interface LayoutArrowBodyOptions {
84
100
  max?: number;
@@ -1,12 +1,19 @@
1
1
  import type { DeclarationsKind } from './declarations.types.ts';
2
2
  import type { OptionsPattern } from './options.types.ts';
3
3
  export type NamingStemMode = 'before-first-dot' | 'full-basename';
4
+ export type NamingPrefixSource = 'file' | 'folder' | 'parent';
4
5
  export interface NamingExportsStem {
5
6
  stem?: NamingStemMode;
6
7
  roles?: string[];
7
8
  separators?: string[];
8
9
  normalize?: 'remove-separators' | 'none';
9
10
  singularize?: 'none' | 'trailing-s';
11
+ prefix?: NamingPrefixSource[];
12
+ }
13
+ export interface NamingCaptureOptions extends Pick<NamingExportsStem, 'roles' | 'separators' | 'singularize'> {
14
+ stem?: NamingStemMode | 'folder';
15
+ file?: string;
16
+ placeholder?: string;
10
17
  }
11
18
  export interface NamingDeclarationsOptions extends NamingExportsStem {
12
19
  kinds?: DeclarationsKind[];
@@ -31,17 +38,19 @@ export interface NamingExportsPatternOptions extends NamingExportsBase {
31
38
  export interface NamingExportsTemplateOptions extends NamingExportsBase {
32
39
  mode: 'template';
33
40
  file: string;
34
- export: string;
41
+ export: string | string[];
35
42
  match?: 'all' | 'some';
36
43
  placeholder?: string;
37
44
  camelCase?: boolean;
38
45
  }
39
46
  export type NamingExportsOptions = NamingExportsPrefixOptions | NamingExportsPatternOptions | NamingExportsTemplateOptions;
40
47
  export interface NamingFileOptions {
41
- pattern: OptionsPattern;
48
+ pattern?: OptionsPattern;
42
49
  message: string;
43
50
  flags?: string;
44
51
  unique?: string;
52
+ template?: OptionsPattern;
53
+ placeholder?: string;
45
54
  }
46
55
  export interface NamingFolderOptions {
47
56
  singularize?: 'none' | 'trailing-s';
@@ -49,4 +58,67 @@ export interface NamingFolderOptions {
49
58
  prefixes?: string[];
50
59
  after?: string;
51
60
  }
61
+ export interface NamingTypesOptions {
62
+ pattern?: OptionsPattern;
63
+ message?: string;
64
+ }
65
+ export interface NamingDeclarationsCheck {
66
+ kinds: Set<DeclarationsKind> | null;
67
+ allowed: RegExp[];
68
+ expected: RegExp[];
69
+ prefixes: string[];
70
+ label: string;
71
+ normalize: NamingExportsStem['normalize'];
72
+ }
73
+ export interface NamingImportsEntry {
74
+ source: string;
75
+ name: string | string[];
76
+ namespace?: boolean;
77
+ placeholder?: string;
78
+ }
79
+ export interface NamingImportsOptions {
80
+ imports: NamingImportsEntry[];
81
+ }
82
+ export interface NamingImportsCompiled {
83
+ pattern: RegExp;
84
+ names: string[];
85
+ namespace: boolean;
86
+ }
87
+ export interface NamingLabelsEntry {
88
+ callee: OptionsPattern;
89
+ property?: string;
90
+ name?: OptionsPattern;
91
+ pattern?: OptionsPattern;
92
+ drop?: OptionsPattern;
93
+ loose?: boolean;
94
+ within?: OptionsPattern;
95
+ }
96
+ export interface NamingLabelsOptions {
97
+ labels: NamingLabelsEntry[];
98
+ }
99
+ export interface NamingLabelsCompiled {
100
+ callees: RegExp[];
101
+ entry: NamingLabelsEntry;
102
+ drop: RegExp[];
103
+ patterns: string[];
104
+ within: RegExp[];
105
+ }
106
+ export interface NamingKeysOptions {
107
+ callees?: string[];
108
+ exports?: OptionsPattern;
109
+ name?: OptionsPattern;
110
+ keys?: OptionsPattern;
111
+ inline?: boolean;
112
+ delegate?: boolean;
113
+ allow?: OptionsPattern;
114
+ singularize?: 'none' | 'trailing-s';
115
+ }
116
+ export interface NamingPairsEntry {
117
+ methods: [string, string];
118
+ strip?: OptionsPattern;
119
+ allow?: OptionsPattern;
120
+ }
121
+ export interface NamingPairsOptions {
122
+ pairs: NamingPairsEntry[];
123
+ }
52
124
  export {};
@@ -1,3 +1,5 @@
1
+ import type { BoundariesDenyOnly } from './boundaries.types.ts';
2
+ import type { FilesTopLevelEntry, FilesTopLevelOptions } from './files.types.ts';
1
3
  import type { OptionsPattern } from './options.types.ts';
2
4
  import type * as EffectTsgo from '@effect/tsgo/oxlint-presets';
3
5
  import type * as EffectLinteffect from '@opsydyn/oxlint-effect';
@@ -38,6 +40,7 @@ export interface PresetNamingOptions {
38
40
  exports?: boolean | string;
39
41
  folders?: boolean;
40
42
  unique?: string;
43
+ imports?: Record<string, string | string[] | false>;
41
44
  }
42
45
  export interface PresetCommentsOptions {
43
46
  directives?: boolean;
@@ -110,6 +113,15 @@ export interface PresetBackendOptions {
110
113
  export interface PresetDenyOptions {
111
114
  imports?: Record<string, string | false>;
112
115
  calls?: Record<string, string | false>;
116
+ only?: PresetDenyOnly[];
117
+ }
118
+ export interface PresetDenyOnly extends BoundariesDenyOnly {
119
+ each?: string;
120
+ }
121
+ export type PresetSet = string[] | Record<string, string>;
122
+ export type PresetSetValue = string | number | boolean | null | undefined | PresetSetValue[] | PresetSetObject;
123
+ export interface PresetSetObject {
124
+ [key: string]: PresetSetValue;
113
125
  }
114
126
  export interface PresetOrpcOptions {
115
127
  public?: string[];
@@ -121,6 +133,12 @@ export interface PresetEffectOptions {
121
133
  exports?: OptionsPattern;
122
134
  skip?: OptionsPattern;
123
135
  entries?: string[];
136
+ files?: string[];
137
+ strict?: boolean;
138
+ }
139
+ export interface PresetEffectContract {
140
+ name: string;
141
+ source: string;
124
142
  }
125
143
  export interface PresetEffectStyle {
126
144
  rules: PresetRules;
@@ -155,6 +173,7 @@ export interface PresetGroups {
155
173
  effect?: PresetSwitch | PresetEffectOptions;
156
174
  console?: boolean;
157
175
  deny?: PresetSwitch | PresetDenyOptions;
176
+ top?: PresetSwitch | FilesTopLevelOptions | (string | FilesTopLevelEntry)[];
158
177
  externals?: PresetSwitch;
159
178
  }
160
179
  export type PresetGroupName = keyof PresetGroups;
@@ -170,6 +189,7 @@ export interface PresetConfig {
170
189
  root?: string;
171
190
  folders?: PresetFolders;
172
191
  detect?: boolean;
192
+ sets?: Record<string, PresetSet>;
173
193
  }
174
194
  export type PresetRecipe = PresetGroups & Partial<Record<symbol, string>>;
175
195
  export type PresetRules = NonNullable<OxlintConfig['rules']>;
@@ -204,11 +224,17 @@ export interface PresetResolvedGroups {
204
224
  code: boolean;
205
225
  width: number;
206
226
  entries: string[];
227
+ files: string[];
228
+ strict: boolean;
207
229
  };
208
230
  console: PresetEmptyOptions;
209
231
  deny: {
210
232
  imports: Record<string, string | false>;
211
233
  calls: Record<string, string | false>;
234
+ only: BoundariesDenyOnly[];
235
+ };
236
+ top: {
237
+ [K in keyof Required<FilesTopLevelOptions>]: FilesTopLevelOptions[K] | undefined;
212
238
  };
213
239
  externals: PresetEmptyOptions;
214
240
  }
@@ -17,3 +17,16 @@ export interface ReactPropsTarget {
17
17
  fn: AstFunction;
18
18
  typeArgument?: ESTree.TSType;
19
19
  }
20
+ export interface ReactDynamicClassesOptions {
21
+ attributes?: string[];
22
+ message?: string;
23
+ }
24
+ export interface ReactEmptyEffectOptions {
25
+ hooks?: string[];
26
+ message?: string;
27
+ }
28
+ export interface ReactMemoOptions {
29
+ names?: string[];
30
+ sources?: string[];
31
+ message?: string;
32
+ }
@@ -30,3 +30,7 @@ export interface TypesDuplicateOptions {
30
30
  structs?: string[];
31
31
  min?: number;
32
32
  }
33
+ export interface TypesLocalAliasOptions {
34
+ allow?: OptionsPattern;
35
+ message?: string;
36
+ }
@@ -20,6 +20,5 @@ export declare function astSelectorRule(selector: string, message: string): impo
20
20
  export declare function astIsOneLine(node: ESTree.Node): boolean;
21
21
  export declare function astIsInlineFunction(node: ESTree.Node): node is AstFunction;
22
22
  export declare function astIsCall(node: ESTree.Node): node is AstCall;
23
- export declare function astIsPipe(node: AstCall): boolean;
24
23
  export declare function astSome(value: unknown, test: (node: ESTree.Node) => boolean, enter?: (node: ESTree.Node) => boolean): boolean;
25
- export declare function astCallDepth(value: unknown): number;
24
+ export declare function astCallDepth(value: unknown, callbacks?: boolean): number;
@@ -1,5 +1,10 @@
1
- import type { BoundariesOptions } from '../types/boundaries.types.ts';
1
+ import type { BoundariesOptions, BoundariesRuntimeConventions } from '../types/boundaries.types.ts';
2
2
  import type * as PluginsTypes from '@oxlint/plugins';
3
+ export declare function boundariesConventionsFor(options: {
4
+ conventions?: BoundariesRuntimeConventions;
5
+ }): Required<BoundariesRuntimeConventions>;
6
+ export declare function boundariesHasSuffix(suffixes: readonly string[], path: string, optionalExtension?: boolean): boolean;
7
+ export declare function boundariesIsClientOnly(conventions: Required<BoundariesRuntimeConventions>, target: string): boolean;
3
8
  export declare const boundariesServerGlobals: string[];
4
9
  export declare const boundariesBrowserGlobals: string[];
5
10
  export declare const boundariesRuntimeProperties: {
@@ -63,6 +68,65 @@ export declare const boundariesRuntimeProperties: {
63
68
  type: string;
64
69
  };
65
70
  };
71
+ conventions: {
72
+ type: string;
73
+ additionalProperties: boolean;
74
+ properties: {
75
+ server: {
76
+ type: string;
77
+ items: {
78
+ type: string;
79
+ minLength: number;
80
+ };
81
+ };
82
+ rsc: {
83
+ type: string;
84
+ items: {
85
+ type: string;
86
+ minLength: number;
87
+ };
88
+ };
89
+ actions: {
90
+ type: string;
91
+ items: {
92
+ type: string;
93
+ minLength: number;
94
+ };
95
+ };
96
+ client: {
97
+ type: string;
98
+ items: {
99
+ type: string;
100
+ minLength: number;
101
+ };
102
+ };
103
+ clientOnly: {
104
+ type: string;
105
+ items: {
106
+ type: string;
107
+ minLength: number;
108
+ };
109
+ };
110
+ hooks: {
111
+ type: string;
112
+ items: {
113
+ type: string;
114
+ minLength: number;
115
+ };
116
+ };
117
+ shared: {
118
+ type: string;
119
+ items: {
120
+ type: string;
121
+ minLength: number;
122
+ };
123
+ };
124
+ lib: {
125
+ type: string;
126
+ minLength: number;
127
+ };
128
+ };
129
+ };
66
130
  };
67
131
  export declare const boundariesServerPackages: string[];
68
132
  export declare const boundariesRuntimeMessages: {
@@ -75,11 +139,15 @@ export declare function boundariesExportVisitors(check: (node: PluginsTypes.ESTr
75
139
  };
76
140
  export declare function boundariesLiteralSource(node: PluginsTypes.ESTree.ImportExpression): string | undefined;
77
141
  export declare function boundariesReport(context: PluginsTypes.Context, node: PluginsTypes.ESTree.Node, source: string, reason: string): void;
78
- export declare function boundariesImportExpression(context: PluginsTypes.Context, node: PluginsTypes.ESTree.ImportExpression, allowComputed: boolean, check: (source: string) => void): void;
79
- export declare function boundariesIsSharedFile(options: Pick<BoundariesOptions, 'web'>, file: string): boolean;
142
+ export declare function boundariesRuntimeImportVisitors(context: PluginsTypes.Context, check: (node: PluginsTypes.ESTree.Node, source: string, typeOnly: boolean, reExport: boolean) => void, allowComputed: () => boolean): {
143
+ ExportNamedDeclaration(node: PluginsTypes.ESTree.ExportNamedDeclaration): void;
144
+ ExportAllDeclaration(node: PluginsTypes.ESTree.ExportAllDeclaration): void;
145
+ ImportExpression(node: PluginsTypes.ESTree.ImportExpression): void;
146
+ };
147
+ export declare function boundariesIsSharedFile(options: Pick<BoundariesOptions, 'web'>, conventions: Required<BoundariesRuntimeConventions>, file: string): boolean;
80
148
  export declare function boundariesDeclaredVariable(start: PluginsTypes.Scope | null, name: string): PluginsTypes.Variable | null;
81
149
  export declare function boundariesMatchesImport(prefixes: string[] | undefined, source: string): boolean;
82
150
  export declare function boundariesIsBackendImport(options: Pick<BoundariesOptions, 'backend' | 'backendPackages'>, target: string, source: string): boolean;
83
151
  export declare function boundariesIsServerPlatformImport(source: string, packages: readonly string[]): boolean;
84
152
  export declare function boundariesMemberName(node: PluginsTypes.ESTree.Node | null | undefined): string | null;
85
- export declare function boundariesResolveTarget(options: Pick<BoundariesOptions, 'web' | 'backend' | 'aliases'>, file: string, source: string): string;
153
+ export declare function boundariesResolveTarget(options: Pick<BoundariesOptions, 'web' | 'backend' | 'aliases'>, file: string, source: string, services?: string): string;
@@ -1,4 +1,4 @@
1
- import type { NamingExportsStem, NamingStemMode } from '../types/naming.types.ts';
1
+ import type { NamingCaptureOptions, NamingExportsStem, NamingStemMode } from '../types/naming.types.ts';
2
2
  import type { OptionsSchemaProperties } from '../types/options.types.ts';
3
3
  export declare const namingStemModes: readonly NamingStemMode[];
4
4
  export declare const namingStemSchemaProperties: OptionsSchemaProperties;
@@ -8,4 +8,7 @@ export declare function namingCamelCase(value: string): string;
8
8
  export declare function namingNormalized(value: string, normalize: 'remove-separators' | 'none'): string;
9
9
  export declare function namingFileStem(basename: string, mode?: NamingStemMode, trailingRoles?: readonly string[], roleSeparators?: readonly string[]): string;
10
10
  export declare function namingFilePrefixesFor(filename: string, options: NamingExportsStem): string[];
11
+ export declare function namingTemplatePattern(template: string, placeholder?: string): RegExp | null;
12
+ export declare function namingCaptures(filename: string, options?: NamingCaptureOptions): Record<string, string> | null;
13
+ export declare function namingExpand(template: string, captures: Record<string, string>, camelCase: boolean, escape?: (value: string) => string): string;
11
14
  export declare function namingHasFilePrefix(name: string, prefixes: readonly string[], normalize: NamingExportsStem['normalize']): boolean;
@@ -9,3 +9,5 @@ export declare function optionsPatternsTest(patterns: RegExp[], value: string):
9
9
  export declare function optionsGlob(pattern: string): RegExp;
10
10
  export declare function optionsPatternLabel(pattern: OptionsPattern | undefined): string;
11
11
  export declare function optionsAssertMockingApis(patterns: string[]): void;
12
+ export declare function optionsEscape(value: string): string;
13
+ export declare function optionsWildcards(names: OptionsPattern | undefined): RegExp[];