mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-11-23 22:56:22 +01:00
Convert annotation properties startLine/startColumn to the correct type, omit if not present.
fix
This commit is contained in:
parent
c3b2de4a57
commit
744f913a12
2 changed files with 16 additions and 8 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -31671,17 +31671,21 @@ const logError = (error) => {
|
||||||
const [
|
const [
|
||||||
,
|
,
|
||||||
file,
|
file,
|
||||||
startLine,
|
startLineString,
|
||||||
startColumn,
|
startColumnString,
|
||||||
,
|
,
|
||||||
title
|
title
|
||||||
] = match;
|
] = match;
|
||||||
|
const startLine = Number(startLineString);
|
||||||
annotation = {
|
annotation = {
|
||||||
title,
|
title,
|
||||||
file,
|
file,
|
||||||
startLine,
|
startLine
|
||||||
startColumn
|
|
||||||
};
|
};
|
||||||
|
if (startColumnString) {
|
||||||
|
// @ts-ignore
|
||||||
|
annotation.startColumn = Number(startColumnString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
core.error(error, annotation);
|
core.error(error, annotation);
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,17 +14,21 @@ const logError = (error) => {
|
||||||
const [
|
const [
|
||||||
,
|
,
|
||||||
file,
|
file,
|
||||||
startLine,
|
startLineString,
|
||||||
startColumn,
|
startColumnString,
|
||||||
,
|
,
|
||||||
title
|
title
|
||||||
] = match;
|
] = match;
|
||||||
|
const startLine = Number(startLineString);
|
||||||
annotation = {
|
annotation = {
|
||||||
title,
|
title,
|
||||||
file,
|
file,
|
||||||
startLine,
|
startLine
|
||||||
startColumn
|
|
||||||
};
|
};
|
||||||
|
if (startColumnString) {
|
||||||
|
// @ts-ignore
|
||||||
|
annotation.startColumn = Number(startColumnString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
core.error(error, annotation);
|
core.error(error, annotation);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue