-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from sanctuary-js/davidchambers/lint
lint: use a Markdown parser to check link definitions
- Loading branch information
Showing
2 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
ESLINT = node_modules/.bin/eslint --config node_modules/sanctuary-style/eslint-es3.json --env es3 | ||
ISTANBUL = node_modules/.bin/istanbul | ||
NPM = npm | ||
REMARK = node_modules/.bin/remark --frail --no-stdout | ||
REMEMBER_BOWER = node_modules/.bin/remember-bower | ||
TRANSCRIBE = node_modules/.bin/transcribe | ||
XYZ = node_modules/.bin/xyz --repo [email protected]:sanctuary-js/sanctuary-def.git --script scripts/prepublish | ||
|
@@ -39,12 +40,13 @@ lint: | |
--rule 'max-len: [off]' \ | ||
-- test | ||
$(REMEMBER_BOWER) $(shell pwd) | ||
@echo 'Checking for missing link definitions...' | ||
grep '^[ ]*//[.]' index.js \ | ||
| grep -o '\[[^]]*\]\[[^]]*\]' \ | ||
| sed -n -e 's:\[\(.*\)\]\[\]:\1:p' -e 's:\[.*\]\[\(.*\)\]:\1:p' \ | ||
| sort -u \ | ||
| xargs -I '{}' sh -c "grep '^//[.] \[{}\]: ' index.js" | ||
rm -f README.md | ||
VERSION=0.0.0 make README.md | ||
$(REMARK) \ | ||
--use remark-lint-no-undefined-references \ | ||
--use remark-lint-no-unused-definitions \ | ||
-- README.md | ||
git checkout README.md | ||
|
||
|
||
.PHONY: release-major release-minor release-patch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters