Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown style guide and linter #5

Closed
5 tasks done
arcticicestudio opened this issue Feb 17, 2018 · 0 comments · Fixed by #6
Closed
5 tasks done

Markdown style guide and linter #5

arcticicestudio opened this issue Feb 17, 2018 · 0 comments · Fixed by #6

Comments

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Feb 17, 2018

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.js configuration file.
  • Implement .remarkignore ignore pattern file.
  • Implement npm lint:md script/task.
  • Lint current code base for the first time and fix possible Markdown style guide violations.
arcticicestudio added a commit that referenced this issue Feb 17, 2018
The project now adheres to the "Arctic Ice Studio Markdown Style
Guide" (1).

References:

  (1) https://arcticicestudio.github.io/styleguide-markdown

GH-5
arcticicestudio added a commit that referenced this issue Feb 17, 2018
All project documentation sources are checked with "remark-lint" (1)
using "remark-preset-lint-arcticicestdio" (2).

References:

  (1) https://github.com/remarkjs/remark-lint
  (2) https://arcticicestudio.github.io/remark-preset-lint-arcticicestudio

GH-5
arcticicestudio added a commit that referenced this issue Feb 17, 2018
* Moved a misplaced reference link definition in "src/rules/arrays.md"
  to the bottom of the file
* Removed a superfluous blank line in "src/rules/commas.md"
* Added a missing separation blank line in
  "src/rules/react/accessibility_a11y.md"
* Removed a superfluous colon from a header in
  "src/rules/react/props.md"
* Fixed a undefined reference link in "src/rules/react/props.md"
* Fixed a inline code marker error in "src/rules/standard_library.md"
* Replaced the tab character with a "pictorial" character in an example
  code block in "src/rules/whitespace.md"
* Fixed some typos in various documentation files
* Replaced all list item dash ("-") characters with a asterisk ("*") in
  "src/SUMMARY.md"
* Added "alt" text to all images in "src/development/credits.md"
* Replaced a inline link with a reference link in
  "src/development/requirements.md"
* Added a language syntax identifier to a code block in
  ".github/ISSUE_TEMPLATE.md"
* Added a separation blank line in "CHANGELOG.md"
* Removed a unused reference link definition in "CHANGELOG.md"
* Fixed a missing URL in a inline link in "CONTRIBUTING.md"
* Added a missing "alt" text to a image in "CONTRIBUTING.md"
* Removed a unused reference link definition in "CONTRIBUTING.md"

GH-5
arcticicestudio added a commit that referenced this issue Feb 17, 2018
…uide-and-linter

Markdown style guide and linter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant