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