@soybeanjs/oxc-config 0.2.3 → 0.2.4
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.ts +0 -1
- package/dist/index.js +4 -0
- package/dist/plugins/import.d.ts +126 -97
- package/dist/plugins/import.js +1 -1
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -227,6 +227,10 @@ const lint = {
|
|
|
227
227
|
"import/newline-after-import": "warn",
|
|
228
228
|
"import/no-unassigned-import": "off",
|
|
229
229
|
"no-underscore-dangle": "off",
|
|
230
|
+
"no-unused-vars": ["warn", {
|
|
231
|
+
argsIgnorePattern: "^_",
|
|
232
|
+
destructuredArrayIgnorePattern: "^_"
|
|
233
|
+
}],
|
|
230
234
|
"object-shorthand": "warn",
|
|
231
235
|
"prefer-template": "warn",
|
|
232
236
|
"typescript/consistent-type-imports": ["error", {
|
package/dist/plugins/import.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@oxlint+plugins@1.
|
|
1
|
+
//#region node_modules/.pnpm/@oxlint+plugins@1.81.0/node_modules/@oxlint/plugins/index.d.ts
|
|
2
2
|
//#endregion
|
|
3
3
|
//#region src-js/plugins/tokens.d.ts
|
|
4
4
|
/**
|
|
@@ -49,7 +49,8 @@ interface StringToken extends BaseToken {
|
|
|
49
49
|
}
|
|
50
50
|
interface TemplateToken extends BaseToken {
|
|
51
51
|
type: "Template";
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
53
54
|
//#region src-js/generated/visitor.d.ts
|
|
54
55
|
// To understand why we need the "Bivariance hack", see: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20219
|
|
55
56
|
// For downsides, see: https://github.com/oxc-project/oxc/issues/18154#issuecomment-4012955607
|
|
@@ -388,7 +389,8 @@ interface StrictVisitorObject {
|
|
|
388
389
|
TSUnionType?: (node: TSUnionType) => void;
|
|
389
390
|
"TSUnionType:exit"?: (node: TSUnionType) => void;
|
|
390
391
|
}
|
|
391
|
-
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined } & Record<string, BivarianceHackHandler<(node: Node$1) => void> | undefined>;
|
|
392
|
+
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined; } & Record<string, BivarianceHackHandler<(node: Node$1) => void> | undefined>;
|
|
393
|
+
//#endregion
|
|
392
394
|
//#region src-js/plugins/types.d.ts
|
|
393
395
|
type BeforeHook = () => boolean | void;
|
|
394
396
|
type AfterHook = () => void;
|
|
@@ -397,7 +399,8 @@ type VisitorWithHooks = VisitorObject & {
|
|
|
397
399
|
after?: AfterHook;
|
|
398
400
|
};
|
|
399
401
|
interface Node extends Span {}
|
|
400
|
-
type NodeOrToken = Node | TokenType | CommentType;
|
|
402
|
+
type NodeOrToken = Node | TokenType | CommentType;
|
|
403
|
+
//#endregion
|
|
401
404
|
//#region src-js/plugins/location.d.ts
|
|
402
405
|
/**
|
|
403
406
|
* Range of source offsets.
|
|
@@ -464,7 +467,8 @@ declare function getLoc(nodeOrToken: NodeOrToken): Location;
|
|
|
464
467
|
* @param offset - Range index of the desired node
|
|
465
468
|
* @returns The node if found, or `null` if not found
|
|
466
469
|
*/
|
|
467
|
-
declare function getNodeByRangeIndex(offset: number): Node$1 | null;
|
|
470
|
+
declare function getNodeByRangeIndex(offset: number): Node$1 | null;
|
|
471
|
+
//#endregion
|
|
468
472
|
//#region src-js/plugins/comments.d.ts
|
|
469
473
|
/**
|
|
470
474
|
* Comment.
|
|
@@ -481,7 +485,7 @@ interface Program extends Span {
|
|
|
481
485
|
tokens: TokenType[];
|
|
482
486
|
parent: null;
|
|
483
487
|
}
|
|
484
|
-
type Expression = BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference |
|
|
488
|
+
type Expression = BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function$1 | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | MetaProperty | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | V8IntrinsicExpression | MemberExpression;
|
|
485
489
|
interface IdentifierName extends Span {
|
|
486
490
|
type: "Identifier";
|
|
487
491
|
decorators?: [];
|
|
@@ -503,7 +507,7 @@ interface BindingIdentifier extends Span {
|
|
|
503
507
|
decorators?: [];
|
|
504
508
|
name: string;
|
|
505
509
|
optional?: false;
|
|
506
|
-
typeAnnotation?: null;
|
|
510
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
507
511
|
parent: Node$1;
|
|
508
512
|
}
|
|
509
513
|
interface LabelIdentifier extends Span {
|
|
@@ -916,7 +920,7 @@ interface ObjectPattern extends Span {
|
|
|
916
920
|
decorators?: [];
|
|
917
921
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
918
922
|
optional?: false;
|
|
919
|
-
typeAnnotation?: null;
|
|
923
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
920
924
|
parent: Node$1;
|
|
921
925
|
}
|
|
922
926
|
interface BindingProperty extends Span {
|
|
@@ -935,7 +939,7 @@ interface ArrayPattern extends Span {
|
|
|
935
939
|
decorators?: [];
|
|
936
940
|
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
937
941
|
optional?: false;
|
|
938
|
-
typeAnnotation?: null;
|
|
942
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
939
943
|
parent: Node$1;
|
|
940
944
|
}
|
|
941
945
|
interface BindingRestElement extends Span {
|
|
@@ -943,7 +947,7 @@ interface BindingRestElement extends Span {
|
|
|
943
947
|
decorators?: [];
|
|
944
948
|
argument: BindingPattern;
|
|
945
949
|
optional?: false;
|
|
946
|
-
typeAnnotation?: null;
|
|
950
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
947
951
|
value?: null;
|
|
948
952
|
parent: Node$1;
|
|
949
953
|
}
|
|
@@ -965,7 +969,7 @@ type FunctionType = "FunctionDeclaration" | "FunctionExpression" | "TSDeclareFun
|
|
|
965
969
|
interface FormalParameterRest extends Span {
|
|
966
970
|
type: "RestElement";
|
|
967
971
|
argument: BindingPattern;
|
|
968
|
-
decorators?:
|
|
972
|
+
decorators?: Array<Decorator>;
|
|
969
973
|
optional?: boolean;
|
|
970
974
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
971
975
|
value?: null;
|
|
@@ -1595,6 +1599,7 @@ interface TSTypePredicate extends Span {
|
|
|
1595
1599
|
parent: Node$1;
|
|
1596
1600
|
}
|
|
1597
1601
|
type TSTypePredicateName = IdentifierName | TSThisType;
|
|
1602
|
+
type TSModuleDeclarationKind = "module" | "namespace";
|
|
1598
1603
|
interface TSModuleDeclaration extends Span {
|
|
1599
1604
|
type: "TSModuleDeclaration";
|
|
1600
1605
|
id: BindingIdentifier | StringLiteral | TSQualifiedName;
|
|
@@ -1604,7 +1609,6 @@ interface TSModuleDeclaration extends Span {
|
|
|
1604
1609
|
global: false;
|
|
1605
1610
|
parent: Node$1;
|
|
1606
1611
|
}
|
|
1607
|
-
type TSModuleDeclarationKind = "module" | "namespace";
|
|
1608
1612
|
interface TSGlobalDeclaration extends Span {
|
|
1609
1613
|
type: "TSModuleDeclaration";
|
|
1610
1614
|
id: IdentifierName;
|
|
@@ -1763,7 +1767,8 @@ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+
|
|
|
1763
1767
|
type LogicalOperator = "||" | "&&" | "??";
|
|
1764
1768
|
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
1765
1769
|
type UpdateOperator = "++" | "--";
|
|
1766
|
-
type Node$1 = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive$1 | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
|
|
1770
|
+
type Node$1 = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive$1 | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
|
|
1771
|
+
//#endregion
|
|
1767
1772
|
//#region src-js/plugins/scope.d.ts
|
|
1768
1773
|
interface Scope {
|
|
1769
1774
|
type: ScopeType;
|
|
@@ -1810,9 +1815,6 @@ interface Definition {
|
|
|
1810
1815
|
}
|
|
1811
1816
|
type DefinitionType = "CatchClause" | "ClassName" | "FunctionName" | "ImplicitGlobalVariable" | "ImportBinding" | "Parameter" | "Variable";
|
|
1812
1817
|
type Identifier = IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName;
|
|
1813
|
-
/**
|
|
1814
|
-
* Discard TS-ESLint `ScopeManager`, to free memory.
|
|
1815
|
-
*/
|
|
1816
1818
|
/**
|
|
1817
1819
|
* Determine whether the given identifier node is a reference to a global variable.
|
|
1818
1820
|
* @param node - `Identifier` node to check.
|
|
@@ -1844,7 +1846,8 @@ declare function getScope(node: Node$1): Scope;
|
|
|
1844
1846
|
* @param refNode - Reference node. Defaults to `Program` node if not provided.
|
|
1845
1847
|
* @returns `true` if a variable with the given name was found and marked as used, otherwise `false`
|
|
1846
1848
|
*/
|
|
1847
|
-
declare function markVariableAsUsed(name: string, refNode?: Node$1): boolean;
|
|
1849
|
+
declare function markVariableAsUsed(name: string, refNode?: Node$1): boolean;
|
|
1850
|
+
//#endregion
|
|
1848
1851
|
//#region src-js/plugins/comments_methods.d.ts
|
|
1849
1852
|
/**
|
|
1850
1853
|
* Retrieve an array containing all comments in the source code.
|
|
@@ -1909,9 +1912,11 @@ declare function commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: N
|
|
|
1909
1912
|
* @param node - The AST node to get the comment for.
|
|
1910
1913
|
* @returns The JSDoc comment for the given node, or `null` if not found.
|
|
1911
1914
|
*/
|
|
1912
|
-
declare function getJSDocComment(node: Node): CommentType | null;
|
|
1915
|
+
declare function getJSDocComment(node: Node): CommentType | null;
|
|
1916
|
+
//#endregion
|
|
1913
1917
|
//#region src-js/plugins/tokens_and_comments.d.ts
|
|
1914
|
-
type TokenOrComment = TokenType | CommentType;
|
|
1918
|
+
type TokenOrComment = TokenType | CommentType;
|
|
1919
|
+
//#endregion
|
|
1915
1920
|
//#region src-js/plugins/tokens_methods.d.ts
|
|
1916
1921
|
/**
|
|
1917
1922
|
* Options for various `SourceCode` methods e.g. `getFirstToken`.
|
|
@@ -2161,7 +2166,8 @@ declare function isSpaceBetween(first: NodeOrToken, second: NodeOrToken): boolea
|
|
|
2161
2166
|
* @returns `true` if there is a whitespace character between
|
|
2162
2167
|
* any of the tokens found between the two given nodes or tokens.
|
|
2163
2168
|
*/
|
|
2164
|
-
declare function isSpaceBetweenTokens(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
2169
|
+
declare function isSpaceBetweenTokens(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
2170
|
+
//#endregion
|
|
2165
2171
|
//#region src-js/plugins/directives.d.ts
|
|
2166
2172
|
interface Problem {
|
|
2167
2173
|
ruleId: string | null;
|
|
@@ -2173,12 +2179,13 @@ interface Directive {
|
|
|
2173
2179
|
type: DirectiveType;
|
|
2174
2180
|
node: CommentType;
|
|
2175
2181
|
value: string;
|
|
2176
|
-
justification
|
|
2182
|
+
justification: string;
|
|
2177
2183
|
}
|
|
2178
2184
|
declare function getDisableDirectives(): {
|
|
2179
2185
|
problems: Problem[];
|
|
2180
2186
|
directives: Directive[];
|
|
2181
|
-
};
|
|
2187
|
+
};
|
|
2188
|
+
//#endregion
|
|
2182
2189
|
//#region src-js/plugins/json.d.ts
|
|
2183
2190
|
/**
|
|
2184
2191
|
* A JSON value.
|
|
@@ -2189,7 +2196,8 @@ type JsonValue = JsonObject | JsonValue[] | string | number | boolean | null;
|
|
|
2189
2196
|
*/
|
|
2190
2197
|
type JsonObject = {
|
|
2191
2198
|
[key: string]: JsonValue;
|
|
2192
|
-
};
|
|
2199
|
+
};
|
|
2200
|
+
//#endregion
|
|
2193
2201
|
//#region src-js/plugins/globals.d.ts
|
|
2194
2202
|
/**
|
|
2195
2203
|
* Globals for the file being linted.
|
|
@@ -2203,7 +2211,8 @@ type Globals = Record<string, "readonly" | "writable" | "off">;
|
|
|
2203
2211
|
*
|
|
2204
2212
|
* Only includes environments that are enabled, so all properties are `true`.
|
|
2205
2213
|
*/
|
|
2206
|
-
type Envs = Record<string, true>;
|
|
2214
|
+
type Envs = Record<string, true>;
|
|
2215
|
+
//#endregion
|
|
2207
2216
|
//#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
|
|
2208
2217
|
// ==================================================================================================
|
|
2209
2218
|
// JSON Schema Draft 04
|
|
@@ -2212,15 +2221,17 @@ type Envs = Record<string, true>; //#endregion
|
|
|
2212
2221
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
|
2213
2222
|
*/
|
|
2214
2223
|
type JSONSchema4TypeName = "string" //
|
|
2215
|
-
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
2224
|
+
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
2216
2225
|
/**
|
|
2217
2226
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
|
2218
2227
|
*/
|
|
2219
2228
|
type JSONSchema4Type = string //
|
|
2220
|
-
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
2229
|
+
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
2230
|
+
// Workaround for infinite type recursion
|
|
2221
2231
|
interface JSONSchema4Object {
|
|
2222
2232
|
[key: string]: JSONSchema4Type;
|
|
2223
|
-
}
|
|
2233
|
+
}
|
|
2234
|
+
// Workaround for infinite type recursion
|
|
2224
2235
|
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
2225
2236
|
interface JSONSchema4Array extends Array<JSONSchema4Type> {}
|
|
2226
2237
|
/**
|
|
@@ -2399,7 +2410,8 @@ interface JSONSchema4 {
|
|
|
2399
2410
|
*/
|
|
2400
2411
|
[k: string]: any;
|
|
2401
2412
|
format?: string | undefined;
|
|
2402
|
-
}
|
|
2413
|
+
}
|
|
2414
|
+
//#endregion
|
|
2403
2415
|
//#region src-js/plugins/options.d.ts
|
|
2404
2416
|
/**
|
|
2405
2417
|
* Options for a rule on a file.
|
|
@@ -2414,8 +2426,9 @@ type Options = JsonValue[];
|
|
|
2414
2426
|
* - `JSONSchema4[]` - Array shorthand where each element describes corresponding options element.
|
|
2415
2427
|
* - `false` - Opts out of schema validation (not recommended).
|
|
2416
2428
|
*/
|
|
2417
|
-
type RuleOptionsSchema = JSONSchema4 | JSONSchema4[] | false;
|
|
2418
|
-
//#
|
|
2429
|
+
type RuleOptionsSchema = JSONSchema4 | JSONSchema4[] | false;
|
|
2430
|
+
//#endregion
|
|
2431
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-any.d.ts
|
|
2419
2432
|
/**
|
|
2420
2433
|
Returns a boolean for whether the given type is `any`.
|
|
2421
2434
|
|
|
@@ -2444,8 +2457,9 @@ const anyA = get(anyObject, 'a');
|
|
|
2444
2457
|
@category Type Guard
|
|
2445
2458
|
@category Utilities
|
|
2446
2459
|
*/
|
|
2447
|
-
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
2448
|
-
//#
|
|
2460
|
+
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
2461
|
+
//#endregion
|
|
2462
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
2449
2463
|
/**
|
|
2450
2464
|
Returns a boolean for whether the given key is an optional key of type.
|
|
2451
2465
|
|
|
@@ -2486,8 +2500,9 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
2486
2500
|
@category Type Guard
|
|
2487
2501
|
@category Utilities
|
|
2488
2502
|
*/
|
|
2489
|
-
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
2490
|
-
//#
|
|
2503
|
+
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
2504
|
+
//#endregion
|
|
2505
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
2491
2506
|
/**
|
|
2492
2507
|
Extract all optional keys from the given type.
|
|
2493
2508
|
|
|
@@ -2522,9 +2537,10 @@ const update2: UpdateOperation<User> = {
|
|
|
2522
2537
|
@category Utilities
|
|
2523
2538
|
*/
|
|
2524
2539
|
type OptionalKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
2525
|
-
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
2526
|
-
: never;
|
|
2527
|
-
//#
|
|
2540
|
+
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never; }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
2541
|
+
: never; // Should never happen
|
|
2542
|
+
//#endregion
|
|
2543
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
2528
2544
|
/**
|
|
2529
2545
|
Extract all required keys from the given type.
|
|
2530
2546
|
|
|
@@ -2556,8 +2572,9 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
2556
2572
|
@category Utilities
|
|
2557
2573
|
*/
|
|
2558
2574
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
2559
|
-
? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
|
|
2560
|
-
//#
|
|
2575
|
+
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
2576
|
+
//#endregion
|
|
2577
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-never.d.ts
|
|
2561
2578
|
/**
|
|
2562
2579
|
Returns a boolean for whether the given type is `never`.
|
|
2563
2580
|
|
|
@@ -2611,8 +2628,9 @@ type B = IsTrueFixed<never>;
|
|
|
2611
2628
|
@category Type Guard
|
|
2612
2629
|
@category Utilities
|
|
2613
2630
|
*/
|
|
2614
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
2615
|
-
//#
|
|
2631
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
2632
|
+
//#endregion
|
|
2633
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/if.d.ts
|
|
2616
2634
|
/**
|
|
2617
2635
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
2618
2636
|
|
|
@@ -2705,23 +2723,24 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
2705
2723
|
@category Type Guard
|
|
2706
2724
|
@category Utilities
|
|
2707
2725
|
*/
|
|
2708
|
-
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
2709
|
-
//#
|
|
2726
|
+
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
2727
|
+
//#endregion
|
|
2728
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/type.d.ts
|
|
2710
2729
|
/**
|
|
2711
2730
|
An if-else-like type that resolves depending on whether the given type is `any` or `never`.
|
|
2712
2731
|
|
|
2713
2732
|
@example
|
|
2714
2733
|
```
|
|
2715
|
-
// When `T` is
|
|
2716
|
-
type A = IfNotAnyOrNever<string, 'VALID'
|
|
2734
|
+
// When `T` is neither `any` nor `never` (like `string`) => Returns `IfNot` branch
|
|
2735
|
+
type A = IfNotAnyOrNever<string, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
2717
2736
|
//=> 'VALID'
|
|
2718
2737
|
|
|
2719
2738
|
// When `T` is `any` => Returns `IfAny` branch
|
|
2720
|
-
type B = IfNotAnyOrNever<any, 'VALID'
|
|
2739
|
+
type B = IfNotAnyOrNever<any, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
2721
2740
|
//=> 'IS_ANY'
|
|
2722
2741
|
|
|
2723
2742
|
// When `T` is `never` => Returns `IfNever` branch
|
|
2724
|
-
type C = IfNotAnyOrNever<never, 'VALID'
|
|
2743
|
+
type C = IfNotAnyOrNever<never, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
2725
2744
|
//=> 'IS_NEVER'
|
|
2726
2745
|
```
|
|
2727
2746
|
|
|
@@ -2734,7 +2753,7 @@ import type {StringRepeat} from 'type-fest';
|
|
|
2734
2753
|
type NineHundredNinetyNineSpaces = StringRepeat<' ', 999>;
|
|
2735
2754
|
|
|
2736
2755
|
// The following implementation is not tail recursive
|
|
2737
|
-
type TrimLeft<S extends string> = IfNotAnyOrNever<S, S extends ` ${infer R}` ? TrimLeft<R> : S>;
|
|
2756
|
+
type TrimLeft<S extends string> = IfNotAnyOrNever<S, {ifNot: S extends ` ${infer R}` ? TrimLeft<R> : S}>;
|
|
2738
2757
|
|
|
2739
2758
|
// Hence, instantiations with long strings will fail
|
|
2740
2759
|
// @ts-expect-error
|
|
@@ -2743,7 +2762,7 @@ type T1 = TrimLeft<NineHundredNinetyNineSpaces>;
|
|
|
2743
2762
|
// Error: Type instantiation is excessively deep and possibly infinite.
|
|
2744
2763
|
|
|
2745
2764
|
// To fix this, move the recursion into a helper type
|
|
2746
|
-
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, _TrimLeftOptimised<S
|
|
2765
|
+
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, {ifNot: _TrimLeftOptimised<S>}>;
|
|
2747
2766
|
|
|
2748
2767
|
type _TrimLeftOptimised<S extends string> = S extends ` ${infer R}` ? _TrimLeftOptimised<R> : S;
|
|
2749
2768
|
|
|
@@ -2751,8 +2770,13 @@ type T2 = TrimLeftOptimised<NineHundredNinetyNineSpaces>;
|
|
|
2751
2770
|
//=> ''
|
|
2752
2771
|
```
|
|
2753
2772
|
*/
|
|
2754
|
-
type IfNotAnyOrNever<T,
|
|
2755
|
-
|
|
2773
|
+
type IfNotAnyOrNever<T, Cases extends {
|
|
2774
|
+
ifNot: unknown;
|
|
2775
|
+
ifAny?: unknown;
|
|
2776
|
+
ifNever?: unknown;
|
|
2777
|
+
}> = IsAny<T> extends true ? 'ifAny' extends keyof Cases ? Cases['ifAny'] : any : IsNever<T> extends true ? 'ifNever' extends keyof Cases ? Cases['ifNever'] : never : Cases['ifNot'];
|
|
2778
|
+
//#endregion
|
|
2779
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/simplify.d.ts
|
|
2756
2780
|
/**
|
|
2757
2781
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
2758
2782
|
|
|
@@ -2811,8 +2835,9 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
2811
2835
|
@see {@link SimplifyDeep}
|
|
2812
2836
|
@category Object
|
|
2813
2837
|
*/
|
|
2814
|
-
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
2815
|
-
//#
|
|
2838
|
+
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
2839
|
+
//#endregion
|
|
2840
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-equal.d.ts
|
|
2816
2841
|
/**
|
|
2817
2842
|
Returns a boolean for whether the two given types are equal.
|
|
2818
2843
|
|
|
@@ -2839,9 +2864,11 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
2839
2864
|
@category Type Guard
|
|
2840
2865
|
@category Utilities
|
|
2841
2866
|
*/
|
|
2842
|
-
type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
|
|
2843
|
-
|
|
2844
|
-
|
|
2867
|
+
type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
|
|
2868
|
+
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
2869
|
+
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
2870
|
+
//#endregion
|
|
2871
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
2845
2872
|
/**
|
|
2846
2873
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
2847
2874
|
|
|
@@ -2933,8 +2960,9 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
2933
2960
|
@see {@link PickIndexSignature}
|
|
2934
2961
|
@category Object
|
|
2935
2962
|
*/
|
|
2936
|
-
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
2937
|
-
//#
|
|
2963
|
+
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
2964
|
+
//#endregion
|
|
2965
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
2938
2966
|
/**
|
|
2939
2967
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
2940
2968
|
|
|
@@ -2980,10 +3008,11 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
2980
3008
|
@see {@link OmitIndexSignature}
|
|
2981
3009
|
@category Object
|
|
2982
3010
|
*/
|
|
2983
|
-
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
2984
|
-
//#
|
|
3011
|
+
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
3012
|
+
//#endregion
|
|
3013
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/merge.d.ts
|
|
2985
3014
|
// Merges two objects without worrying about index signatures.
|
|
2986
|
-
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
|
|
3015
|
+
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
2987
3016
|
/**
|
|
2988
3017
|
Merge two types into a new type. Keys of the second type overrides keys of the first type.
|
|
2989
3018
|
|
|
@@ -3047,11 +3076,12 @@ Note: If you want a merge type that more accurately reflects the runtime behavio
|
|
|
3047
3076
|
@category Object
|
|
3048
3077
|
*/
|
|
3049
3078
|
type Merge<Destination, Source> = Destination extends unknown // For distributing `Destination`
|
|
3050
|
-
? Source extends unknown // For distributing `Source`
|
|
3051
|
-
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
3052
|
-
: never; // Should never happen
|
|
3053
|
-
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
3054
|
-
//#
|
|
3079
|
+
? Source extends unknown // For distributing `Source`
|
|
3080
|
+
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
3081
|
+
: never; // Should never happen
|
|
3082
|
+
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
3083
|
+
//#endregion
|
|
3084
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/object.d.ts
|
|
3055
3085
|
/**
|
|
3056
3086
|
Merges user specified options with default options.
|
|
3057
3087
|
|
|
@@ -3104,8 +3134,11 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
|
|
|
3104
3134
|
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
3105
3135
|
```
|
|
3106
3136
|
*/
|
|
3107
|
-
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> =
|
|
3108
|
-
|
|
3137
|
+
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends (infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
3138
|
+
) ? Result : never;
|
|
3139
|
+
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
3140
|
+
//#endregion
|
|
3141
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/except.d.ts
|
|
3109
3142
|
/**
|
|
3110
3143
|
Filter out keys from an object.
|
|
3111
3144
|
|
|
@@ -3136,10 +3169,12 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
3136
3169
|
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
3137
3170
|
type ExceptOptions = {
|
|
3138
3171
|
/**
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3172
|
+
Disallow assigning non-specified properties.
|
|
3173
|
+
|
|
3174
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
3175
|
+
|
|
3176
|
+
@default false
|
|
3177
|
+
*/
|
|
3143
3178
|
requireExactProps?: boolean;
|
|
3144
3179
|
};
|
|
3145
3180
|
type DefaultExceptOptions = {
|
|
@@ -3201,8 +3236,9 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
3201
3236
|
@category Object
|
|
3202
3237
|
*/
|
|
3203
3238
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
3204
|
-
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
3205
|
-
//#
|
|
3239
|
+
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
3240
|
+
//#endregion
|
|
3241
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/require-at-least-one.d.ts
|
|
3206
3242
|
/**
|
|
3207
3243
|
Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
3208
3244
|
|
|
@@ -3224,11 +3260,14 @@ const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
|
|
|
3224
3260
|
|
|
3225
3261
|
@category Object
|
|
3226
3262
|
*/
|
|
3227
|
-
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType,
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3263
|
+
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, {
|
|
3264
|
+
ifNot: If<IsNever<KeysType>, never, _RequireAtLeastOne<ObjectType, If<IsAny<KeysType>, keyof ObjectType, KeysType>>>;
|
|
3265
|
+
}>;
|
|
3266
|
+
type _RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [
|
|
3267
|
+
// For each `Key` in `KeysType` make a mapped type:
|
|
3268
|
+
Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type required
|
|
3269
|
+
& Partial<Pick<ObjectType, Exclude<KeysType, Key>>> // 2. Make all other keys in `KeysType` optional
|
|
3270
|
+
; }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
|
|
3232
3271
|
//#endregion
|
|
3233
3272
|
//#region src-js/plugins/fix.d.ts
|
|
3234
3273
|
type FixFn = (fixer: Fixer) => Fix | Array<Fix | null | undefined> | IterableIterator<Fix | null | undefined> | null | undefined;
|
|
@@ -3255,7 +3294,8 @@ declare const FIXER: Readonly<{
|
|
|
3255
3294
|
replaceText(nodeOrToken: Ranged, text: string): Fix;
|
|
3256
3295
|
replaceTextRange(range: Range, text: string): Fix;
|
|
3257
3296
|
}>;
|
|
3258
|
-
type Fixer = typeof FIXER;
|
|
3297
|
+
type Fixer = typeof FIXER;
|
|
3298
|
+
//#endregion
|
|
3259
3299
|
//#region src-js/plugins/report.d.ts
|
|
3260
3300
|
/**
|
|
3261
3301
|
* Diagnostic object.
|
|
@@ -3295,9 +3335,6 @@ interface SuggestionBase {
|
|
|
3295
3335
|
data?: DiagnosticData | null | undefined;
|
|
3296
3336
|
fix: FixFn;
|
|
3297
3337
|
}
|
|
3298
|
-
/**
|
|
3299
|
-
* Suggested fix in form sent to Rust.
|
|
3300
|
-
*/
|
|
3301
3338
|
//#endregion
|
|
3302
3339
|
//#region src-js/plugins/source_code.d.ts
|
|
3303
3340
|
declare const SOURCE_CODE: Readonly<{
|
|
@@ -3404,8 +3441,7 @@ declare const SOURCE_CODE: Readonly<{
|
|
|
3404
3441
|
isSpaceBetweenTokens: typeof isSpaceBetweenTokens;
|
|
3405
3442
|
getDisableDirectives: typeof getDisableDirectives;
|
|
3406
3443
|
}>;
|
|
3407
|
-
type SourceCode = typeof SOURCE_CODE;
|
|
3408
|
-
//#region src-js/plugins/context.d.ts
|
|
3444
|
+
type SourceCode = typeof SOURCE_CODE;
|
|
3409
3445
|
declare const FILE_CONTEXT: Readonly<{
|
|
3410
3446
|
/**
|
|
3411
3447
|
* Absolute path of the file being linted.
|
|
@@ -3795,7 +3831,8 @@ interface Context extends FileContext {
|
|
|
3795
3831
|
* Report an error/warning.
|
|
3796
3832
|
*/
|
|
3797
3833
|
report(this: void, diagnostic: Diagnostic): void;
|
|
3798
|
-
}
|
|
3834
|
+
}
|
|
3835
|
+
//#endregion
|
|
3799
3836
|
//#region src-js/plugins/rule_meta.d.ts
|
|
3800
3837
|
/**
|
|
3801
3838
|
* Rule metadata.
|
|
@@ -3948,7 +3985,8 @@ interface RuleReplacedByExternalSpecifier {
|
|
|
3948
3985
|
* URL pointing to documentation for the plugin / rule.
|
|
3949
3986
|
*/
|
|
3950
3987
|
url?: string;
|
|
3951
|
-
}
|
|
3988
|
+
}
|
|
3989
|
+
//#endregion
|
|
3952
3990
|
//#region src-js/plugins/load.d.ts
|
|
3953
3991
|
/**
|
|
3954
3992
|
* Linter plugin, comprising multiple rules
|
|
@@ -3977,16 +4015,7 @@ interface CreateOnceRule {
|
|
|
3977
4015
|
meta?: RuleMeta;
|
|
3978
4016
|
create?: (context: Context) => VisitorObject;
|
|
3979
4017
|
createOnce: (context: Context) => VisitorWithHooks;
|
|
3980
|
-
}
|
|
3981
|
-
//#region src-js/package/define.d.ts
|
|
3982
|
-
/**
|
|
3983
|
-
* Define a plugin.
|
|
3984
|
-
*
|
|
3985
|
-
* No-op function, just to provide type safety. Input is passed through unchanged.
|
|
3986
|
-
*
|
|
3987
|
-
* @param plugin - Plugin to define
|
|
3988
|
-
* @returns Same plugin as passed in
|
|
3989
|
-
*/
|
|
4018
|
+
}
|
|
3990
4019
|
//#endregion
|
|
3991
4020
|
//#region src/plugins/import/index.d.ts
|
|
3992
4021
|
declare const plugin: Plugin;
|
package/dist/plugins/import.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/oxc-config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "SoybeanJS's oxlint and oxfmt config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@oxlint/plugins": "^1.
|
|
50
|
-
"@soybeanjs/cli": "^1.
|
|
49
|
+
"@oxlint/plugins": "^1.81.0",
|
|
50
|
+
"@soybeanjs/cli": "^1.8.2",
|
|
51
51
|
"@soybeanjs/oxc-config": "link:dist",
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"lint-staged": "^17.
|
|
54
|
-
"oxfmt": "^0.
|
|
55
|
-
"oxlint": "^1.
|
|
56
|
-
"simple-git-hooks": "^2.
|
|
57
|
-
"tsdown": "^0.22.
|
|
58
|
-
"tsx": "^4.
|
|
59
|
-
"typescript": "^
|
|
52
|
+
"@types/node": "^26.4.1",
|
|
53
|
+
"lint-staged": "^17.4.1",
|
|
54
|
+
"oxfmt": "^0.66.0",
|
|
55
|
+
"oxlint": "^1.81.0",
|
|
56
|
+
"simple-git-hooks": "^2.14.0",
|
|
57
|
+
"tsdown": "^0.22.14",
|
|
58
|
+
"tsx": "^4.23.13",
|
|
59
|
+
"typescript": "^7.0.2"
|
|
60
60
|
},
|
|
61
61
|
"simple-git-hooks": {
|
|
62
62
|
"commit-msg": "pnpm soy git-commit-verify",
|