|
1 | 1 | 'use strict';
|
2 |
| -const path = require('path'); |
3 | 2 |
|
4 |
| -// Rules per remark-lint 4.0.2 |
| 3 | +exports.plugins = [ |
| 4 | + require('remark-lint'), |
5 | 5 |
|
6 |
| -module.exports = { |
7 |
| - reset: true, |
8 |
| - 'blockquote-indentation': 2, |
9 |
| - 'checkbox-character-style': { |
| 6 | + // Official plugins |
| 7 | + [require('remark-lint-blockquote-indentation'), 2], |
| 8 | + [require('remark-lint-checkbox-character-style'), { |
10 | 9 | checked: 'x',
|
11 | 10 | unchecked: ' '
|
12 |
| - }, |
13 |
| - 'checkbox-content-indent': true, |
14 |
| - 'code-block-style': 'fenced', |
15 |
| - 'definition-case': true, |
16 |
| - 'definition-spacing': true, |
17 |
| - 'emphasis-marker': '*', |
18 |
| - 'fenced-code-marker': '`', |
19 |
| - 'file-extension': true, |
20 |
| - 'final-newline': true, |
21 |
| - // TODO: because of https://github.com/wooorm/remark-lint/issues/77 |
22 |
| - // 'first-heading-level': 1, |
23 |
| - 'hard-break-spaces': true, |
24 |
| - 'heading-style': 'atx', |
25 |
| - 'link-title-style': '\'', |
26 |
| - 'list-item-bullet-indent': true, |
27 |
| - 'list-item-content-indent': true, |
28 |
| - 'list-item-indent': 'space', |
29 |
| - // TODO: because of https://github.com/wooorm/remark-lint/issues/78 |
30 |
| - // 'list-item-spacing': true, |
31 |
| - 'no-auto-link-without-protocol': true, |
32 |
| - 'no-blockquote-without-caret': true, |
33 |
| - 'no-duplicate-definitions': true, |
34 |
| - // TODO: because of https://github.com/wooorm/remark-lint/issues/84 |
35 |
| - // 'no-duplicate-headings': true, |
36 |
| - 'no-emphasis-as-heading': true, |
37 |
| - 'no-file-name-articles': true, |
38 |
| - 'no-file-name-consecutive-dashes': true, |
39 |
| - 'no-file-name-irregular-characters': true, |
40 |
| - 'no-file-name-mixed-case': true, |
41 |
| - 'no-file-name-outer-dashes': true, |
42 |
| - 'no-heading-content-indent': true, |
43 |
| - 'no-heading-indent': true, |
44 |
| - 'no-heading-punctuation': true, |
45 |
| - 'no-inline-padding': true, |
46 |
| - 'no-literal-urls': true, |
47 |
| - // TODO: because of https://github.com/wooorm/remark-lint/issues/79 |
48 |
| - // 'no-missing-blank-lines': true, |
49 |
| - 'no-multiple-toplevel-headings': 1, |
50 |
| - 'no-shell-dollars': true, |
51 |
| - 'no-table-indentation': true, |
52 |
| - 'no-undefined-references': true, |
53 |
| - 'no-unused-definitions': true, |
54 |
| - 'ordered-list-marker-style': '.', |
55 |
| - 'ordered-list-marker-value': 'ordered', |
56 |
| - 'rule-style': '---', |
57 |
| - 'strong-marker': '*', |
58 |
| - 'table-cell-padding': 'padded', |
59 |
| - 'table-pipe-alignment': true, |
60 |
| - 'table-pipes': true, |
61 |
| - 'unordered-list-marker-style': '-', |
| 11 | + }], |
| 12 | + require('remark-lint-checkbox-content-indent'), |
| 13 | + [require('remark-lint-code-block-style'), 'fenced'], |
| 14 | + require('remark-lint-definition-case'), |
| 15 | + require('remark-lint-definition-spacing'), |
| 16 | + [require('remark-lint-emphasis-marker'), '*'], |
| 17 | + [require('remark-lint-fenced-code-marker'), '`'], |
| 18 | + require('remark-lint-file-extension'), |
| 19 | + require('remark-lint-final-newline'), |
| 20 | + require('remark-lint-hard-break-spaces'), |
| 21 | + [require('remark-lint-heading-style'), 'atx'], |
| 22 | + [require('remark-lint-link-title-style'), '\''], |
| 23 | + require('remark-lint-list-item-bullet-indent'), |
| 24 | + require('remark-lint-list-item-content-indent'), |
| 25 | + [require('remark-lint-list-item-indent'), 'space'], |
| 26 | + require('remark-lint-no-auto-link-without-protocol'), |
| 27 | + require('remark-lint-no-blockquote-without-marker'), |
| 28 | + require('remark-lint-no-emphasis-as-heading'), |
| 29 | + require('remark-lint-no-file-name-articles'), |
| 30 | + require('remark-lint-no-file-name-consecutive-dashes'), |
| 31 | + require('remark-lint-no-file-name-irregular-characters'), |
| 32 | + require('remark-lint-no-file-name-mixed-case'), |
| 33 | + require('remark-lint-no-file-name-outer-dashes'), |
| 34 | + require('remark-lint-no-heading-content-indent'), |
| 35 | + require('remark-lint-no-heading-indent'), |
| 36 | + require('remark-lint-no-heading-punctuation'), |
| 37 | + require('remark-lint-no-inline-padding'), |
| 38 | + require('remark-lint-no-literal-urls'), |
| 39 | + [require('remark-lint-no-multiple-toplevel-headings'), 1], |
| 40 | + require('remark-lint-no-shell-dollars'), |
| 41 | + require('remark-lint-no-table-indentation'), |
| 42 | + require('remark-lint-no-undefined-references'), |
| 43 | + require('remark-lint-no-unused-definitions'), |
| 44 | + [require('remark-lint-ordered-list-marker-style'), '.'], |
| 45 | + [require('remark-lint-ordered-list-marker-value'), 'ordered'], |
| 46 | + [require('remark-lint-rule-style'), '---'], |
| 47 | + [require('remark-lint-strong-marker'), '*'], |
| 48 | + [require('remark-lint-table-cell-padding'), 'padded'], |
| 49 | + require('remark-lint-table-pipe-alignment'), |
| 50 | + require('remark-lint-table-pipes'), |
| 51 | + [require('remark-lint-unordered-list-marker-style'), '-'], |
62 | 52 |
|
63 |
| - // Plugins |
64 |
| - external: [ |
65 |
| - 'remark-lint-no-empty-sections', |
66 |
| - 'remark-lint-no-url-trailing-slash', |
67 |
| - // 'remark-lint-are-links-valid', |
68 |
| - path.join(__dirname, 'rules') |
69 |
| - ], |
70 |
| - 'empty-sections': true, |
71 |
| - 'trailing-slash': true, |
72 |
| - // This rule is a good idea, but in reality it's way too slow and has too many false positives |
73 |
| - // 'are-links-valid': { |
74 |
| - // // TODO: The error message is too unclear here. Make a rule that disallows redirects |
75 |
| - // // allowRedirects: false, |
76 |
| - // timeout: 2000 |
77 |
| - // }, |
78 |
| - 'awesome/badge': true |
79 |
| -}; |
| 53 | + // Third-party plugins |
| 54 | + require('remark-lint-no-empty-sections'), |
| 55 | + require('remark-lint-no-url-trailing-slash'), |
| 56 | + |
| 57 | + // Custom plugins |
| 58 | + ...require('./rules') |
| 59 | +]; |
0 commit comments