eslint-plugin-nextfriday 1.15.1 → 1.15.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # eslint-plugin-nextfriday
2
2
 
3
+ ## 1.15.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#73](https://github.com/next-friday/eslint-plugin-nextfriday/pull/73) [`d383b44`](https://github.com/next-friday/eslint-plugin-nextfriday/commit/d383b44f38adaf864ed0ef8aaa257cd15d7cbf81) Thanks [@joetakara](https://github.com/joetakara)! - Fix jsx-no-newline-single-line-elements false positive when JSX expressions (e.g. {children}) appear between elements.
8
+
3
9
  ## 1.15.1
4
10
 
5
11
  ### Patch Changes
package/lib/index.cjs CHANGED
@@ -42,7 +42,7 @@ var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
42
42
  // package.json
43
43
  var package_default = {
44
44
  name: "eslint-plugin-nextfriday",
45
- version: "1.15.1",
45
+ version: "1.15.2",
46
46
  description: "A comprehensive ESLint plugin providing custom rules and configurations for Next Friday development workflows.",
47
47
  keywords: [
48
48
  "eslint",
@@ -967,14 +967,17 @@ var jsxNoNewlineSingleLineElements = createRule12({
967
967
  create(context) {
968
968
  const { sourceCode } = context;
969
969
  function checkSiblings(children) {
970
- const jsxElements = children.filter(
971
- (child) => isJSXElementOrFragment(child)
970
+ const nonWhitespace = children.filter(
971
+ (child) => !(child.type === import_utils12.AST_NODE_TYPES.JSXText && child.value.trim() === "")
972
972
  );
973
- jsxElements.forEach((next, index) => {
973
+ nonWhitespace.forEach((next, index) => {
974
974
  if (index === 0) {
975
975
  return;
976
976
  }
977
- const current = jsxElements[index - 1];
977
+ const current = nonWhitespace[index - 1];
978
+ if (!isJSXElementOrFragment(current) || !isJSXElementOrFragment(next)) {
979
+ return;
980
+ }
978
981
  if (!isSingleLine(current) || !isSingleLine(next)) {
979
982
  return;
980
983
  }