You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add lintOutsideWorkspace setting to limit linting to workspace files
Adds an opt-in markdownlint.lintOutsideWorkspace setting (boolean,
default true to preserve current behavior). When set to false, Markdown
files opened from outside the current workspace are no longer linted,
restricting diagnostics to files inside an open workspace folder.
Documents not stored on disk (such as untitled documents) are always
linted, and explicit actions such as the markdownlint.fixAll command and
document formatting continue to work regardless of this setting.
Implements #440.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,6 +362,18 @@ For information about authoring custom rules, see [the `markdownlint` documentat
362
362
> In `markdownlint-cli2` configuration files, the `modulePaths` property can be used in conjunction to specify one or more additional paths for resolving module references.
363
363
> This can be used to work around the VS Code limitation that globally-installed Node modules are unavailable by setting `modulePaths` to the location of the global module path (typically `/usr/local/lib` on macOS/Linux or `~/AppData/Roaming/npm` on Windows).
364
364
365
+
### markdownlint.lintOutsideWorkspace
366
+
367
+
By default, `markdownlint` lints every open Markdown document, including files that are not part of the current workspace. Setting this property to `false` restricts linting to files inside an open workspace folder, so Markdown files opened from elsewhere on the file system are not linted:
368
+
369
+
```json
370
+
{
371
+
"markdownlint.lintOutsideWorkspace": false
372
+
}
373
+
```
374
+
375
+
> **Note**: Documents that are not stored on disk (such as untitled documents) are always linted. Explicit actions such as the `markdownlint.fixAll` command and document formatting continue to work regardless of this setting.
376
+
365
377
### markdownlint.lintWorkspaceGlobs
366
378
367
379
This property specifies the list of globs used when linting a workspace with the `markdownlint.lintWorkspace` command.
Copy file name to clipboardExpand all lines: package.json
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
"displayName": "markdownlint",
4
4
"description": "Markdown linting and style checking for Visual Studio Code",
5
5
"icon": "images/markdownlint-128.png",
6
-
"version": "0.61.2",
6
+
"version": "0.62.0",
7
7
"author": "David Anson (https://dlaa.me/)",
8
8
"publisher": "DavidAnson",
9
9
"sponsor": {
@@ -344,6 +344,12 @@
344
344
],
345
345
"default": false
346
346
},
347
+
"markdownlint.lintOutsideWorkspace": {
348
+
"description": "Whether to lint Markdown files that are open but not part of the current workspace. Set to false to only lint files within the workspace.",
349
+
"scope": "resource",
350
+
"type": "boolean",
351
+
"default": true
352
+
},
347
353
"markdownlint.lintWorkspaceGlobs": {
348
354
"description": "Array of glob expressions to include or ignore when linting a workspace with the \"lintWorkspace\" command.",
0 commit comments