@xylabs/ts-scripts-yarn3 5.1.3 → 5.1.5

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.d.ts CHANGED
@@ -113,7 +113,7 @@ interface LintPackageParams {
113
113
  verbose?: boolean;
114
114
  }
115
115
  declare const lintPackage: ({ pkg, fix }: LintParams) => Promise<number>;
116
- declare const lintAll: ({ fix }: LintParams) => Promise<void>;
116
+ declare const lintAll: ({ fix }: LintParams) => Promise<number>;
117
117
  declare const lint: ({ pkg, verbose, incremental, fix, }?: LintParams) => Promise<number>;
118
118
  declare const lintAllPackages: ({ fix, verbose, incremental, }?: LintParams) => number;
119
119
 
@@ -187,7 +187,7 @@ declare const packageDeps: () => Promise<number>;
187
187
 
188
188
  declare const packageGenDocs: () => Promise<number | undefined>;
189
189
 
190
- declare const packageLint: () => Promise<number>;
190
+ declare const packageLint: (fix?: boolean) => Promise<number>;
191
191
 
192
192
  interface PackagePublintParams {
193
193
  verbose?: boolean;
package/dist/index.mjs CHANGED
@@ -1046,12 +1046,10 @@ var lintPackage = /* @__PURE__ */ __name(async ({ pkg, fix: fix2 }) => {
1046
1046
  }, "lintPackage");
1047
1047
  var lintAll = /* @__PURE__ */ __name(async ({ fix: fix2 }) => {
1048
1048
  const workspace = yarnWorkspaces();
1049
- for (const ws of workspace) {
1050
- await lintPackage({
1051
- pkg: ws.name,
1052
- fix: fix2
1053
- });
1054
- }
1049
+ return (await Promise.all(workspace.map((ws) => lintPackage({
1050
+ pkg: ws.name,
1051
+ fix: fix2
1052
+ })))).reduce((prev, curr) => prev + curr, 0);
1055
1053
  }, "lintAll");
1056
1054
  var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental, fix: fix2 } = {}) => {
1057
1055
  return pkg ? await lintPackage({
@@ -2138,7 +2136,7 @@ async function getRootESLintConfig() {
2138
2136
  return pathToFileURL(configPath);
2139
2137
  }
2140
2138
  __name(getRootESLintConfig, "getRootESLintConfig");
2141
- var packageLint = /* @__PURE__ */ __name(async () => {
2139
+ var packageLint = /* @__PURE__ */ __name(async (fix2 = false) => {
2142
2140
  const configPath = await getRootESLintConfig();
2143
2141
  const { default: eslintConfig } = await import(configPath.href);
2144
2142
  const ignoreFolders = /* @__PURE__ */ new Set([
@@ -2161,7 +2159,8 @@ var packageLint = /* @__PURE__ */ __name(async () => {
2161
2159
  const engine = new ESLint3({
2162
2160
  baseConfig: [
2163
2161
  ...eslintConfig
2164
- ]
2162
+ ],
2163
+ fix: fix2
2165
2164
  });
2166
2165
  const ignorePatterns = [
2167
2166
  ...eslintConfig.find((cfg) => cfg.ignores)?.ignores ?? [],