Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 11786bb

Browse files
committed
Actually work when install via npm i.
1 parent 3dbad3b commit 11786bb

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bin/lint-md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/bin/bash -eu
2-
# Lint markdown files using Mobify's .remarkrc configuration.
3-
4-
# FIXME: Brittle :|
5-
BIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
6-
CODE_STYLE_DIR="$BIN_DIR/../mobify-code-style"
7-
REMARK_RC="$CODE_STYLE_DIR/.remarkrc"
8-
REMARK_CLI="$CODE_STYLE_DIR/node_modules/.bin/remark"
2+
# Lints Markdown files using Mobify's `.remarkrc` configuration.
3+
NPM_BIN=$(npm bin)
4+
REMARK_RC="$NPM_BIN/../mobify-code-style/.remarkrc"
5+
REMARK_CLI="$NPM_BIN/remark"
96

107
$REMARK_CLI --rc-path $REMARK_RC "$@"

0 commit comments

Comments
 (0)