@jterrazz/typescript 10.1.2 → 10.1.3
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.
- package/lib/check-markdown.js +9 -6
- package/package.json +1 -1
package/lib/check-markdown.js
CHANGED
|
@@ -223,12 +223,15 @@ function isRelative(target) {
|
|
|
223
223
|
* that names it is still true. Outside a repository nothing is ignored.
|
|
224
224
|
*/
|
|
225
225
|
function isIgnored(root, target) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
// An absent path has no kind: `dist/` in .gitignore matches the directory
|
|
227
|
+
// form only, so both spellings are asked, one probe each (`-q` takes one).
|
|
228
|
+
return [target, `${target}/`].some(
|
|
229
|
+
(spelling) =>
|
|
230
|
+
spawnSync('git', ['check-ignore', '-q', '--no-index', spelling], {
|
|
231
|
+
cwd: root,
|
|
232
|
+
stdio: 'ignore',
|
|
233
|
+
}).status === 0,
|
|
234
|
+
);
|
|
232
235
|
}
|
|
233
236
|
|
|
234
237
|
/** The links of one page that resolve to nothing, ignored coordinates forgiven. */
|