|
| 1 | +# Enable all rules with default settings as a baseline |
| 2 | +default: true |
| 3 | + |
| 4 | +# MD041: Ignore the frontmatter (metadata) title when checking for H1s |
| 5 | +first-line-h1: |
| 6 | + front_matter_title: '' |
| 7 | + |
| 8 | +# MD025: Ignore the frontmatter (metadata) title when checking for H1s |
| 9 | +single-h1: |
| 10 | + front_matter_title: '' |
| 11 | + |
| 12 | +# MD003: Enforce ATX style headings |
| 13 | +heading-style: |
| 14 | + style: 'atx' |
| 15 | + |
| 16 | +# MD049: Use asterisks for italics |
| 17 | +emphasis-style: |
| 18 | + style: 'asterisk' |
| 19 | + |
| 20 | +# MD050: Use asterisks for bold |
| 21 | +strong-style: |
| 22 | + style: 'asterisk' |
| 23 | + |
| 24 | +# MD004: Use hyphens for unordered lists |
| 25 | +ul-style: |
| 26 | + style: 'dash' |
| 27 | + |
| 28 | +# MD029: Always use 1. for ordered lists |
| 29 | +ol-prefix: |
| 30 | + style: 'one' |
| 31 | + |
| 32 | +# MD013: Disable line-length rule for now as it touches too many lines of doc |
| 33 | +line-length: false |
| 34 | +# line_length: 120 |
| 35 | + |
| 36 | +# MD010: Use two spaces for each tab (default was 1) |
| 37 | +no-hard-tabs: |
| 38 | + spaces_per_tab: 2 |
| 39 | + |
| 40 | +# MD031: Don't require empty lines after code blocks in lists |
| 41 | +blanks-around-fences: |
| 42 | + list_items: false |
| 43 | + |
| 44 | +# MD035: Enforce a style for horizontal rules. |
| 45 | +# Hyphens would be confusing since we use those for frontmatter (metadata) |
| 46 | +hr-style: |
| 47 | + style: '___' |
| 48 | + |
| 49 | +# MD046: Don't allow indented codeblocks |
| 50 | +code-block-style: |
| 51 | + style: 'fenced' |
| 52 | + |
| 53 | +# MD048: Use backticks for codeblocks |
| 54 | +code-fence-style: |
| 55 | + style: 'backtick' |
| 56 | + |
| 57 | +# MD040: Explicitly only allow some languages for code blocks |
| 58 | +# This helps with consistency (e.g. avoid having both yml and yaml) |
| 59 | +fenced-code-language: |
| 60 | + language_only: true |
| 61 | + allowed_languages: |
| 62 | + - 'bash' # use this instead of shell or env |
| 63 | + - 'css' |
| 64 | + - 'diff' |
| 65 | + - 'graphql' |
| 66 | + - 'html' |
| 67 | + - 'js' |
| 68 | + - 'json' |
| 69 | + - 'php' |
| 70 | + - 'scss' |
| 71 | + - 'ss' |
| 72 | + - 'sql' |
| 73 | + - 'text' |
| 74 | + - 'xml' |
| 75 | + - 'yml' |
| 76 | + |
| 77 | +# MD044: Disable in favour of the enhanced version which ignores custom anchors for headings |
| 78 | +# markdownlint-rule-enhanced-proper-names: Enforces capitalisation for specific names |
| 79 | +proper-names: off |
| 80 | +enhanced-proper-names: |
| 81 | + code_blocks: false |
| 82 | + heading_id: false |
| 83 | + names: |
| 84 | + - 'API' |
| 85 | + - 'type/api-break' # the GitHub label |
| 86 | + - 'CI' |
| 87 | + - 'CMS' |
| 88 | + - '/cms' # e.g. "silverstripe/cms" |
| 89 | + - '-cms' # e.g. "silverstripe/recipe-cms" |
| 90 | + - 'CSS' |
| 91 | + - 'GitHub' |
| 92 | + - 'GraphQL' |
| 93 | + - '/graphql' # e.g. "silverstripe/graphql" |
| 94 | + - 'HTTP' |
| 95 | + - 'JavaScript' |
| 96 | + - 'JS' |
| 97 | + - '.js' # e.g. "Node.js" |
| 98 | + - 'jQuery' |
| 99 | + - 'ORM' |
| 100 | + - 'PHP' |
| 101 | + - 'php-' # e.g. "php-intl extension" |
| 102 | + - 'SCSS' |
| 103 | + - 'Silverstripe' |
| 104 | + - 'silverstripe/' # e.g. "silverstripe/framework" |
| 105 | + - 'silverstripe-' # e.g. "silverstripe-vendormodule" |
| 106 | + - '@silverstripe.org' |
| 107 | + - 'TinyMCE' |
| 108 | + - 'UI' |
| 109 | + - 'URL' |
| 110 | + - 'YAML' |
| 111 | + |
| 112 | +# markdownlint-rule-title-case-style: Use sentence-style headings |
| 113 | +title-case-style: |
| 114 | + case: 'sentence' |
| 115 | + # commas in the following list are intentional and necessary since the plugin makes no distinction |
| 116 | + # between words and punctuation |
| 117 | + ignore: |
| 118 | + - 'Apache' |
| 119 | + - 'APIs' |
| 120 | + - 'Composer' |
| 121 | + - 'CTE' |
| 122 | + - 'GitHub' |
| 123 | + - 'GraphQL' |
| 124 | + - 'Huntr' |
| 125 | + - 'JavaScript' |
| 126 | + - 'I' |
| 127 | + - 'InnoDB' |
| 128 | + - 'Git' |
| 129 | + - 'jQuery' |
| 130 | + - 'jQuery,' |
| 131 | + - 'Lighttpd' |
| 132 | + - 'MyISAM' |
| 133 | + - 'MySQL' |
| 134 | + - 'Nginx' |
| 135 | + - 'Nginx,' |
| 136 | + - 'PHPUnit' |
| 137 | + - 'RFCs' |
| 138 | + - 'Silverstripe' |
| 139 | + - 'TinyMCE' |
| 140 | + - 'Transifex' |
| 141 | + - 'URLs' |
| 142 | + - 'WebP' |
| 143 | + |
| 144 | +# MD033: Allow specific HTML tags |
| 145 | +no-inline-html: |
| 146 | + allowed_elements: |
| 147 | + # br is necessary for new lines in tables |
| 148 | + - 'br' |
| 149 | + # accordians are okay |
| 150 | + - 'details' |
| 151 | + - 'summary' |
| 152 | + # description lists are okay |
| 153 | + - 'dl' |
| 154 | + - 'dd' |
| 155 | + - 'dt' |
0 commit comments