eslint-plugin-react-jsx 5.24.0-beta.2 → 5.24.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.js +6 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region package.json
|
|
28
28
|
var name$2 = "eslint-plugin-react-jsx";
|
|
29
|
-
var version = "5.24.0
|
|
29
|
+
var version = "5.24.0";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -249,6 +249,9 @@ function create$5(context) {
|
|
|
249
249
|
function not(predicate) {
|
|
250
250
|
return (data) => !predicate(data);
|
|
251
251
|
}
|
|
252
|
+
function or(a, b) {
|
|
253
|
+
return (data) => a(data) || b(data);
|
|
254
|
+
}
|
|
252
255
|
/**
|
|
253
256
|
* Applies a `pipe` method's variadic arguments to an initial value from left
|
|
254
257
|
* to right.
|
|
@@ -802,8 +805,9 @@ function create$3(context) {
|
|
|
802
805
|
* empty expression (ex: `{}` or a comment), or an empty string expression.
|
|
803
806
|
* @param child The JSX child node to check.
|
|
804
807
|
*/
|
|
808
|
+
const isWhitespaceOrEmptyStringExpression = or(isWhitespaceText, isEmptyStringExpression);
|
|
805
809
|
function isNonSubstantiveChild(child) {
|
|
806
|
-
if (
|
|
810
|
+
if (isWhitespaceOrEmptyStringExpression(child)) return true;
|
|
807
811
|
return child.type === AST_NODE_TYPES.JSXExpressionContainer && child.expression.type === AST_NODE_TYPES.JSXEmptyExpression;
|
|
808
812
|
}
|
|
809
813
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-jsx",
|
|
3
|
-
"version": "5.24.0
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.24.0
|
|
41
|
-
"@eslint-react/core": "5.24.0
|
|
42
|
-
"@eslint-react/eslint": "5.24.0
|
|
43
|
-
"@eslint-react/jsx": "5.24.0
|
|
44
|
-
"@eslint-react/shared": "5.24.0
|
|
40
|
+
"@eslint-react/ast": "5.24.0",
|
|
41
|
+
"@eslint-react/core": "5.24.0",
|
|
42
|
+
"@eslint-react/eslint": "5.24.0",
|
|
43
|
+
"@eslint-react/jsx": "5.24.0",
|
|
44
|
+
"@eslint-react/shared": "5.24.0",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0"
|
|
47
47
|
},
|