-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Integrate remark-lint which is built on remark, the powerful Markdown processor powered by plugins such as remark-lint.
Ensuring the markdown you (and contributors) write is of great quality will provide better rendering in all the different markdown parsers, and makes sure less refactoring is needed afterwards.
remark-lint can be used through remark-cli through a preset. This preset will be remark-preset-lint-arcticicestudio, the custom preset that implements the Arctic ice Studio Markdown Style Guide.
Since the custom preset is still in major version 0 note that the version range should be >=0.x.x <1.0.0 to avoid NPM's “SemVer Major Zero Caveat”. When defining package versions with the the carat ^ or tilde ~ range selector it won't affect packages with a major version of 0. NPM will resolve these packages to their exact version until the major version is greater or equal to 1.
To avoid this caveat the more detailed version range >=0.x.x <1.0.0 should be used to resolve all versions greater or equal to 0.x.x but less than 1.0.0. This will always use the latest 0.x.x version and removes the need to increment the version manually on each new release.
Configuration
The .remarkrc.js configuration file will be placed in the project root as well as the .remarkignore file to also define ignore pattern.
NPM script/task
To allow to run the Markdown linting separately a lint:md npm script/task will be added to be included in the main lint script flow.
Tasks
- Install remark-cli and remark-preset-lint-arcticicestudio packages to
devDependencies. - Implement
.remarkrc.jsconfiguration file. - Implement
.remarkignoreignore pattern file. - Implement npm
lint:mdscript/task. - Lint current code base for the first time and fix possible Markdown style guide violations.
