markdownlint-cli2 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ const yaml = require("js-yaml");
6
+
7
+ /**
8
+ * Parses a YAML string, returning the corresponding object.
9
+ * @param {string} text String to parse as YAML.
10
+ * @returns {object} Corresponding object.
11
+ */
12
+ const yamlParse = (text) => yaml.load(text);
13
+
14
+ module.exports = yamlParse;
@@ -4,10 +4,10 @@
4
4
 
5
5
  /**
6
6
  * Wrapper for calling Node's require.resolve/require with an additional path.
7
- * @param {Object} req Node's require implementation (or equivalent).
8
- * @param {String} id Package identifier to require.
9
- * @param {String[]} dirs Directories to include when resolving paths.
10
- * @returns {Object} Exported module content.
7
+ * @param {object} req Node's require implementation (or equivalent).
8
+ * @param {string} id Package identifier to require.
9
+ * @param {string[]} dirs Directories to include when resolving paths.
10
+ * @returns {object} Exported module content.
11
11
  */
12
12
  const resolveAndRequire = (req, id, dirs) => {
13
13
  const resolvePaths = req.resolve.paths ? req.resolve.paths("") : [];
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.12.1/schema/markdownlint-cli2-config-schema.json",
3
+ "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.13.0/schema/markdownlint-cli2-config-schema.json",
4
4
  "title": "markdownlint-cli2 configuration schema",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "$schema": {
8
8
  "description": "JSON Schema URI (expected by some editors)",
9
9
  "type": "string",
10
- "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.12.1/schema/markdownlint-cli2-config-schema.json"
10
+ "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.13.0/schema/markdownlint-cli2-config-schema.json"
11
11
  },
12
12
  "config": {
13
- "description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/schema/.markdownlint.jsonc",
14
- "$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.33.0/schema/markdownlint-config-schema.json",
13
+ "description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/schema/.markdownlint.jsonc",
14
+ "$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.34.0/schema/markdownlint-config-schema.json",
15
15
  "default": {}
16
16
  },
17
17
  "customRules": {
18
- "description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
18
+ "description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
19
19
  "type": "array",
20
20
  "default": [],
21
21
  "items": {
@@ -25,18 +25,23 @@
25
25
  }
26
26
  },
27
27
  "fix": {
28
- "description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
28
+ "description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
29
29
  "type": "boolean",
30
30
  "default": false
31
31
  },
32
32
  "frontMatter": {
33
- "description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
33
+ "description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
34
34
  "type": "string",
35
35
  "minLength": 1,
36
36
  "default": ""
37
37
  },
38
+ "gitignore": {
39
+ "description": "Whether to ignore files referenced by .gitignore when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
40
+ "type": "boolean",
41
+ "default": false
42
+ },
38
43
  "globs": {
39
- "description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
44
+ "description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
40
45
  "type": "array",
41
46
  "default": [],
42
47
  "items": {
@@ -46,7 +51,7 @@
46
51
  }
47
52
  },
48
53
  "ignores": {
49
- "description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
54
+ "description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
50
55
  "type": "array",
51
56
  "default": [],
52
57
  "items": {
@@ -56,7 +61,7 @@
56
61
  }
57
62
  },
58
63
  "markdownItPlugins": {
59
- "description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
64
+ "description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
60
65
  "type": "array",
61
66
  "default": [],
62
67
  "items": {
@@ -76,7 +81,7 @@
76
81
  }
77
82
  },
78
83
  "modulePaths": {
79
- "description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
84
+ "description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
80
85
  "type": "array",
81
86
  "default": [],
82
87
  "items": {
@@ -85,18 +90,23 @@
85
90
  "minLength": 1
86
91
  }
87
92
  },
93
+ "noBanner": {
94
+ "description": "Whether to disable the display of the banner message and version numbers on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
95
+ "type": "boolean",
96
+ "default": false
97
+ },
88
98
  "noInlineConfig": {
89
- "description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
99
+ "description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
90
100
  "type": "boolean",
91
101
  "default": false
92
102
  },
93
103
  "noProgress": {
94
- "description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
104
+ "description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
95
105
  "type": "boolean",
96
106
  "default": false
97
107
  },
98
108
  "outputFormatters": {
99
- "description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
109
+ "description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
100
110
  "type": "array",
101
111
  "default": [],
102
112
  "items": {
@@ -116,7 +126,7 @@
116
126
  }
117
127
  },
118
128
  "showFound": {
119
- "description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.12.1/README.md#markdownlint-cli2jsonc",
129
+ "description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.13.0/README.md#markdownlint-cli2jsonc",
120
130
  "type": "boolean",
121
131
  "default": false
122
132
  }