oxlint-plugin-arch 0.12.6 → 0.13.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.
- package/CHANGELOG.md +121 -0
- package/README.md +4 -4
- package/dist/index.js +1059 -306
- package/dist/preset/preset-effect.d.ts +3 -0
- package/dist/preset/preset-recipes.d.ts +10 -0
- package/dist/preset/preset.constants.d.ts +21 -2
- package/dist/preset/preset.d.ts +11 -1
- package/dist/preset/preset.js +715 -223
- package/dist/preset/preset.utils.d.ts +6 -0
- package/dist/rules/code/code-delegate.d.ts +1 -0
- package/dist/rules/layout/layout-type-arguments.d.ts +1 -0
- package/dist/rules/react/react-query-props.d.ts +1 -0
- package/dist/types/backend.types.d.ts +2 -3
- package/dist/types/boundaries.types.d.ts +26 -1
- package/dist/types/code.types.d.ts +7 -0
- package/dist/types/comments.types.d.ts +1 -0
- package/dist/types/dillon-anti-slop.types.d.ts +6 -0
- package/dist/types/effect.types.d.ts +1 -0
- package/dist/types/files.types.d.ts +3 -2
- package/dist/types/layout.types.d.ts +16 -0
- package/dist/types/naming.types.d.ts +4 -0
- package/dist/types/preset.types.d.ts +26 -24
- package/dist/types/react.types.d.ts +17 -0
- package/dist/types/types.types.d.ts +8 -0
- package/dist/utils/ast.utils.d.ts +1 -2
- package/dist/utils/boundaries.utils.d.ts +72 -4
- package/dist/utils/options.utils.d.ts +1 -0
- package/dist/vendor/dillon-anti-slop/index.js +38 -16
- package/package.json +15 -1
- package/src/vendor/dillon-anti-slop/UPSTREAM.md +3 -0
|
@@ -2,6 +2,7 @@ import type * as PresetTypes from '../types/preset.types.ts';
|
|
|
2
2
|
import type { OxlintOverride } from 'oxlint';
|
|
3
3
|
export declare class PresetError extends Error {
|
|
4
4
|
}
|
|
5
|
+
export declare function presetEffectStyle(): PresetTypes.PresetEffectStyle;
|
|
5
6
|
export declare function presetEffectPackages(): PresetTypes.PresetEffectPackages;
|
|
6
7
|
export declare function presetScopes(roots: string[], suffix?: string): string[];
|
|
7
8
|
export declare function presetServiceScopes(folders: Record<string, string>, sources: string[], suffix?: string): string[];
|
|
@@ -9,9 +10,14 @@ export declare function presetOverride(files: string[], rules: PresetTypes.Prese
|
|
|
9
10
|
export declare function presetSeverity(rules: PresetTypes.PresetRules, level: PresetTypes.PresetLevel): PresetTypes.PresetRules;
|
|
10
11
|
export declare function presetPackageName(root: string, directory: string): string | undefined;
|
|
11
12
|
export declare function presetIntersect(glob: string, scope: string): string[];
|
|
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[];
|
|
12
15
|
export declare function presetAliases(root: string, aliases: Record<string, string> | undefined): Record<string, string>;
|
|
13
16
|
export declare function presetRuntime(project: PresetTypes.PresetProject, settings: Required<PresetTypes.PresetFrameworkOptions>, framework: PresetTypes.PresetFramework, rule: string): OxlintOverride[];
|
|
14
17
|
export declare function presetManifest(root: string, directory: string): PresetTypes.PresetManifest;
|
|
15
18
|
export declare function presetIsDirectory(path: string): boolean;
|
|
16
19
|
export declare function presetServicesFolder(root: string, source: string, configured?: string, fallback?: boolean): string;
|
|
17
20
|
export declare function presetIsFile(path: string): boolean;
|
|
21
|
+
export declare function presetSource(root: string, directory: string, configured?: string): string;
|
|
22
|
+
export declare function presetFilled(conventions: PresetTypes.PresetFolders, exists: (path: string) => boolean): PresetTypes.PresetFolders;
|
|
23
|
+
export declare function presetMerge(base: boolean | PresetTypes.PresetFolder | undefined, top: boolean | PresetTypes.PresetFolder): boolean | PresetTypes.PresetFolder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codeDelegate: import("@oxlint/plugins").Rule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const layoutTypeArguments: import("@oxlint/plugins").Rule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const reactQueryProps: import("@oxlint/plugins").Rule;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export interface BackendOrpcOutputOptions {
|
|
2
|
-
composers: string[];
|
|
3
2
|
handler?: string;
|
|
4
3
|
output?: string;
|
|
5
4
|
}
|
|
@@ -11,8 +10,8 @@ export interface BackendServiceFunctionsOptions {
|
|
|
11
10
|
message?: string;
|
|
12
11
|
}
|
|
13
12
|
export interface BackendSqlLikeOptions {
|
|
14
|
-
methods
|
|
15
|
-
sanitizers
|
|
13
|
+
methods?: string[];
|
|
14
|
+
sanitizers?: string[];
|
|
16
15
|
bindings?: boolean;
|
|
17
16
|
operators?: string[];
|
|
18
17
|
}
|
|
@@ -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[];
|
|
@@ -12,6 +12,11 @@ export interface CodeConstructorOptions {
|
|
|
12
12
|
calls?: boolean;
|
|
13
13
|
message?: string;
|
|
14
14
|
}
|
|
15
|
+
export interface CodeDelegateOptions {
|
|
16
|
+
methods?: string[];
|
|
17
|
+
reads?: string[];
|
|
18
|
+
max?: number;
|
|
19
|
+
}
|
|
15
20
|
export interface CodeLiteralInOptions {
|
|
16
21
|
allow: string[];
|
|
17
22
|
}
|
|
@@ -52,6 +57,7 @@ export interface CodeTrivialFunctionsOptions {
|
|
|
52
57
|
services?: boolean;
|
|
53
58
|
deny?: string[];
|
|
54
59
|
guards?: boolean;
|
|
60
|
+
defaults?: boolean;
|
|
55
61
|
}
|
|
56
62
|
export interface CodeTrivialFunctionsGuardState {
|
|
57
63
|
values: Set<string>;
|
|
@@ -63,6 +69,7 @@ export interface CodeTrivialFunctionsGuardState {
|
|
|
63
69
|
export interface CodeInlineOptions {
|
|
64
70
|
max?: number;
|
|
65
71
|
nesting?: number;
|
|
72
|
+
callbacks?: boolean;
|
|
66
73
|
allow?: OptionsPattern;
|
|
67
74
|
keep?: OptionsPattern;
|
|
68
75
|
services?: string[];
|
|
@@ -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
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamingExportsStem } from './naming.types.ts';
|
|
1
|
+
import type { NamingExportsStem, NamingStemMode } 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,7 +24,8 @@ export interface FilesDomainConstantsOptions {
|
|
|
24
24
|
roles?: string[];
|
|
25
25
|
file?: string;
|
|
26
26
|
}
|
|
27
|
-
export interface FilesExportsOptions extends Pick<NamingExportsStem, '
|
|
27
|
+
export interface FilesExportsOptions extends Pick<NamingExportsStem, 'roles' | 'separators' | 'singularize'> {
|
|
28
|
+
stem?: NamingStemMode | 'folder';
|
|
28
29
|
names?: string[];
|
|
29
30
|
patterns?: string[];
|
|
30
31
|
types?: boolean;
|
|
@@ -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;
|
|
@@ -10,7 +10,7 @@ export interface PresetLayoutOptions {
|
|
|
10
10
|
services?: PresetLayoutMode | false;
|
|
11
11
|
hooks?: PresetLayoutMode | false;
|
|
12
12
|
components?: PresetLayoutMode | false;
|
|
13
|
-
|
|
13
|
+
files?: string[];
|
|
14
14
|
strict?: boolean;
|
|
15
15
|
operations?: PresetOperations;
|
|
16
16
|
service?: string[];
|
|
@@ -106,36 +106,30 @@ export interface PresetRegistryOptions {
|
|
|
106
106
|
export interface PresetBackendOptions {
|
|
107
107
|
exports?: string[];
|
|
108
108
|
registry?: false | string | PresetRegistryOptions;
|
|
109
|
-
writes?: string[];
|
|
110
109
|
}
|
|
111
110
|
export interface PresetDenyOptions {
|
|
112
111
|
imports?: Record<string, string | false>;
|
|
113
112
|
calls?: Record<string, string | false>;
|
|
114
113
|
}
|
|
115
|
-
export interface PresetExternalsOptions {
|
|
116
|
-
packages?: string[];
|
|
117
|
-
}
|
|
118
114
|
export interface PresetOrpcOptions {
|
|
119
115
|
public?: string[];
|
|
120
|
-
composers?: string[];
|
|
121
116
|
client?: string;
|
|
122
117
|
}
|
|
123
|
-
export interface PresetFormsOptions {
|
|
124
|
-
resolver?: string;
|
|
125
|
-
}
|
|
126
118
|
export interface PresetEffectOptions {
|
|
119
|
+
code?: boolean;
|
|
127
120
|
width?: number;
|
|
128
121
|
exports?: OptionsPattern;
|
|
129
122
|
skip?: OptionsPattern;
|
|
130
123
|
entries?: string[];
|
|
131
124
|
}
|
|
125
|
+
export interface PresetEffectStyle {
|
|
126
|
+
rules: PresetRules;
|
|
127
|
+
jsPlugins: PresetJsPlugins;
|
|
128
|
+
}
|
|
132
129
|
export interface PresetEffectPackages {
|
|
133
130
|
tsgo: typeof EffectTsgo;
|
|
134
131
|
linteffect: typeof EffectLinteffect;
|
|
135
132
|
}
|
|
136
|
-
export interface PresetSqlOptions {
|
|
137
|
-
sanitizers?: string[];
|
|
138
|
-
}
|
|
139
133
|
export interface PresetGroups {
|
|
140
134
|
layout?: PresetSwitch | PresetLayoutOptions;
|
|
141
135
|
limits?: PresetSwitch | PresetLimitsOptions;
|
|
@@ -156,12 +150,12 @@ export interface PresetGroups {
|
|
|
156
150
|
backend?: PresetSwitch | PresetBackendOptions;
|
|
157
151
|
orpc?: PresetSwitch | PresetOrpcOptions;
|
|
158
152
|
schemas?: PresetSwitch;
|
|
159
|
-
forms?: PresetSwitch
|
|
160
|
-
sql?: PresetSwitch
|
|
153
|
+
forms?: PresetSwitch;
|
|
154
|
+
sql?: PresetSwitch;
|
|
161
155
|
effect?: PresetSwitch | PresetEffectOptions;
|
|
162
156
|
console?: boolean;
|
|
163
157
|
deny?: PresetSwitch | PresetDenyOptions;
|
|
164
|
-
externals?: PresetSwitch
|
|
158
|
+
externals?: PresetSwitch;
|
|
165
159
|
}
|
|
166
160
|
export type PresetGroupName = keyof PresetGroups;
|
|
167
161
|
export interface PresetFolder extends PresetGroups {
|
|
@@ -171,18 +165,19 @@ export interface PresetFolder extends PresetGroups {
|
|
|
171
165
|
rules?: PresetRules;
|
|
172
166
|
}
|
|
173
167
|
export type PresetFolders = Record<string, boolean | PresetFolder>;
|
|
168
|
+
export type PresetEntry = [string, boolean | PresetFolder];
|
|
174
169
|
export interface PresetConfig {
|
|
175
170
|
root?: string;
|
|
176
171
|
folders?: PresetFolders;
|
|
177
172
|
detect?: boolean;
|
|
178
173
|
}
|
|
179
|
-
export type PresetRecipe = PresetGroups
|
|
174
|
+
export type PresetRecipe = PresetGroups & Partial<Record<symbol, string>>;
|
|
180
175
|
export type PresetRules = NonNullable<OxlintConfig['rules']>;
|
|
181
176
|
export type PresetJsPlugins = NonNullable<OxlintConfig['jsPlugins']>;
|
|
182
177
|
export type PresetPlugins = NonNullable<OxlintConfig['plugins']>;
|
|
183
178
|
export type PresetSettings = NonNullable<OxlintConfig['settings']>;
|
|
184
179
|
export interface PresetResolvedGroups {
|
|
185
|
-
layout: PresetLayoutOptions & Required<Pick<PresetLayoutOptions, '
|
|
180
|
+
layout: PresetLayoutOptions & Required<Pick<PresetLayoutOptions, 'files' | 'strict' | 'operations' | 'service'>>;
|
|
186
181
|
limits: Required<PresetLimitsOptions>;
|
|
187
182
|
style: Required<PresetStyleOptions>;
|
|
188
183
|
basics: Required<PresetBasicsOptions>;
|
|
@@ -200,21 +195,22 @@ export interface PresetResolvedGroups {
|
|
|
200
195
|
};
|
|
201
196
|
shadcn: Required<PresetShadcnOptions>;
|
|
202
197
|
kit: PresetEmptyOptions;
|
|
203
|
-
backend: PresetBackendOptions
|
|
198
|
+
backend: PresetBackendOptions;
|
|
204
199
|
orpc: PresetOrpcOptions;
|
|
205
200
|
schemas: PresetEmptyOptions;
|
|
206
|
-
forms:
|
|
207
|
-
sql:
|
|
201
|
+
forms: PresetEmptyOptions;
|
|
202
|
+
sql: PresetEmptyOptions;
|
|
208
203
|
effect: Pick<PresetEffectOptions, 'exports' | 'skip'> & {
|
|
204
|
+
code: boolean;
|
|
209
205
|
width: number;
|
|
210
206
|
entries: string[];
|
|
211
207
|
};
|
|
212
208
|
console: PresetEmptyOptions;
|
|
213
209
|
deny: {
|
|
214
|
-
imports: Record<string, string>;
|
|
215
|
-
calls: Record<string, string>;
|
|
210
|
+
imports: Record<string, string | false>;
|
|
211
|
+
calls: Record<string, string | false>;
|
|
216
212
|
};
|
|
217
|
-
externals:
|
|
213
|
+
externals: PresetEmptyOptions;
|
|
218
214
|
}
|
|
219
215
|
export interface PresetEmptyOptions {
|
|
220
216
|
empty?: never;
|
|
@@ -238,6 +234,11 @@ export interface PresetScope {
|
|
|
238
234
|
folder: PresetFolder;
|
|
239
235
|
effective: PresetEffective;
|
|
240
236
|
}
|
|
237
|
+
export interface PresetFileKey {
|
|
238
|
+
pattern: string;
|
|
239
|
+
folder: PresetFolder;
|
|
240
|
+
scopes: PresetScope[];
|
|
241
|
+
}
|
|
241
242
|
export interface PresetUnit {
|
|
242
243
|
key: string;
|
|
243
244
|
scope: PresetScope;
|
|
@@ -284,8 +285,9 @@ export interface PresetProject {
|
|
|
284
285
|
root: string;
|
|
285
286
|
serviceFolders: Record<string, string>;
|
|
286
287
|
scopes: PresetScope[];
|
|
288
|
+
fileKeys: PresetFileKey[];
|
|
287
289
|
units: PresetUnit[];
|
|
288
|
-
|
|
290
|
+
fileKinds: string[];
|
|
289
291
|
colocated: string[];
|
|
290
292
|
orpc: Required<PresetOrpcOptions>;
|
|
291
293
|
layouts: PresetLayoutScope[];
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { AstFunction } from './ast.types.ts';
|
|
2
2
|
import type { DeclarationsCandidate } from './declarations.types.ts';
|
|
3
3
|
import type { ESTree } from '@oxlint/plugins';
|
|
4
|
+
export interface ReactQueryPropsOptions {
|
|
5
|
+
hooks?: string[];
|
|
6
|
+
functions?: string[];
|
|
7
|
+
}
|
|
4
8
|
export interface ReactPropsOptions {
|
|
5
9
|
prefix?: boolean;
|
|
6
10
|
suffix?: string;
|
|
@@ -13,3 +17,16 @@ export interface ReactPropsTarget {
|
|
|
13
17
|
fn: AstFunction;
|
|
14
18
|
typeArgument?: ESTree.TSType;
|
|
15
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
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { OptionsPattern } from './options.types.ts';
|
|
|
2
2
|
import type { ESTree } from '@oxlint/plugins';
|
|
3
3
|
export interface TypesDeclarationsOptions {
|
|
4
4
|
allow?: OptionsPattern;
|
|
5
|
+
modules?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export type TypesDeclarationNode = ESTree.TSTypeAliasDeclaration | ESTree.TSInterfaceDeclaration;
|
|
7
8
|
export interface TypesImportedBinding {
|
|
@@ -12,6 +13,9 @@ export interface TypesInlineOptions {
|
|
|
12
13
|
parameters?: boolean;
|
|
13
14
|
returns?: boolean;
|
|
14
15
|
functions?: boolean;
|
|
16
|
+
variables?: boolean;
|
|
17
|
+
assertions?: boolean;
|
|
18
|
+
arguments?: boolean;
|
|
15
19
|
min?: number;
|
|
16
20
|
}
|
|
17
21
|
export interface TypesServiceOptions {
|
|
@@ -26,3 +30,7 @@ export interface TypesDuplicateOptions {
|
|
|
26
30
|
structs?: string[];
|
|
27
31
|
min?: number;
|
|
28
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
|
|
79
|
-
|
|
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;
|
|
@@ -9,3 +9,4 @@ 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;
|