@storm-software/linting-tools 1.34.13 → 1.34.15

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,7 @@
1
1
 
2
2
 
3
+
4
+
3
5
  ## 1.34.12 (2024-01-29)
4
6
 
5
7
 
package/bin/lint.js CHANGED
@@ -283744,11 +283744,11 @@ var init_js_yaml = __esm({
283744
283744
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js
283745
283745
  import { existsSync as existsSync3, readFileSync as readFileSync6 } from "node:fs";
283746
283746
  import { join as join6, relative as relative5 } from "node:path";
283747
- var Package2;
283747
+ var Package;
283748
283748
  var init_package = __esm({
283749
283749
  "node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js"() {
283750
283750
  init_js_yaml();
283751
- Package2 = class {
283751
+ Package = class {
283752
283752
  constructor(path37, pathWorkspace) {
283753
283753
  this.path = path37;
283754
283754
  this.pathWorkspace = pathWorkspace;
@@ -283993,7 +283993,7 @@ function versionsObjectsWithSortedPackages(versions, versionObjects) {
283993
283993
  const matchingVersionObjects = versionObjects.filter((versionObject) => versionObject.version === version3);
283994
283994
  return {
283995
283995
  version: version3,
283996
- packages: matchingVersionObjects.map((object) => object.package).sort((a, b) => Package2.comparator(a, b))
283996
+ packages: matchingVersionObjects.map((object) => object.package).sort((a, b) => Package.comparator(a, b))
283997
283997
  };
283998
283998
  });
283999
283999
  }
@@ -284401,23 +284401,23 @@ var init_globby = __esm({
284401
284401
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/workspace.js
284402
284402
  import { join as join7 } from "node:path";
284403
284403
  function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths, ignorePathPatterns) {
284404
- if (!Package2.exists(root)) {
284404
+ if (!Package.exists(root)) {
284405
284405
  throw new Error("No package.json found at provided path.");
284406
284406
  }
284407
- const package_ = new Package2(root, root);
284407
+ const package_ = new Package(root, root);
284408
284408
  if (package_.workspacePatterns.length === 0) {
284409
284409
  throw new Error("Package at provided path has no workspaces specified.");
284410
284410
  }
284411
284411
  const packages = accumulatePackages(root, ["."]);
284412
284412
  for (const ignoredPackage of ignorePackages) {
284413
- if (!Package2.some(packages, (package_2) => package_2.name === ignoredPackage)) {
284413
+ if (!Package.some(packages, (package_2) => package_2.name === ignoredPackage)) {
284414
284414
  throw new Error(`Specified option '--ignore-package ${ignoredPackage}', but no such package detected in workspace.`);
284415
284415
  }
284416
284416
  }
284417
284417
  for (const ignoredPackagePattern of ignorePackagePatterns) {
284418
284418
  if (
284419
284419
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284420
- !Package2.some(packages, (package_2) => ignoredPackagePattern.test(package_2.name))
284420
+ !Package.some(packages, (package_2) => ignoredPackagePattern.test(package_2.name))
284421
284421
  ) {
284422
284422
  throw new Error(`Specified option '--ignore-package-pattern ${String(ignoredPackagePattern)}', but no matching packages detected in workspace.`);
284423
284423
  }
@@ -284425,7 +284425,7 @@ function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths,
284425
284425
  for (const ignoredPath of ignorePaths) {
284426
284426
  if (
284427
284427
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284428
- !Package2.some(packages, (package_2) => package_2.pathRelative.includes(ignoredPath))
284428
+ !Package.some(packages, (package_2) => package_2.pathRelative.includes(ignoredPath))
284429
284429
  ) {
284430
284430
  throw new Error(`Specified option '--ignore-path ${ignoredPath}', but no matching paths detected in workspace.`);
284431
284431
  }
@@ -284433,7 +284433,7 @@ function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths,
284433
284433
  for (const ignoredPathPattern of ignorePathPatterns) {
284434
284434
  if (
284435
284435
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284436
- !Package2.some(packages, (package_2) => ignoredPathPattern.test(package_2.pathRelative))
284436
+ !Package.some(packages, (package_2) => ignoredPathPattern.test(package_2.pathRelative))
284437
284437
  ) {
284438
284438
  throw new Error(`Specified option '--ignore-path-pattern ${String(ignoredPathPattern)}', but no matching paths detected in workspace.`);
284439
284439
  }
@@ -284459,8 +284459,8 @@ function accumulatePackages(root, paths) {
284459
284459
  const results = [];
284460
284460
  for (const relativePath2 of paths) {
284461
284461
  const path37 = join7(root, relativePath2);
284462
- if (Package2.exists(path37)) {
284463
- const package_ = new Package2(path37, root);
284462
+ if (Package.exists(path37)) {
284463
+ const package_ = new Package(path37, root);
284464
284464
  results.push(
284465
284465
  // Add the current package.
284466
284466
  package_,
@@ -338365,12 +338365,7 @@ var runChecks = (allWorkspaces, rootWorkspace, shouldFix, options) => {
338365
338365
  }
338366
338366
  if (check3.type === "all") {
338367
338367
  for (const [, workspace] of allWorkspaces) {
338368
- const errors = check3.validate(
338369
- workspace,
338370
- allWorkspaces,
338371
- rootWorkspace,
338372
- options
338373
- );
338368
+ const errors = check3.validate(workspace, allWorkspaces, rootWorkspace, options);
338374
338369
  if (shouldFix && check3.fix !== void 0) {
338375
338370
  for (const error2 of errors) {
338376
338371
  const output = check3.fix(error2, options) || {
@@ -338446,15 +338441,13 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338446
338441
  process.exit(1);
338447
338442
  }
338448
338443
  const { packages, rootPackage, rootDir } = await (0, import_get_packages4.getPackages)(
338449
- process.env["STORM_WORKSPACE_ROOT"] ? process.env["STORM_WORKSPACE_ROOT"] : process.cwd()
338444
+ process.env.STORM_WORKSPACE_ROOT ? process.env.STORM_WORKSPACE_ROOT : process.cwd()
338450
338445
  );
338451
338446
  const options = {
338452
338447
  ...defaultOptions3,
338453
338448
  ...rootPackage?.packageJson.manypkg
338454
338449
  };
338455
- const packagesByName = new Map(
338456
- packages.map((x) => [x.packageJson.name, x])
338457
- );
338450
+ const packagesByName = new Map(packages.map((x) => [x.packageJson.name, x]));
338458
338451
  console.log(`\u{1F50D} Checking ${packages.length} packages...`);
338459
338452
  if (rootPackage) {
338460
338453
  packagesByName.set(rootPackage.packageJson.name, rootPackage);
@@ -338467,7 +338460,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338467
338460
  );
338468
338461
  if (manypkgFix) {
338469
338462
  await Promise.all(
338470
- [...packagesByName].map(async ([_, workspace]) => {
338463
+ [...packagesByName].map(([_, workspace]) => {
338471
338464
  writePackage(workspace);
338472
338465
  })
338473
338466
  );
@@ -338480,9 +338473,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338480
338473
  console.log("\u{1F389} Workspace packages are valid!");
338481
338474
  }
338482
338475
  } else if (hasErrored) {
338483
- console.info(
338484
- "\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used"
338485
- );
338476
+ console.info("\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used");
338486
338477
  } else {
338487
338478
  console.log("\u{1F389} Workspace packages are valid!");
338488
338479
  }
package/biome/biome.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "files": {
7
7
  "ignoreUnknown": true,
8
8
  "ignore": [
9
+ "**/package.json/**",
9
10
  "**/.wrangler/**",
10
11
  "**/tamagui.css",
11
12
  "**/workbox*.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/linting-tools",
3
- "version": "1.34.13",
3
+ "version": "1.34.15",
4
4
  "private": false,
5
5
  "description": "⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.",
6
6
  "keywords": [
package/src/cli/index.js CHANGED
@@ -283743,11 +283743,11 @@ var init_js_yaml = __esm({
283743
283743
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js
283744
283744
  import { existsSync as existsSync2, readFileSync as readFileSync5 } from "node:fs";
283745
283745
  import { join as join5, relative as relative5 } from "node:path";
283746
- var Package2;
283746
+ var Package;
283747
283747
  var init_package = __esm({
283748
283748
  "node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js"() {
283749
283749
  init_js_yaml();
283750
- Package2 = class {
283750
+ Package = class {
283751
283751
  constructor(path37, pathWorkspace) {
283752
283752
  this.path = path37;
283753
283753
  this.pathWorkspace = pathWorkspace;
@@ -283992,7 +283992,7 @@ function versionsObjectsWithSortedPackages(versions, versionObjects) {
283992
283992
  const matchingVersionObjects = versionObjects.filter((versionObject) => versionObject.version === version3);
283993
283993
  return {
283994
283994
  version: version3,
283995
- packages: matchingVersionObjects.map((object) => object.package).sort((a, b) => Package2.comparator(a, b))
283995
+ packages: matchingVersionObjects.map((object) => object.package).sort((a, b) => Package.comparator(a, b))
283996
283996
  };
283997
283997
  });
283998
283998
  }
@@ -284400,23 +284400,23 @@ var init_globby = __esm({
284400
284400
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/workspace.js
284401
284401
  import { join as join6 } from "node:path";
284402
284402
  function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths, ignorePathPatterns) {
284403
- if (!Package2.exists(root)) {
284403
+ if (!Package.exists(root)) {
284404
284404
  throw new Error("No package.json found at provided path.");
284405
284405
  }
284406
- const package_ = new Package2(root, root);
284406
+ const package_ = new Package(root, root);
284407
284407
  if (package_.workspacePatterns.length === 0) {
284408
284408
  throw new Error("Package at provided path has no workspaces specified.");
284409
284409
  }
284410
284410
  const packages = accumulatePackages(root, ["."]);
284411
284411
  for (const ignoredPackage of ignorePackages) {
284412
- if (!Package2.some(packages, (package_2) => package_2.name === ignoredPackage)) {
284412
+ if (!Package.some(packages, (package_2) => package_2.name === ignoredPackage)) {
284413
284413
  throw new Error(`Specified option '--ignore-package ${ignoredPackage}', but no such package detected in workspace.`);
284414
284414
  }
284415
284415
  }
284416
284416
  for (const ignoredPackagePattern of ignorePackagePatterns) {
284417
284417
  if (
284418
284418
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284419
- !Package2.some(packages, (package_2) => ignoredPackagePattern.test(package_2.name))
284419
+ !Package.some(packages, (package_2) => ignoredPackagePattern.test(package_2.name))
284420
284420
  ) {
284421
284421
  throw new Error(`Specified option '--ignore-package-pattern ${String(ignoredPackagePattern)}', but no matching packages detected in workspace.`);
284422
284422
  }
@@ -284424,7 +284424,7 @@ function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths,
284424
284424
  for (const ignoredPath of ignorePaths) {
284425
284425
  if (
284426
284426
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284427
- !Package2.some(packages, (package_2) => package_2.pathRelative.includes(ignoredPath))
284427
+ !Package.some(packages, (package_2) => package_2.pathRelative.includes(ignoredPath))
284428
284428
  ) {
284429
284429
  throw new Error(`Specified option '--ignore-path ${ignoredPath}', but no matching paths detected in workspace.`);
284430
284430
  }
@@ -284432,7 +284432,7 @@ function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths,
284432
284432
  for (const ignoredPathPattern of ignorePathPatterns) {
284433
284433
  if (
284434
284434
  // eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
284435
- !Package2.some(packages, (package_2) => ignoredPathPattern.test(package_2.pathRelative))
284435
+ !Package.some(packages, (package_2) => ignoredPathPattern.test(package_2.pathRelative))
284436
284436
  ) {
284437
284437
  throw new Error(`Specified option '--ignore-path-pattern ${String(ignoredPathPattern)}', but no matching paths detected in workspace.`);
284438
284438
  }
@@ -284458,8 +284458,8 @@ function accumulatePackages(root, paths) {
284458
284458
  const results = [];
284459
284459
  for (const relativePath2 of paths) {
284460
284460
  const path37 = join6(root, relativePath2);
284461
- if (Package2.exists(path37)) {
284462
- const package_ = new Package2(path37, root);
284461
+ if (Package.exists(path37)) {
284462
+ const package_ = new Package(path37, root);
284463
284463
  results.push(
284464
284464
  // Add the current package.
284465
284465
  package_,
@@ -337985,12 +337985,7 @@ var runChecks = (allWorkspaces, rootWorkspace, shouldFix, options) => {
337985
337985
  }
337986
337986
  if (check3.type === "all") {
337987
337987
  for (const [, workspace] of allWorkspaces) {
337988
- const errors = check3.validate(
337989
- workspace,
337990
- allWorkspaces,
337991
- rootWorkspace,
337992
- options
337993
- );
337988
+ const errors = check3.validate(workspace, allWorkspaces, rootWorkspace, options);
337994
337989
  if (shouldFix && check3.fix !== void 0) {
337995
337990
  for (const error2 of errors) {
337996
337991
  const output = check3.fix(error2, options) || {
@@ -338066,15 +338061,13 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338066
338061
  process.exit(1);
338067
338062
  }
338068
338063
  const { packages, rootPackage, rootDir } = await (0, import_get_packages4.getPackages)(
338069
- process.env["STORM_WORKSPACE_ROOT"] ? process.env["STORM_WORKSPACE_ROOT"] : process.cwd()
338064
+ process.env.STORM_WORKSPACE_ROOT ? process.env.STORM_WORKSPACE_ROOT : process.cwd()
338070
338065
  );
338071
338066
  const options = {
338072
338067
  ...defaultOptions3,
338073
338068
  ...rootPackage?.packageJson.manypkg
338074
338069
  };
338075
- const packagesByName = new Map(
338076
- packages.map((x) => [x.packageJson.name, x])
338077
- );
338070
+ const packagesByName = new Map(packages.map((x) => [x.packageJson.name, x]));
338078
338071
  console.log(`\u{1F50D} Checking ${packages.length} packages...`);
338079
338072
  if (rootPackage) {
338080
338073
  packagesByName.set(rootPackage.packageJson.name, rootPackage);
@@ -338087,7 +338080,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338087
338080
  );
338088
338081
  if (manypkgFix) {
338089
338082
  await Promise.all(
338090
- [...packagesByName].map(async ([_, workspace]) => {
338083
+ [...packagesByName].map(([_, workspace]) => {
338091
338084
  writePackage(workspace);
338092
338085
  })
338093
338086
  );
@@ -338100,9 +338093,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
338100
338093
  console.log("\u{1F389} Workspace packages are valid!");
338101
338094
  }
338102
338095
  } else if (hasErrored) {
338103
- console.info(
338104
- "\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used"
338105
- );
338096
+ console.info("\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used");
338106
338097
  } else {
338107
338098
  console.log("\u{1F389} Workspace packages are valid!");
338108
338099
  }
@@ -34541,12 +34541,7 @@ var runChecks = (allWorkspaces, rootWorkspace, shouldFix, options) => {
34541
34541
  }
34542
34542
  if (check.type === "all") {
34543
34543
  for (const [, workspace] of allWorkspaces) {
34544
- const errors = check.validate(
34545
- workspace,
34546
- allWorkspaces,
34547
- rootWorkspace,
34548
- options
34549
- );
34544
+ const errors = check.validate(workspace, allWorkspaces, rootWorkspace, options);
34550
34545
  if (shouldFix && check.fix !== void 0) {
34551
34546
  for (const error2 of errors) {
34552
34547
  const output = check.fix(error2, options) || {
@@ -34622,15 +34617,13 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
34622
34617
  process.exit(1);
34623
34618
  }
34624
34619
  const { packages, rootPackage, rootDir } = await (0, import_get_packages4.getPackages)(
34625
- process.env["STORM_WORKSPACE_ROOT"] ? process.env["STORM_WORKSPACE_ROOT"] : process.cwd()
34620
+ process.env.STORM_WORKSPACE_ROOT ? process.env.STORM_WORKSPACE_ROOT : process.cwd()
34626
34621
  );
34627
34622
  const options = {
34628
34623
  ...defaultOptions2,
34629
34624
  ...rootPackage?.packageJson.manypkg
34630
34625
  };
34631
- const packagesByName = new Map(
34632
- packages.map((x) => [x.packageJson.name, x])
34633
- );
34626
+ const packagesByName = new Map(packages.map((x) => [x.packageJson.name, x]));
34634
34627
  console.log(`\u{1F50D} Checking ${packages.length} packages...`);
34635
34628
  if (rootPackage) {
34636
34629
  packagesByName.set(rootPackage.packageJson.name, rootPackage);
@@ -34643,7 +34636,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
34643
34636
  );
34644
34637
  if (manypkgFix) {
34645
34638
  await Promise.all(
34646
- [...packagesByName].map(async ([_, workspace]) => {
34639
+ [...packagesByName].map(([_, workspace]) => {
34647
34640
  writePackage(workspace);
34648
34641
  })
34649
34642
  );
@@ -34656,9 +34649,7 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
34656
34649
  console.log("\u{1F389} Workspace packages are valid!");
34657
34650
  }
34658
34651
  } else if (hasErrored) {
34659
- console.info(
34660
- "\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used"
34661
- );
34652
+ console.info("\u26A0\uFE0F The above errors may be fixable if the --manypkg-fix flag is used");
34662
34653
  } else {
34663
34654
  console.log("\u{1F389} Workspace packages are valid!");
34664
34655
  }