review: format and regenerate

This commit is contained in:
Fernandez Ludovic 2023-06-12 09:36:17 +02:00
parent 8d9a4ff3ee
commit f1a5bd1222
3 changed files with 13 additions and 13 deletions

View file

@ -66581,12 +66581,12 @@ function runLint(lintPath, patchPath) {
.filter((arg) => arg.startsWith(`-`)) .filter((arg) => arg.startsWith(`-`))
.map((arg) => arg.replace(/^-+/, ``)) .map((arg) => arg.replace(/^-+/, ``))
.map((arg) => arg.split(/=(.*)/, 2)) .map((arg) => arg.split(/=(.*)/, 2))
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : '']); .map(([key, value]) => [key, value !== null && value !== void 0 ? value : ""]);
const userArgsMap = new Map(userArgsList); const userArgsMap = new Map(userArgsList);
const userArgNames = new Set(userArgsList.map(([key, value]) => key)); const userArgNames = new Set(userArgsList.map(([key, value]) => key));
const formats = userArgsMap.get('out-format'); const formats = userArgsMap.get("out-format");
if (formats) { if (formats) {
if (formats.includes('github-actions')) { if (formats.includes("github-actions")) {
addedArgs.push(`--out-format=${formats}`); addedArgs.push(`--out-format=${formats}`);
} }
else { else {

6
dist/run/index.js vendored
View file

@ -66581,12 +66581,12 @@ function runLint(lintPath, patchPath) {
.filter((arg) => arg.startsWith(`-`)) .filter((arg) => arg.startsWith(`-`))
.map((arg) => arg.replace(/^-+/, ``)) .map((arg) => arg.replace(/^-+/, ``))
.map((arg) => arg.split(/=(.*)/, 2)) .map((arg) => arg.split(/=(.*)/, 2))
.map(([key, value]) => [key, value !== null && value !== void 0 ? value : '']); .map(([key, value]) => [key, value !== null && value !== void 0 ? value : ""]);
const userArgsMap = new Map(userArgsList); const userArgsMap = new Map(userArgsList);
const userArgNames = new Set(userArgsList.map(([key, value]) => key)); const userArgNames = new Set(userArgsList.map(([key, value]) => key));
const formats = userArgsMap.get('out-format'); const formats = userArgsMap.get("out-format");
if (formats) { if (formats) {
if (formats.includes('github-actions')) { if (formats.includes("github-actions")) {
addedArgs.push(`--out-format=${formats}`); addedArgs.push(`--out-format=${formats}`);
} }
else { else {

View file

@ -125,15 +125,15 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
.filter((arg) => arg.startsWith(`-`)) .filter((arg) => arg.startsWith(`-`))
.map((arg) => arg.replace(/^-+/, ``)) .map((arg) => arg.replace(/^-+/, ``))
.map((arg) => arg.split(/=(.*)/, 2)) .map((arg) => arg.split(/=(.*)/, 2))
.map<[string, string]>(([key, value]) => [key, value ?? '']) .map<[string, string]>(([key, value]) => [key, value ?? ""])
const userArgsMap = new Map<string, string>(userArgsList)
const userArgNames = new Set<string>(userArgsList.map(([key, value]) => key));
const formats = userArgsMap.get('out-format') const userArgsMap = new Map<string, string>(userArgsList)
const userArgNames = new Set<string>(userArgsList.map(([key, value]) => key))
const formats = userArgsMap.get("out-format")
if (formats) { if (formats) {
if (formats.includes('github-actions')) { if (formats.includes("github-actions")) {
addedArgs.push(`--out-format=${formats}`); addedArgs.push(`--out-format=${formats}`)
} else { } else {
addedArgs.push(`--out-format=github-actions,${formats}`) addedArgs.push(`--out-format=github-actions,${formats}`)
} }