-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from Yoast/1.x
Release version 1.0.5
- Loading branch information
Showing
22 changed files
with
752 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: MarkDown | ||
|
||
on: | ||
# Run on all pushes and on all pull requests. | ||
push: | ||
pull_request: | ||
# Also run this workflow every Monday at 6:00. | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
markdownlint: | ||
name: 'Lint Markdown' | ||
runs-on: ubuntu-latest | ||
|
||
# Don't run the cronjob in this workflow on forks. | ||
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'Yoast') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# This action also handles the caching of the dependencies. | ||
# https://github.com/actions/setup-node | ||
- name: Set up node and enable caching of dependencies | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
# @link https://github.com/DavidAnson/markdownlint-cli2 | ||
# @link https://github.com/DavidAnson/markdownlint | ||
- name: Install Markdownlint CLI2 | ||
run: npm install -g markdownlint-cli2 | ||
|
||
# @link https://github.com/marketplace/actions/problem-matcher-for-markdownlint-cli | ||
- name: Enable showing issue in PRs | ||
uses: xt0rted/markdownlint-problem-matcher@v2 | ||
|
||
- name: Check markdown with CLI2 | ||
run: markdownlint-cli2 | ||
|
||
remark: | ||
name: 'QA Markdown' | ||
runs-on: ubuntu-latest | ||
|
||
# Don't run the cronjob in this workflow on forks. | ||
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'Yoast') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up node and enable caching of dependencies | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
# To make the command available on CLI, it needs to be installed globally. | ||
- name: Install Remark CLI globally | ||
run: npm install --global remark-cli --foreground-scripts true --fund false | ||
|
||
# To allow for creating a custom config which references rules which are included | ||
# in the presets, without having to install all rules individually, a local install | ||
# works best (and installing the presets in the first place, of course). | ||
# | ||
# Note: the first group of packages are all part of the mono "Remark lint" repo. | ||
# The second group of packages (heading-whitespace and down) are additional | ||
# "external" rules/plugins. | ||
- name: Install Remark rules locally | ||
run: > | ||
npm install --foreground-scripts true --fund false | ||
remark-lint | ||
remark-gfm | ||
remark-preset-lint-consistent | ||
remark-preset-lint-recommended | ||
remark-preset-lint-markdown-style-guide | ||
remark-lint-checkbox-content-indent | ||
remark-lint-linebreak-style | ||
remark-lint-no-empty-url | ||
remark-lint-no-heading-like-paragraph | ||
remark-lint-no-reference-like-url | ||
remark-lint-no-unneeded-full-reference-image | ||
remark-lint-no-unneeded-full-reference-link | ||
remark-lint-strikethrough-marker | ||
remark-lint-heading-whitespace | ||
remark-lint-list-item-punctuation | ||
remark-lint-match-punctuation | ||
remark-lint-no-hr-after-heading | ||
remark-lint-are-links-valid-alive | ||
remark-lint-are-links-valid-duplicate | ||
remark-validate-links | ||
- name: Run Remark-lint | ||
run: remark . --frail | ||
|
||
# @link https://github.com/reviewdog/action-remark-lint | ||
- name: Show Remark-lint annotations in PR | ||
if: ${{ failure() && github.event_name == 'pull_request' }} | ||
uses: reviewdog/action-remark-lint@v5 | ||
with: | ||
fail_on_error: true | ||
install_deps: false | ||
level: info | ||
reporter: github-pr-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/composer.lock | ||
node_modules/ | ||
vendor/ | ||
/.phpcs.xml | ||
/phpcs.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# | ||
# Configuration file for MarkdownLint-CLI2. | ||
# | ||
# Example file with all options: | ||
# https://github.com/DavidAnson/markdownlint-cli2/blob/main/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml | ||
# | ||
|
||
# Do not fix any fixable errors. | ||
fix: false | ||
|
||
# Define glob expressions to use (only valid at root). | ||
globs: | ||
- "**/*.md" | ||
- ".github/**/*.md" | ||
|
||
# Define glob expressions to ignore. | ||
ignores: | ||
- "node_modules/" | ||
- "vendor/" | ||
|
||
# Disable inline config comments. | ||
noInlineConfig: true | ||
|
||
# Disable progress on stdout (only valid at root). | ||
noProgress: false | ||
|
||
# Adjust the configuration for some built-in rules. | ||
# For full information on the options and defaults, see: | ||
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml | ||
config: | ||
###################### | ||
# Disable a few rules. | ||
###################### | ||
# MD003/heading-style/header-style - Heading style. | ||
MD003: false | ||
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines. | ||
MD031: false | ||
# MD032/blanks-around-lists - Lists should be surrounded by blank lines. | ||
MD032: false | ||
|
||
############################## | ||
# Customize a few other rules. | ||
############################## | ||
# MD004/ul-style - Unordered list style. | ||
MD004: | ||
# List style - each level has a different, but consistent symbol. | ||
style: "sublist" | ||
|
||
# MD007/ul-indent - Unordered list indentation. | ||
MD007: | ||
indent: 4 | ||
# Whether to indent the first level of the list. | ||
start_indented: false | ||
|
||
# MD012/no-multiple-blanks - Multiple consecutive blank lines. | ||
MD012: | ||
maximum: 2 | ||
|
||
# MD013/line-length - Line length. | ||
MD013: | ||
# Number of characters. No need for being too fussy. | ||
line_length: 1000 | ||
# Number of characters for headings. | ||
heading_line_length: 105 | ||
# Number of characters for code blocks. | ||
code_block_line_length: 100 | ||
# Stern length checking (applies to tables, code blocks etc which have their own max line length). | ||
stern: true | ||
|
||
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines | ||
MD022: | ||
# Blank lines below heading | ||
lines_below: false | ||
|
||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content. | ||
MD024: | ||
# Only check sibling headings. | ||
siblings_only: true | ||
|
||
# MD033/no-inline-html - Inline HTML. | ||
MD033: | ||
# Allowed elements. | ||
allowed_elements: | ||
- br | ||
|
||
# MD044/proper-names - Proper names should have the correct capitalization. | ||
MD044: | ||
# List of proper names. | ||
names: ["PHPUnit"] | ||
# Include code blocks. | ||
code_blocks: false | ||
|
||
# MD046/code-block-style - Code block style | ||
MD046: | ||
style: "fenced" | ||
|
||
# MD048/code-fence-style - Code fence style | ||
MD048: | ||
style: "backtick" | ||
|
||
# MD049/emphasis-style - Emphasis style should be consistent | ||
MD049: | ||
style: "underscore" | ||
|
||
# MD050/strong-style - Strong style should be consistent | ||
MD050: | ||
style: "asterisk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore rules for Remark. | ||
# Docs: https://github.com/unifiedjs/unified-engine/blob/HEAD/doc/ignore.md | ||
|
||
/node_modules/ | ||
/vendor/ |
Oops, something went wrong.