mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Address new code analysis issues from previous commit.
Some checks failed
Checkers / linkcheck (push) Has been cancelled
Checkers / spellcheck (push) Has been cancelled
CI / build (20, macos-latest) (push) Has been cancelled
CI / build (20, ubuntu-latest) (push) Has been cancelled
CI / build (20, windows-latest) (push) Has been cancelled
CI / build (22, macos-latest) (push) Has been cancelled
CI / build (22, ubuntu-latest) (push) Has been cancelled
CI / build (22, windows-latest) (push) Has been cancelled
CI / build (24, macos-latest) (push) Has been cancelled
CI / build (24, ubuntu-latest) (push) Has been cancelled
CI / build (24, windows-latest) (push) Has been cancelled
CI / pnpm (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
TestRepos / build (latest, ubuntu-latest) (push) Has been cancelled
UpdateTestRepos / update (push) Has been cancelled
Some checks failed
Checkers / linkcheck (push) Has been cancelled
Checkers / spellcheck (push) Has been cancelled
CI / build (20, macos-latest) (push) Has been cancelled
CI / build (20, ubuntu-latest) (push) Has been cancelled
CI / build (20, windows-latest) (push) Has been cancelled
CI / build (22, macos-latest) (push) Has been cancelled
CI / build (22, ubuntu-latest) (push) Has been cancelled
CI / build (22, windows-latest) (push) Has been cancelled
CI / build (24, macos-latest) (push) Has been cancelled
CI / build (24, ubuntu-latest) (push) Has been cancelled
CI / build (24, windows-latest) (push) Has been cancelled
CI / pnpm (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
TestRepos / build (latest, ubuntu-latest) (push) Has been cancelled
UpdateTestRepos / update (push) Has been cancelled
This commit is contained in:
parent
3a5a59a422
commit
d9eedde37d
6 changed files with 20 additions and 7 deletions
|
|
@ -1216,16 +1216,18 @@ test("customRulesOnErrorBad", (t) => {
|
|||
]) {
|
||||
const { propertyName, subPropertyName, propertyValues } = testCase;
|
||||
for (const propertyValue of propertyValues) {
|
||||
/** @type {Object<string, any>} */
|
||||
const badObject = {
|
||||
"lineNumber": 1
|
||||
};
|
||||
let propertyNames = null;
|
||||
if (subPropertyName) {
|
||||
// @ts-ignore
|
||||
badObject[propertyName] = {};
|
||||
// @ts-ignore
|
||||
badObject[propertyName][subPropertyName] = propertyValue;
|
||||
propertyNames = `${propertyName}.${subPropertyName}`;
|
||||
} else {
|
||||
// @ts-ignore
|
||||
badObject[propertyName] = propertyValue;
|
||||
propertyNames = propertyName;
|
||||
}
|
||||
|
|
@ -1290,16 +1292,18 @@ test("customRulesOnErrorInvalid", (t) => {
|
|||
]) {
|
||||
const { propertyName, subPropertyName, propertyValues } = testCase;
|
||||
for (const propertyValue of propertyValues) {
|
||||
/** @type {Object<string, any>} */
|
||||
const badObject = {
|
||||
"lineNumber": 1
|
||||
};
|
||||
let propertyNames = null;
|
||||
if (subPropertyName) {
|
||||
// @ts-ignore
|
||||
badObject[propertyName] = {};
|
||||
// @ts-ignore
|
||||
badObject[propertyName][subPropertyName] = propertyValue;
|
||||
propertyNames = `${propertyName}.${subPropertyName}`;
|
||||
} else {
|
||||
// @ts-ignore
|
||||
badObject[propertyName] = propertyValue;
|
||||
propertyNames = propertyName;
|
||||
}
|
||||
|
|
@ -1370,14 +1374,16 @@ test("customRulesOnErrorValid", (t) => {
|
|||
]) {
|
||||
const { propertyName, subPropertyName, propertyValues } = testCase;
|
||||
for (const propertyValue of propertyValues) {
|
||||
/** @type {Object<string, any>} */
|
||||
const goodObject = {
|
||||
"lineNumber": 1
|
||||
};
|
||||
if (subPropertyName) {
|
||||
// @ts-ignore
|
||||
goodObject[propertyName] = {};
|
||||
// @ts-ignore
|
||||
goodObject[propertyName][subPropertyName] = propertyValue;
|
||||
} else {
|
||||
// @ts-ignore
|
||||
goodObject[propertyName] = propertyValue;
|
||||
}
|
||||
/** @type {import("markdownlint").Options} */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue