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:
parent
37f5881882
commit
ca3145a547
10 changed files with 700 additions and 176 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue