Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dot option to treat dots as normal characters #167

Merged
merged 4 commits into from Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -36,6 +36,7 @@ markdownlint --help
-i, --ignore [file|directory|glob] file(s) to ignore/exclude
-p, --ignore-path [file] path to file with ignore pattern(s)
-r, --rules [file|directory|glob|package] custom rule files
-d, --dot include files/folders with a dot (for example `.github`)
```

### Globbing
Expand Down
6 changes: 4 additions & 2 deletions markdownlint.js
Expand Up @@ -78,7 +78,8 @@ function readConfiguration(args) {

function prepareFileList(files, fileExtensions, previousResults) {
const globOptions = {
nodir: true
nodir: true,
dot: options.dot != null ? true : false
theoludwig marked this conversation as resolved.
Show resolved Hide resolved
};
let extensionGlobPart = '*.';
if (fileExtensions.length === 1) {
Expand Down Expand Up @@ -193,7 +194,8 @@ program
.option('-c, --config [configFile]', 'configuration file (JSON, JSONC, JS, or YAML)')
.option('-i, --ignore [file|directory|glob]', 'file(s) to ignore/exclude', concatArray, [])
.option('-p, --ignore-path [file]', 'path to file with ignore pattern(s)')
.option('-r, --rules [file|directory|glob|package]', 'custom rule files', concatArray, []);
.option('-r, --rules [file|directory|glob|package]', 'custom rule files', concatArray, [])
.option('-d, --dot', 'include files/folders with a dot (for example `.github`)');

program.parse(process.argv);

Expand Down