mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Refactor remark plugin configuration into package.json, add link validation
This commit is contained in:
parent
78bac72eaf
commit
2333364047
|
@ -36,16 +36,16 @@ distclean:
|
|||
|
||||
#### check markdown
|
||||
|
||||
## run remark markdown checker based on configuration in .remarkrc
|
||||
## run remark markdown checker based on configuration in package.json
|
||||
.PHONY: check-markdown
|
||||
check-markdown: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
check-markdown: nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
## run remark, paste output to temporary file
|
||||
cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed --frail
|
||||
cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed --frail
|
||||
|
||||
## show a diff with changes remark suggests
|
||||
.PHONY: show-diff
|
||||
show-diff: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed
|
||||
show-diff: nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed
|
||||
## compare temporary file to original, error and fail with message if differences exist
|
||||
diff $(SOURCEPATH) $(BUILD_DIR)/$(SOURCEFILE).fixed -u3 || \
|
||||
(echo "Error: remark found bad markdown syntax, see output above" && false)
|
||||
|
|
|
@ -1,12 +1,44 @@
|
|||
{
|
||||
"name": "CppCoreGuidelinesCheck",
|
||||
"version": "0.0.0",
|
||||
"description": "CppCoreGuidelines Check",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"remark": "^4.2.2",
|
||||
"remark-lint": "^4.0.2",
|
||||
"remark-lint-sentence-newline": "^2.0.0",
|
||||
"remark-validate-links": "^4.1.0"
|
||||
}
|
||||
"name": "CppCoreGuidelinesCheck",
|
||||
"version": "0.0.0",
|
||||
"description": "CppCoreGuidelines Check",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"remark": "^4.2.2",
|
||||
"remark-lint": "^4.0.2",
|
||||
"remark-lint-sentence-newline": "^2.0.0",
|
||||
"remark-validate-links": "^4.1.0",
|
||||
"remark-lint-are-links-valid": "^1.0.2"
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": {
|
||||
"remark-lint": {
|
||||
"unordered-list-marker-style": "consistent",
|
||||
"list-item-bullet-indent": false,
|
||||
"list-item-indent": false,
|
||||
"list-item-spacing": false,
|
||||
"no-html": false,
|
||||
"maximum-line-length": false,
|
||||
"no-file-name-mixed-case": false,
|
||||
"heading-increment": false,
|
||||
"no-multiple-toplevel-headings": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"maximum-line-length": 9000,
|
||||
"maximum-heading-length": 300,
|
||||
"no-heading-punctuation": false,
|
||||
"no-duplicate-headings": false,
|
||||
"emphasis-marker": "*",
|
||||
"no-tabs": false,
|
||||
"blockquote-indentation": false,
|
||||
"strong-marker": "*",
|
||||
"external": ["remark-lint-are-links-valid"]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"bullet": "*",
|
||||
"listItemIndent": "1",
|
||||
"strong": "*",
|
||||
"emphasis": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"plugins": {
|
||||
"remark-lint": {
|
||||
"unordered-list-marker-style": "consistent",
|
||||
"list-item-bullet-indent": false,
|
||||
"list-item-indent": false,
|
||||
"list-item-spacing": false,
|
||||
"no-html": false,
|
||||
"maximum-line-length": false,
|
||||
"no-file-name-mixed-case": false,
|
||||
"heading-increment": false,
|
||||
"no-multiple-toplevel-headings": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"maximum-line-length": 9000,
|
||||
"maximum-heading-length": 300,
|
||||
"no-heading-punctuation": false,
|
||||
"no-duplicate-headings": false,
|
||||
"emphasis-marker": "*",
|
||||
"no-tabs": false,
|
||||
"blockquote-indentation": false,
|
||||
"strong-marker": "*"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"bullet": "*",
|
||||
"listItemIndent": "1",
|
||||
"strong": "*",
|
||||
"emphasis": "*"
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user