chore: use vscode-markdown-languageservice for link linting (#36901)

* chore: use vscode-markdown-languageservice for docs link linting

* docs: make links relative
This commit is contained in:
David Sanders 2023-01-24 00:00:25 -08:00 committed by GitHub
parent 37f5881882
commit ca3145a547
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 700 additions and 176 deletions

View file

@ -5,11 +5,10 @@ const { GitProcess } = require('dugite');
const childProcess = require('child_process');
const { ESLint } = require('eslint');
const fs = require('fs');
const klaw = require('klaw');
const minimist = require('minimist');
const path = require('path');
const { chunkFilenames } = require('./lib/utils');
const { chunkFilenames, findMatchingFiles } = require('./lib/utils');
const ELECTRON_ROOT = path.normalize(path.dirname(__dirname));
const SOURCE_ROOT = path.resolve(ELECTRON_ROOT, '..');
@ -279,21 +278,6 @@ async function findChangedFiles (top) {
return new Set(absolutePaths);
}
async function findMatchingFiles (top, test) {
return new Promise((resolve, reject) => {
const matches = [];
klaw(top, {
filter: f => path.basename(f) !== '.bin'
})
.on('end', () => resolve(matches))
.on('data', item => {
if (test(item.path)) {
matches.push(item.path);
}
});
});
}
async function findFiles (args, linter) {
let filenames = [];
let includelist = null;