Skip to content

Commit

Permalink
Added configuration values table
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Jun 23, 2024
1 parent dc7f1a5 commit c57c217
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. List any dependencies that are required for this change. Delete any other sections or text that are not relevant.

Fixes # (issue number)

Expand All @@ -17,7 +15,6 @@ Please delete options that are not relevant.

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,23 @@ dirs:
useGitIgnore: true
```

If you are defining a custom configuration, you must include the `dirs` or `files` section in the configuration file.

Following are the available configuration options:

| Option| Description| Required |
|---|---|---|
| [`files`](#files-to-check) | The list of Markdown files to check for broken links. | Yes, if `dirs` is not specified. |
| [`dirs`](#directories-to-search) | The list of directories to search for Markdown files. | Yes, if `files` is not specified. |
| [`excludedFiles`](#excluded-files) | The list of Markdown files to exclude from the link checking process. | No |
| [`excludedDirs`](#excluded-directories) | The list of directories to exclude from the link checking process. | No |
| [`baseUrl`](#base-url) | The base URL to use when checking relative links in Markdown files. | No |
| [`ignorePatterns`](#ignore-patterns) | The list of regular expressions that match URLs to be ignored during link checking. | No |
| [`replacementPatterns`](#replacement-patterns) | The list of regular expressions and replacement strings to modify URLs during link checking. | No |
| [`aliveStatusCodes`](#alive-status-codes) | The list of HTTP status codes that are considered as "alive" links. | No |
| [`useGitIgnore`](#use-gitignore) | Indicates whether to use the rules defined in the `.gitignore` file to exclude files and directories. | No |
| [`modifiedFilesOnly`](#check-modified-files-only) | Indicates whether to check only the files that have been modified in the last git commit. | No |

### Files to Check

The `files` section specifies the Markdown files that Linkspector should check for broken links. You can add the file paths you want to include in this list. For example:
Expand Down
2 changes: 1 addition & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test('linkspector should check top-level relative links in Markdown file', async
}

expect(hasErrorLinks).toBe(false)
expect(results.length).toBe(7)
expect(results.length).toBe(17)
})

test('linkspector should add back the removed duplicates when returning the results', async () => {
Expand Down

0 comments on commit c57c217

Please sign in to comment.