Skip to content

Commit

Permalink
Add opinionated .markdownlint.json from markdownlint-cli2 project, re…
Browse files Browse the repository at this point in the history
…flow README.md.
  • Loading branch information
DavidAnson committed Jun 11, 2023
1 parent 05f76f9 commit 1b8f59d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 12 deletions.
49 changes: 49 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"code-block-style": {
"style": "fenced"
},
"code-fence-style": {
"style": "backtick"
},
"emphasis-style": {
"style": "asterisk"
},
"fenced-code-language": {
"allowed_languages": [
"yaml"
],
"language_only": true
},
"heading-style": {
"style": "atx"
},
"hr-style": {
"style": "---"
},
"line-length": {
"strict": true,
"code_blocks": false
},
"no-duplicate-heading": {
"siblings_only": true
},
"ol-prefix": {
"style": "ordered"
},
"proper-names": {
"code_blocks": false,
"names": [
"CommonMark",
"JavaScript",
"Markdown",
"markdownlint",
"markdownlint-cli2"
]
},
"strong-style": {
"style": "asterisk"
},
"ul-style": {
"style": "dash"
}
}
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# markdownlint-cli2-action

> A GitHub Action to run the [`markdownlint-cli2`][markdownlint-cli2] tool
for linting [Markdown][markdown]/[CommonMark][commonmark] files with
> A GitHub Action to run the [`markdownlint-cli2`][markdownlint-cli2] tool for
linting [Markdown][markdown]/[CommonMark][commonmark] files with
[`markdownlint`][markdownlint]

`markdownlint-cli2` has extensive support for configuring options and
disabling or customizing `markdownlint` rules. See the
`markdownlint-cli2` has extensive support for configuring options and disabling
or customizing `markdownlint` rules. See the
[`markdownlint-cli2` README][markdownlint-cli2] for more information.
`markdownlint` includes a wide variety of rules for analyzing and improving
Markdown content. See the [`markdownlint` README][markdownlint] for more
Expand All @@ -19,20 +19,20 @@ Command to run (unset, `fix`, or `config`)

If unspecified or `""`, the `markdownlint-cli2` command is run.

If set to `fix`, the `markdownlint-cli2-fix` command is run and supported
issues will be fixed automatically.
If set to `fix`, the `markdownlint-cli2-fix` command is run and supported issues
will be fixed automatically.

If set to `config`, the `markdownlint-cli2-config` command is run and the
first element of `globs` should specify a supported configuration file.
If set to `config`, the `markdownlint-cli2-config` command is run and the first
element of `globs` should specify a supported configuration file.

For more detail: [documentation for `markdownlint-cli2`][command-line].

### globs (optional)

Glob expression(s) of files to lint (newline-delimited by default)

The default `*.{md,markdown}` lints all Markdown files in the base directory
of a project.
The default `*.{md,markdown}` lints all Markdown files in the base directory of
a project.

For more detail: [glob syntax in `markdownlint-cli2`][glob-syntax].

Expand Down Expand Up @@ -114,8 +114,8 @@ See [`example.yml`][example-yml] for a simple GitHub workflow that uses
`markdownlint-cli2-action`.

See [`changed.yml`][changed-yml] for a GitHub workflow that lints only the
Markdown files that changed in the most recent commit (useful for Pull
Requests and/or gradually introducing linting rules to a new repository).
Markdown files that changed in the most recent commit (useful for Pull Requests
and/or gradually introducing linting rules to a new repository).

[changed-yml]: .github/workflows/changed.yml
[command-line]: https://github.com/DavidAnson/markdownlint-cli2#command-line
Expand Down

0 comments on commit 1b8f59d

Please sign in to comment.