Change markdownlint-browser.js TypeScript configuration to generate code for "es2015" ("es6") from the default of "es3" so that generated code for for..of will behave correctly, revert previous workaround for same.

This commit is contained in:
David Anson 2022-06-02 21:42:48 -07:00
parent 36c689388f
commit cb943a8718
3 changed files with 980 additions and 1019 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
{
"compilerOptions": {
"allowJs": true,
"outDir": "unused"
"outDir": "unused",
"target": "es2015"
},
"include": [
"../lib/*.js"

View file

@ -609,13 +609,13 @@ module.exports.codeBlockAndSpanRanges = (params, lineMetadata) => {
tokenLines.join("\n"),
(code, lineIndex, columnIndex) => {
const codeLines = code.split(newLineRe);
codeLines.forEach((line, i) => {
for (const [ i, line ] of codeLines.entries()) {
exclusions.push([
token.lineNumber - 1 + lineIndex + i,
i ? 0 : columnIndex,
line.length
]);
});
}
}
);
}