|
1 | 1 | // @ts-check
|
2 | 2 |
|
3 |
| -"use strict"; |
4 |
| - |
5 | 3 | // Minimal imports (requires that may not be needed are inlined to reduce startup cost)
|
| 4 | +// eslint-disable-next-line n/no-missing-import |
6 | 5 | import vscode from "vscode";
|
7 | 6 | import os from "node:os";
|
8 | 7 | import path from "node:path";
|
9 | 8 | import { promisify } from "node:util";
|
10 | 9 | import { "main" as markdownlintCli2 } from "markdownlint-cli2";
|
11 | 10 | import { applyFix, applyFixes } from "markdownlint-cli2/markdownlint";
|
12 | 11 | import { readConfig } from "markdownlint-cli2/markdownlint/promise";
|
13 |
| -// eslint-disable-next-line unicorn/no-keyword-prefix |
14 | 12 | import helpers from "markdownlint-cli2/markdownlint/helpers";
|
| 13 | +// eslint-disable-next-line unicorn/no-keyword-prefix |
15 | 14 | const { expandTildePath, newLineRe } = helpers;
|
16 | 15 | import parsers from "markdownlint-cli2/parsers";
|
17 | 16 |
|
@@ -366,11 +365,11 @@ async function getConfig (fs, configuration, uri) {
|
366 | 365 | }
|
367 | 366 |
|
368 | 367 | // Returns an array of args entries for the config path for the user/workspace
|
369 |
| -function getConfigFileArgs (configuration) { |
| 368 | +function getConfigFileArguments (configuration) { |
370 | 369 | const configFile = configuration.get(sectionConfigFile);
|
371 | 370 | /** @type {string[]} */
|
372 |
| - const configFileArgs = (configFile?.length > 0) ? [ "--config", expandTildePath(configFile, os) ] : []; |
373 |
| - return configFileArgs; |
| 371 | + const configFileArguments = (configFile?.length > 0) ? [ "--config", expandTildePath(configFile, os) ] : []; |
| 372 | + return configFileArguments; |
374 | 373 | }
|
375 | 374 |
|
376 | 375 | // Returns custom rule configuration for user/workspace
|
@@ -437,7 +436,7 @@ async function markdownlintWrapper (document) {
|
437 | 436 | posixPath(workspaceFolderUri.fsPath);
|
438 | 437 | const argv = independentDocument ?
|
439 | 438 | [] :
|
440 |
| - [ `:${name}`, ...getConfigFileArgs(configuration) ]; |
| 439 | + [ `:${name}`, ...getConfigFileArguments(configuration) ]; |
441 | 440 | const contents = independentDocument ?
|
442 | 441 | "nonFileContents" :
|
443 | 442 | "fileContents";
|
|
0 commit comments