exadev-eslint-config 2.22.0 → 2.22.1

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/README.md CHANGED
@@ -442,7 +442,7 @@ export default exadevConfig({
442
442
  ### Build, test, and lint
443
443
 
444
444
  ```sh
445
- pnpm install # requires Node >=20 and pnpm 11.6.0 (pinned via packageManager)
445
+ pnpm install # requires Node >=20 and the pnpm version pinned in package.json's packageManager field
446
446
  pnpm lint
447
447
  pnpm typecheck
448
448
  pnpm test
package/dist/index.cjs CHANGED
@@ -309,7 +309,7 @@ function resolveJsonPlugin(value) {
309
309
  }
310
310
  //#endregion
311
311
  //#region package.json
312
- var version = "2.22.0";
312
+ var version = "2.22.1";
313
313
  //#endregion
314
314
  //#region src/react.ts
315
315
  const JSX_FILE_PATTERNS = ["**/*.jsx", "**/*.tsx"];
@@ -1074,7 +1074,7 @@ function readWorkspacePackages(yamlText) {
1074
1074
  if (keyLineIndex === -1) return [];
1075
1075
  const keyLine = requireLine(lines, keyLineIndex);
1076
1076
  const inlineWithoutComment = stripComment(requireCapture(requireMatch(PACKAGES_KEY_PATTERN, keyLine), 1));
1077
- if (inlineWithoutComment.length > 0) throw new Error(`pnpm-workspace.yaml's "packages:" key is written in flow style ("${inlineWithoutComment}"), which this package's minimal reader does not support. Rewrite it as a block sequence (one "- 'glob'" per line), or pass the "packages" rule option explicitly.`);
1077
+ if (inlineWithoutComment.length > 0) throw new Error(`@exadev/eslint-config: pnpm-workspace.yaml's "packages:" key is written in flow style ("${inlineWithoutComment}"), which this package's minimal reader does not support. Rewrite it as a block sequence (one "- 'glob'" per line), or pass the "packages" rule option explicitly.`);
1078
1078
  const items = [];
1079
1079
  let sequenceIndent;
1080
1080
  for (let index = keyLineIndex + 1; index < lines.length; index += 1) {
@@ -1082,7 +1082,7 @@ function readWorkspacePackages(yamlText) {
1082
1082
  if (line.trim().length === 0 || line.trim().startsWith("#")) continue;
1083
1083
  const itemMatch = SEQUENCE_ITEM_PATTERN.exec(line);
1084
1084
  if (itemMatch === null) {
1085
- if (items.length === 0) throw new Error(`pnpm-workspace.yaml's "packages:" key is present but its next line ("${line.trim()}") is not a block-sequence item ("- 'glob'"). This package's minimal reader only supports a block sequence; rewrite it, or pass the "packages" rule option explicitly.`);
1085
+ if (items.length === 0) throw new Error(`@exadev/eslint-config: pnpm-workspace.yaml's "packages:" key is present but its next line ("${line.trim()}") is not a block-sequence item ("- 'glob'"). This package's minimal reader only supports a block sequence; rewrite it, or pass the "packages" rule option explicitly.`);
1086
1086
  break;
1087
1087
  }
1088
1088
  const indent = requireCapture(itemMatch, 1);
@@ -1701,7 +1701,7 @@ function expectedPackageName(relativeDir, group, naming) {
1701
1701
  const segments = splitPathSegments(relativeDir);
1702
1702
  const groupPathSegments = splitPathSegments(group.path ?? group.name);
1703
1703
  const rest = segments.slice(groupPathSegments.length);
1704
- const groupNameSegment = last(groupPathSegments);
1704
+ const groupNameSegment = groupPathSegments.length > 1 ? last(groupPathSegments) : group.name;
1705
1705
  const joined = NAME_SEGMENTS_BY_STRATEGY[group.naming ?? "drop-group"]({
1706
1706
  segments,
1707
1707
  rest,
package/dist/index.js CHANGED
@@ -275,7 +275,7 @@ function resolveJsonPlugin(value) {
275
275
  }
276
276
  //#endregion
277
277
  //#region package.json
278
- var version = "2.22.0";
278
+ var version = "2.22.1";
279
279
  //#endregion
280
280
  //#region src/react.ts
281
281
  const JSX_FILE_PATTERNS = ["**/*.jsx", "**/*.tsx"];
@@ -1040,7 +1040,7 @@ function readWorkspacePackages(yamlText) {
1040
1040
  if (keyLineIndex === -1) return [];
1041
1041
  const keyLine = requireLine(lines, keyLineIndex);
1042
1042
  const inlineWithoutComment = stripComment(requireCapture(requireMatch(PACKAGES_KEY_PATTERN, keyLine), 1));
1043
- if (inlineWithoutComment.length > 0) throw new Error(`pnpm-workspace.yaml's "packages:" key is written in flow style ("${inlineWithoutComment}"), which this package's minimal reader does not support. Rewrite it as a block sequence (one "- 'glob'" per line), or pass the "packages" rule option explicitly.`);
1043
+ if (inlineWithoutComment.length > 0) throw new Error(`@exadev/eslint-config: pnpm-workspace.yaml's "packages:" key is written in flow style ("${inlineWithoutComment}"), which this package's minimal reader does not support. Rewrite it as a block sequence (one "- 'glob'" per line), or pass the "packages" rule option explicitly.`);
1044
1044
  const items = [];
1045
1045
  let sequenceIndent;
1046
1046
  for (let index = keyLineIndex + 1; index < lines.length; index += 1) {
@@ -1048,7 +1048,7 @@ function readWorkspacePackages(yamlText) {
1048
1048
  if (line.trim().length === 0 || line.trim().startsWith("#")) continue;
1049
1049
  const itemMatch = SEQUENCE_ITEM_PATTERN.exec(line);
1050
1050
  if (itemMatch === null) {
1051
- if (items.length === 0) throw new Error(`pnpm-workspace.yaml's "packages:" key is present but its next line ("${line.trim()}") is not a block-sequence item ("- 'glob'"). This package's minimal reader only supports a block sequence; rewrite it, or pass the "packages" rule option explicitly.`);
1051
+ if (items.length === 0) throw new Error(`@exadev/eslint-config: pnpm-workspace.yaml's "packages:" key is present but its next line ("${line.trim()}") is not a block-sequence item ("- 'glob'"). This package's minimal reader only supports a block sequence; rewrite it, or pass the "packages" rule option explicitly.`);
1052
1052
  break;
1053
1053
  }
1054
1054
  const indent = requireCapture(itemMatch, 1);
@@ -1667,7 +1667,7 @@ function expectedPackageName(relativeDir, group, naming) {
1667
1667
  const segments = splitPathSegments(relativeDir);
1668
1668
  const groupPathSegments = splitPathSegments(group.path ?? group.name);
1669
1669
  const rest = segments.slice(groupPathSegments.length);
1670
- const groupNameSegment = last(groupPathSegments);
1670
+ const groupNameSegment = groupPathSegments.length > 1 ? last(groupPathSegments) : group.name;
1671
1671
  const joined = NAME_SEGMENTS_BY_STRATEGY[group.naming ?? "drop-group"]({
1672
1672
  segments,
1673
1673
  rest,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "exadev-eslint-config",
3
3
  "description": "Shared custom ESLint rules and plugin for ExaDev projects",
4
- "version": "2.22.0",
4
+ "version": "2.22.1",
5
5
  "dependencies": {
6
6
  "@eslint/js": "^10.0.1",
7
7
  "@typescript-eslint/utils": "8.67.0",