Skip to content

Commit

Permalink
Update and synchronize default globs in markdownlint.lintWorkspaceGlo…
Browse files Browse the repository at this point in the history
…bs, improve relevant documentation (fixes #351).
  • Loading branch information
DavidAnson committed Nov 17, 2024
1 parent 90f94fb commit f29d87a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,23 @@ For information about authoring custom rules, see [the `markdownlint` documentat
### markdownlint.lintWorkspaceGlobs

The standard globs used when linting a workspace should match VS Code's default concept of "Markdown files that matter":
The globs used when linting a workspace with the `markdownlint.lintWorkspace` command match VS Code's concept of "Markdown files that matter":

```jsonc
[
// Source: https://github.com/microsoft/vscode/blob/main/extensions/markdown-basics/package.json
"**/*.{md,mkd,mdwn,mdown,markdown,markdn,mdtxt,mdtext,workbook}",
// Source: https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/search/browser/search.contribution.ts
"!**/node_modules",
"!**/*.code-search",
"!**/bower_components",
"!**/node_modules",
// Additional exclusions
"!**/.git"
"!**/.git",
"!**/vendor"
]
```

This list can be customized at workspace or user scope to include and exclude additional files and directories.
This list can be customized at workspace and user scope to include or exclude additional files and directories.
For more information about syntax, see the ["Command Line" section of the markdownlint-cli2 documentation](https://github.com/DavidAnson/markdownlint-cli2#command-line).

## Suppress
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,11 @@
},
"default": [
"**/*.{md,mkd,mdwn,mdown,markdown,markdn,mdtxt,mdtext,workbook}",
"!**/*.code-search",
"!**/bower_components",
"!**/node_modules",
"!**/vendor",
"!**/.git"
"!**/.git",
"!**/vendor"
]
},
"markdownlint.run": {
Expand Down

0 comments on commit f29d87a

Please sign in to comment.