@alint-js/plugin 0.4.0 → 0.6.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.
- package/dist/index.d.mts +16 -4
- package/package.json +16 -2
package/dist/index.d.mts
CHANGED
|
@@ -803,7 +803,7 @@ interface Config<TIssue extends BaseIssue<unknown>> {
|
|
|
803
803
|
readonly abortPipeEarly?: boolean | undefined;
|
|
804
804
|
}
|
|
805
805
|
//#endregion
|
|
806
|
-
//#region ../core/dist/types-
|
|
806
|
+
//#region ../core/dist/types-Cm5Z7Fll.d.mts
|
|
807
807
|
//#region src/config/types.d.ts
|
|
808
808
|
type ModelSize = 'large' | 'medium' | 'small';
|
|
809
809
|
interface RunnerCacheConfig {
|
|
@@ -886,6 +886,7 @@ interface AlintConfigItem {
|
|
|
886
886
|
files?: readonly (readonly string[] | string)[];
|
|
887
887
|
ignore?: IgnoreConfig;
|
|
888
888
|
ignores?: readonly string[];
|
|
889
|
+
integrations?: IntegrationsConfig;
|
|
889
890
|
language?: string;
|
|
890
891
|
languageOptions?: Record<string, unknown>;
|
|
891
892
|
linterOptions?: AlintLinterOptions;
|
|
@@ -937,6 +938,9 @@ interface EnabledRule {
|
|
|
937
938
|
interface IgnoreConfig {
|
|
938
939
|
gitignore?: boolean;
|
|
939
940
|
}
|
|
941
|
+
interface IntegrationsConfig {
|
|
942
|
+
stopGate?: StopGateConfig;
|
|
943
|
+
}
|
|
940
944
|
interface LanguageDefinition {
|
|
941
945
|
extensions?: readonly string[];
|
|
942
946
|
extract: (file: SourceFile, context: LanguageContext) => Awaitable<SourceTarget[]>;
|
|
@@ -1040,8 +1044,10 @@ interface RuleInferenceUsageRecord {
|
|
|
1040
1044
|
totalTokens?: number;
|
|
1041
1045
|
}
|
|
1042
1046
|
/**
|
|
1043
|
-
* - `'any'` — every
|
|
1044
|
-
*
|
|
1047
|
+
* - `'any'` — every language except `plaintext`, and never a failure. Plain text is what a file
|
|
1048
|
+
* falls back to when no language claims it, so a rule asking for any language is asking for a
|
|
1049
|
+
* real one. Rules that work from `FunctionInfo` alone want this: install another language pack
|
|
1050
|
+
* and they cover it too, unchanged.
|
|
1045
1051
|
* - A list of language ids — `LanguageDefinition.name` values such as `go` or `typescript`, never
|
|
1046
1052
|
* file extensions. The rule handles exactly these. Files of other languages are skipped
|
|
1047
1053
|
* rather than failed, so one plugin can carry rules for several languages behind one `files:`
|
|
@@ -1080,9 +1086,15 @@ interface RuleWithHandler {
|
|
|
1080
1086
|
onTargetProject?: never;
|
|
1081
1087
|
onTargetWith: (target: Target) => Awaitable<void>;
|
|
1082
1088
|
}
|
|
1089
|
+
interface StopGateConfig {
|
|
1090
|
+
enabled?: boolean;
|
|
1091
|
+
target?: StopGateTarget;
|
|
1092
|
+
timeoutMs?: number;
|
|
1093
|
+
}
|
|
1094
|
+
type StopGateTarget = 'all' | 'dirty-files';
|
|
1083
1095
|
type Target = DirectoryTarget | PlannedSourceTarget | ProjectTarget;
|
|
1084
1096
|
//#endregion
|
|
1085
|
-
//#region ../core/dist/define-
|
|
1097
|
+
//#region ../core/dist/define-DO36VJ4W.d.mts
|
|
1086
1098
|
//#region src/dsl/define.d.ts
|
|
1087
1099
|
type AnyRuleDefinition = RuleDefinition<any>;
|
|
1088
1100
|
type ConfigItemWithPluginRules<Plugins, Rules> = Omit<AlintConfigItem, 'plugins' | 'rules'> & {
|
package/package.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alint-js/plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
|
+
"description": "Side-effect-free plugin authoring facade for alint",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/moeru-ai/alint.git",
|
|
10
|
+
"directory": "packages/plugin"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"alint",
|
|
14
|
+
"lint",
|
|
15
|
+
"plugin",
|
|
16
|
+
"sdk",
|
|
17
|
+
"ai"
|
|
18
|
+
],
|
|
5
19
|
"exports": {
|
|
6
20
|
".": {
|
|
7
21
|
"types": "./dist/index.d.mts",
|
|
@@ -14,7 +28,7 @@
|
|
|
14
28
|
],
|
|
15
29
|
"devDependencies": {
|
|
16
30
|
"valibot": "^1.4.2",
|
|
17
|
-
"@alint-js/core": "0.
|
|
31
|
+
"@alint-js/core": "0.6.0"
|
|
18
32
|
},
|
|
19
33
|
"scripts": {
|
|
20
34
|
"build": "tsdown",
|