@eslint-react/jsx 0.5.5 → 0.5.7
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.cjs +6919 -74
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +6919 -74
- package/dist/index.mjs +6881 -37
- package/package.json +12 -13
package/dist/index.d.mts
CHANGED
|
@@ -27,14 +27,14 @@ declare const isCallFromPragma: (name: string) => (node: TSESTree$1.Node, contex
|
|
|
27
27
|
declare function isDestructuredFromPragma<T extends RuleContext>(variableName: string, context: T): boolean;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Checks if the given node is a call expression to `
|
|
30
|
+
* Checks if the given node is a call expression to `createElement`
|
|
31
31
|
* @param node The AST node to check
|
|
32
32
|
* @param context The rule context
|
|
33
33
|
* @returns `true` if the node is a call expression to `createElement`
|
|
34
34
|
*/
|
|
35
35
|
declare const isCreateElementCall: CallFromPragmaPredicate;
|
|
36
36
|
/**
|
|
37
|
-
* Checks if the given node is a call expression to `
|
|
37
|
+
* Checks if the given node is a call expression to `cloneElement`
|
|
38
38
|
* @param node The AST node to check
|
|
39
39
|
* @param context The rule context
|
|
40
40
|
* @returns `true` if the node is a call expression to `cloneElement`
|
|
@@ -165,6 +165,11 @@ declare function findPropInProperties(properties: (TSESTree.Property | TSESTree.
|
|
|
165
165
|
* @returns A function that searches for a property in the given attributes
|
|
166
166
|
*/
|
|
167
167
|
declare function findPropInAttributes(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute)[], context: RuleContext): (propName: string) => O.Option<NonNullable<TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute | undefined>>;
|
|
168
|
+
declare function getPropValue(attribute: TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute, context: RuleContext): O.None<{
|
|
169
|
+
value: unknown;
|
|
170
|
+
} | null> | O.Some<{
|
|
171
|
+
value: unknown;
|
|
172
|
+
} | null>;
|
|
168
173
|
|
|
169
174
|
/**
|
|
170
175
|
* Check if a node is a Literal or JSXText
|
|
@@ -185,4 +190,4 @@ declare function isWhiteSpace(node: TSESTree.JSXText | TSESTree.Literal): boolea
|
|
|
185
190
|
*/
|
|
186
191
|
declare function isLineBreak(node: TSESTree.Node): boolean;
|
|
187
192
|
|
|
188
|
-
export { type CallFromPragmaPredicate, type JSXValueCheckOptions, defaultJSXValueCheckOptions, elementType, findPropInAttributes, findPropInProperties, getFragmentFromContext, getPragmaFromContext, getPropName, getPropNameWithNamespace, hasAnyProp, hasChildren, hasEveryProp, hasProp, hdlAnimation, hdlClipboard, hdlComposition, hdlFocus, hdlForm, hdlImage, hdlKeyboard, hdlMedia, hdlMouse, hdlScroll, hdlSelection, hdlTouch, hdlTransition, hdlWheel, isCallFromPragma, isChildrenOfCreateElement, isCloneElementCall, isCreateElementCall, isDestructuredFromPragma, isFunctionReturningJSXValue, isInsideCreateElementProps, isInsidePropValue, isJSXValue, isLineBreak, isLiteral, isWhiteSpace, traverseUpProp };
|
|
193
|
+
export { type CallFromPragmaPredicate, type JSXValueCheckOptions, defaultJSXValueCheckOptions, elementType, findPropInAttributes, findPropInProperties, getFragmentFromContext, getPragmaFromContext, getPropName, getPropNameWithNamespace, getPropValue, hasAnyProp, hasChildren, hasEveryProp, hasProp, hdlAnimation, hdlClipboard, hdlComposition, hdlFocus, hdlForm, hdlImage, hdlKeyboard, hdlMedia, hdlMouse, hdlScroll, hdlSelection, hdlTouch, hdlTransition, hdlWheel, isCallFromPragma, isChildrenOfCreateElement, isCloneElementCall, isCreateElementCall, isDestructuredFromPragma, isFunctionReturningJSXValue, isInsideCreateElementProps, isInsidePropValue, isJSXValue, isLineBreak, isLiteral, isWhiteSpace, traverseUpProp };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,14 +27,14 @@ declare const isCallFromPragma: (name: string) => (node: TSESTree$1.Node, contex
|
|
|
27
27
|
declare function isDestructuredFromPragma<T extends RuleContext>(variableName: string, context: T): boolean;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Checks if the given node is a call expression to `
|
|
30
|
+
* Checks if the given node is a call expression to `createElement`
|
|
31
31
|
* @param node The AST node to check
|
|
32
32
|
* @param context The rule context
|
|
33
33
|
* @returns `true` if the node is a call expression to `createElement`
|
|
34
34
|
*/
|
|
35
35
|
declare const isCreateElementCall: CallFromPragmaPredicate;
|
|
36
36
|
/**
|
|
37
|
-
* Checks if the given node is a call expression to `
|
|
37
|
+
* Checks if the given node is a call expression to `cloneElement`
|
|
38
38
|
* @param node The AST node to check
|
|
39
39
|
* @param context The rule context
|
|
40
40
|
* @returns `true` if the node is a call expression to `cloneElement`
|
|
@@ -165,6 +165,11 @@ declare function findPropInProperties(properties: (TSESTree.Property | TSESTree.
|
|
|
165
165
|
* @returns A function that searches for a property in the given attributes
|
|
166
166
|
*/
|
|
167
167
|
declare function findPropInAttributes(attributes: (TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute)[], context: RuleContext): (propName: string) => O.Option<NonNullable<TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute | undefined>>;
|
|
168
|
+
declare function getPropValue(attribute: TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute, context: RuleContext): O.None<{
|
|
169
|
+
value: unknown;
|
|
170
|
+
} | null> | O.Some<{
|
|
171
|
+
value: unknown;
|
|
172
|
+
} | null>;
|
|
168
173
|
|
|
169
174
|
/**
|
|
170
175
|
* Check if a node is a Literal or JSXText
|
|
@@ -185,4 +190,4 @@ declare function isWhiteSpace(node: TSESTree.JSXText | TSESTree.Literal): boolea
|
|
|
185
190
|
*/
|
|
186
191
|
declare function isLineBreak(node: TSESTree.Node): boolean;
|
|
187
192
|
|
|
188
|
-
export { type CallFromPragmaPredicate, type JSXValueCheckOptions, defaultJSXValueCheckOptions, elementType, findPropInAttributes, findPropInProperties, getFragmentFromContext, getPragmaFromContext, getPropName, getPropNameWithNamespace, hasAnyProp, hasChildren, hasEveryProp, hasProp, hdlAnimation, hdlClipboard, hdlComposition, hdlFocus, hdlForm, hdlImage, hdlKeyboard, hdlMedia, hdlMouse, hdlScroll, hdlSelection, hdlTouch, hdlTransition, hdlWheel, isCallFromPragma, isChildrenOfCreateElement, isCloneElementCall, isCreateElementCall, isDestructuredFromPragma, isFunctionReturningJSXValue, isInsideCreateElementProps, isInsidePropValue, isJSXValue, isLineBreak, isLiteral, isWhiteSpace, traverseUpProp };
|
|
193
|
+
export { type CallFromPragmaPredicate, type JSXValueCheckOptions, defaultJSXValueCheckOptions, elementType, findPropInAttributes, findPropInProperties, getFragmentFromContext, getPragmaFromContext, getPropName, getPropNameWithNamespace, getPropValue, hasAnyProp, hasChildren, hasEveryProp, hasProp, hdlAnimation, hdlClipboard, hdlComposition, hdlFocus, hdlForm, hdlImage, hdlKeyboard, hdlMedia, hdlMouse, hdlScroll, hdlSelection, hdlTouch, hdlTransition, hdlWheel, isCallFromPragma, isChildrenOfCreateElement, isCloneElementCall, isCreateElementCall, isDestructuredFromPragma, isFunctionReturningJSXValue, isInsideCreateElementProps, isInsidePropValue, isJSXValue, isLineBreak, isLiteral, isWhiteSpace, traverseUpProp };
|