@xylabs/ts-scripts-yarn3 5.1.1 → 5.1.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/dist/actions/index.mjs +24 -14
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint-clean.mjs +16 -7
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint.mjs +24 -14
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs +16 -7
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs +16 -7
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +24 -14
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +16 -7
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +16 -7
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +16 -7
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/lint.ts +19 -13
package/dist/xy/xy.mjs
CHANGED
|
@@ -1131,28 +1131,31 @@ var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
}, "dumpMessages");
|
|
1134
|
-
var lintPackage = /* @__PURE__ */ __name(async ({ pkg }) => {
|
|
1134
|
+
var lintPackage = /* @__PURE__ */ __name(async ({ pkg, fix: fix2 }) => {
|
|
1135
1135
|
const workspace = yarnWorkspaces().find((workspace2) => workspace2.name === pkg);
|
|
1136
1136
|
if (!workspace) {
|
|
1137
1137
|
console.error(chalk16.red(`Unable to locate package [${chalk16.magenta(pkg)}]`));
|
|
1138
1138
|
process.exit(1);
|
|
1139
1139
|
}
|
|
1140
1140
|
const engine = new ESLint2({
|
|
1141
|
-
cache: true
|
|
1141
|
+
cache: true,
|
|
1142
|
+
fix: fix2
|
|
1142
1143
|
});
|
|
1143
1144
|
const lintResults = await engine.lintFiles(workspace.location);
|
|
1144
1145
|
dumpMessages(lintResults);
|
|
1145
1146
|
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
1146
1147
|
}, "lintPackage");
|
|
1147
|
-
var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental } = {}) => {
|
|
1148
|
+
var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
1148
1149
|
return pkg ? await lintPackage({
|
|
1149
|
-
pkg
|
|
1150
|
+
pkg,
|
|
1151
|
+
fix: fix2
|
|
1150
1152
|
}) : lintAllPackages({
|
|
1151
1153
|
verbose,
|
|
1152
|
-
incremental
|
|
1154
|
+
incremental,
|
|
1155
|
+
fix: fix2
|
|
1153
1156
|
});
|
|
1154
1157
|
}, "lint");
|
|
1155
|
-
var lintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
|
|
1158
|
+
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incremental } = {}) => {
|
|
1156
1159
|
console.log(chalk16.gray("Linting [All-Packages]"));
|
|
1157
1160
|
const start = Date.now();
|
|
1158
1161
|
const verboseOptions = verbose ? [
|
|
@@ -1160,6 +1163,11 @@ var lintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } =
|
|
|
1160
1163
|
] : [
|
|
1161
1164
|
"--no-verbose"
|
|
1162
1165
|
];
|
|
1166
|
+
const fixOptions = fix2 ? [
|
|
1167
|
+
"--fix"
|
|
1168
|
+
] : [
|
|
1169
|
+
""
|
|
1170
|
+
];
|
|
1163
1171
|
const incrementalOptions = incremental ? [
|
|
1164
1172
|
"--since",
|
|
1165
1173
|
"-Apt"
|
|
@@ -1176,7 +1184,8 @@ var lintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } =
|
|
|
1176
1184
|
...verboseOptions,
|
|
1177
1185
|
...incrementalOptions,
|
|
1178
1186
|
"run",
|
|
1179
|
-
"package-lint"
|
|
1187
|
+
"package-lint",
|
|
1188
|
+
...fixOptions
|
|
1180
1189
|
]
|
|
1181
1190
|
]
|
|
1182
1191
|
]);
|