@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/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +7 -8
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint.mjs +4 -6
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/package/index.mjs +3 -2
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +3 -2
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +89 -0
- package/dist/bin/package/fix.mjs.map +1 -0
- package/dist/bin/package/lint.mjs +3 -2
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +7 -8
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +5 -4
- package/src/actions/lint.ts +2 -3
- package/src/actions/package/lint.ts +2 -2
- package/src/bin/package/fix.ts +16 -0
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<
|
|
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
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
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 ?? [],
|