From f5014a37fc5179e76db08e47a6d5eb4b1df3bea1 Mon Sep 17 00:00:00 2001
From: Arctic Ice Studio
+
+# Project: Styleguide Markdown
+# Repository: https://github.com/arcticicestudio/styleguide-markdown
+# License: MIT
+# References:
+# https://circleci.com/docs/2.0
+# https://circleci.com/docs/2.0/circleci-images/#nodejs
+
+version: 2
+jobs:
+ build:
+ docker:
+ - image: circleci/node:latest
+ steps:
+ - checkout
+ - run:
+ name: preprocess-clean-node-modules
+ command: rm -rf node_modules
+ - run:
+ name: preprocess-npm-install
+ command: npm install
+ - run:
+ name: lint
+ command: npm run lint
+ - run:
+ name: build-docs
+ command: npm run docs:build
+ - store_artifacts:
+ path: build/docs
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 3b9f655..0542b10 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -51,7 +51,7 @@ What actually happens?
Provide a [MCVE - The Minimal, Complete, and Verifiable Example](https://github.com/arcticicestudio/styleguide-markdown/blob/develop/CONTRIBUTING.md#mcve)
-**This is a optional section, but it can drastically increase the speed at which this issue can be processed since it takes away the time-consuming reconstruction to reproduce the enhancement or bug.**
+Note that **this is a optional section, but it can drastically increase the speed at which this issue can be processed since it takes away the time-consuming reconstruction to reproduce the enhancement or bug.**
The recommened way is to upload it as [Gist](https://gist.github.com) or new repository to GitHub, but of course you can [attach it to this issue](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests), use any free file hosting service or paste the code in [Markdown code blocks](https://help.github.com/articles/basic-writing-and-formatting-syntax) into this issue.
@@ -70,7 +70,7 @@ If possible please provide more context by answering these questions:
## Stack Trace and Error Messages
-```
+```raw
Paste the full stack trace, error messages or the logfile here ...
```
diff --git a/.remarkignore b/.remarkignore
new file mode 100644
index 0000000..c6b1021
--- /dev/null
+++ b/.remarkignore
@@ -0,0 +1,5 @@
+# +---------+
+# + Node.js +
+# +---------+
+src/node_modules/*
+node_modules/*
diff --git a/.remarkrc.js b/.remarkrc.js
new file mode 100644
index 0000000..72db352
--- /dev/null
+++ b/.remarkrc.js
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2018-present Arctic Ice Studio
+ *
+ * Project: Arctic Ice Studio remark-lint Preset
+ * Repository: https://github.com/arcticicestudio/remark-preset-lint-arcticicestudio
+ * License: MIT
+ */
+
+/**
+ * @file The remark-lint configuration.
+ * @author Arctic Ice Studio
Copyright © 2018-present Arctic Ice Studio & Sven Greb
+ +[commonmark]: http://commonmark.org +[docs]: https://arcticicestudio.github.io/styleguide-markdown +[docs-dev-building]: https://arcticicestudio.github.io/styleguide-markdown/development/building.html +[docs-dev-contributing]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html +[docs-dev-contributing-branch-org]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#branch-organization +[docs-dev-contributing-bug-reports]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#bug-reports +[docs-dev-contributing-enhancements]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#enhancement-suggestions +[docs-dev-contributing-mcve]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#mcve +[docs-dev-contributing-other-feedback]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#give-feedback-on-issues-and-pull-requests +[docs-dev-contributing-other-improve-issues]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#improve-issues +[docs-dev-contributing-pr]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#pull-requests +[docs-dev-contributing-styleguides]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#styleguides +[docs-dev-contributing-versioning]: https://arcticicestudio.github.io/styleguide-markdown/development/contributing.html#versioning +[docs-dev-requirements]: https://arcticicestudio.github.io/styleguide-markdown/development/requirements.html +[docs-rules]: https://arcticicestudio.github.io/styleguide-markdown/rules/index.html +[docs-rules-code-blocks]: https://arcticicestudio.github.io/styleguide-markdown/rules/code.html#blocks +[docs-rules-emphasis]: https://arcticicestudio.github.io/styleguide-markdown/rules/emphasis.html +[docs-rules-headings]: https://arcticicestudio.github.io/styleguide-markdown/rules/headings.html +[docs-rules-lists]: https://arcticicestudio.github.io/styleguide-markdown/rules/lists.html +[docs-rules-naming-conventions]: https://arcticicestudio.github.io/styleguide-markdown/rules/naming-conventions.html +[docs-rules-raw-html]: https://arcticicestudio.github.io/styleguide-markdown/rules/raw-html.html +[docs-rules-strings]: https://arcticicestudio.github.io/styleguide-markdown/rules/strings.html +[docs-rules-whitespaces]: https://arcticicestudio.github.io/styleguide-markdown/rules/whitespaces.html +[gfm]: https://github.github.com/gfm +[remark]: https://remark.js.org +[remark-lint-gh]: https://github.com/remarkjs/remark-lint +[remark-preset-lint-arcticicestudio-ghio]: https://arcticicestudio.github.io/remark-preset-lint-arcticicestudio diff --git a/package.json b/package.json index 467e7f0..a5784bb 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,19 @@ "config", "preset" ], - "private": true + "private": true, + "scripts": { + "clean": "del build", + "docs:build": "gitbook install src && gitbook build src build/docs", + "docs:dev": "npm run docs:build && gitbook serve src build/docs", + "lint:md": "remark --no-stdout ./*.md src/ .github/", + "lint": "npm run lint:md", + "prepublishOnly": "npm run lint" + }, + "devDependencies": { + "del-cli": "1.1.0", + "gitbook-cli": "2.3.2", + "remark-cli": "5.0.0", + "remark-preset-lint-arcticicestudio": "0.1.0" + } } diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..1f50a65 --- /dev/null +++ b/src/README.md @@ -0,0 +1,67 @@ + + + + + + + + + + +The Arctic Ice Studio Markdown Code Style.
+ +--- + + + +Every major open source project has its own style guide, a set of standards and conventions for the writing and design of code, documentations and assets. It is much easier to understand a large codebase when all the code in it is in a consistent style. + +A style guide establishes and enforces style to improve the intelligibility and communication within the project community. It ensures consistency and enforces best practice in usage and language composition. + +### Getting Started + +This style guide provides the [comprehensive base rule set][rules] with support for [GitHub Flavored Markdown][gfm] which is based on the [CommonMark][commonmark] specification. It includes rules for all document elements like e.g. [code blocks][rules-code-blocks], [headings][rules-headings] or [lists][rules-lists], defines [naming conventions][rules-naming-conventions] and best practices for [whitespaces][rules-whitespaces], [Raw HTML][rules-raw-html], [emphasizing][rules-emphasis] and [strings][rules-strings]. + +The development chapters contain information about the [requirements][dev-requirements] and [how to build][dev-building] this style guide documentation. + +To make sure your code matches this style guide use the official [remark-preset-lint-arcticicestudio][remark-preset-lint-arcticicestudio-ghio] code linter preset for [remark-lint][remark-lint-gh], a plugin for [remark][]. + +### Contributing + +Read the [contributing guide][dev-contributing] to learn about the development process and how to propose [enhancement suggestions][dev-contributing-enhancements] and [report bugs][dev-contributing-bug-reports], how to [submit pull requests][dev-contributing-pr] and the project's [styleguides][dev-contributing-styleguides], [branch organization][dev-contributing-branch-org] and [versioning][dev-contributing-versioning] model. + +The guide also includes information about [minimal, complete, and verifiable examples][dev-contributing-mcve] and other ways to contribute to the project like [improving existing issues][dev-contributing-other-improve-issues] and [giving feedback on issues and pull requests][dev-contributing-other-feedback]. + + + +Copyright © 2018-present Arctic Ice Studio & Sven Greb
+ + + +[dev-building]: development/building.md +[dev-contributing]: development/contributing.md +[dev-contributing-branch-org]: development/contributing.md#branch-organization +[dev-contributing-bug-reports]: development/contributing.md#bug-reports +[dev-contributing-enhancements]: development/contributing.md#enhancement-suggestions +[dev-contributing-mcve]: development/contributing.md#mcve +[dev-contributing-other-feedback]: development/contributing.md#give-feedback-on-issues-and-pull-requests +[dev-contributing-other-improve-issues]: development/contributing.md#improve-issues +[dev-contributing-pr]: development/contributing.md#pull-requests +[dev-contributing-styleguides]: development/contributing.md#styleguides +[dev-contributing-versioning]: development/contributing.md#versioning +[dev-requirements]: development/requirements.md +[rules]: rules/index.md +[rules-code-blocks]: rules/code.md#blocks +[rules-emphasis]: rules/emphasis.md +[rules-headings]: rules/headings.md +[rules-lists]: rules/lists.md +[rules-naming-conventions]: rules/naming-conventions.md +[rules-raw-html]: rules/raw-html.md +[rules-strings]: rules/strings.md +[rules-whitespaces]: rules/whitespaces.md + +[commonmark]: http://commonmark.org +[gfm]: https://github.github.com/gfm +[remark]: https://remark.js.org +[remark-lint-gh]: https://github.com/remarkjs/remark-lint +[remark-preset-lint-arcticicestudio-ghio]: https://arcticicestudio.github.io/remark-preset-lint-arcticicestudio diff --git a/src/SUMMARY.md b/src/SUMMARY.md new file mode 100644 index 0000000..e2e4376 --- /dev/null +++ b/src/SUMMARY.md @@ -0,0 +1,134 @@ +# Summary + +### Introduction + +* [Overview](README.md) + +### Rules + +* [Overview](rules/index.md) +* [Accessibility A11Y](rules/accessibility-a11y.md) + * [Alternative Text](rules/accessibility-a11y.md#alternative-text) +* [Blockquotes](rules/blockquotes.md) + * [Indentation](rules/blockquotes.md#indentation) + * [Multi Line](rules/blockquotes.md#multi-line) +* [Code](rules/code.md) + * [Blocks](rules/code.[code]#blocks) + * [Syntax Highlighting](rules/code.md#blocks#syntax-highlighting) + * [Escape Newlines In Terminal Commands](rules/code.md#blocks#escape-newlines-in-terminal-commands) + * [No Shell Code Dollar Sign](rules/code.md#blocks#no-shell-code-dollar-sign) + * [Within Lists](rules/code.md#blocks#within-lists) + * [Inline](rules/code.md#blocks#inline) + * [Marker Character Style](rules/code.md#blocks#marker-character-style) + * [Use Cases](rules/code.md#blocks#use-cases) +* [Comments](rules/comments.md) + * [HTML](rules/comments.md#html) +* [Emphasis](rules/emphasis.md) + * [Italic](rules/emphasis.md#italic) + * [Bold](rules/emphasis.md#bold) + * [Strikethrough](rules/emphasis.md#strikethrough) + * [No Header Replacement](rules/emphasis.md#no-header-replacement) + * [No Inner Spacing](rules/emphasis.md#no-inner-spacing) +* [Headings](rules/headings.md) + * [ATX Style](rules/headings.md#atx-style) + * [Empty Lines Before And After](rules/headings.md#empty-lines-before-and-after) + * [Content Spacing](rules/headings.md#content-spacing) + * [No Content Before](rules/headings.md#no-content-before) + * [No Duplicate](rules/headings.md#no-duplicate) + * [Letter Case](rules/headings.md#letter-case) + * [Length](rules/headings.md#length) + * [Punctuation After Content](rules/headings.md#punctuation-after-content) +* [Horizontal Rules](rules/horizontal-rules.md) + * [Marker Character Style](rules/horizontal-rules.md#marker-character-style) + * [No Prepended Or Appended Content](rules/horizontal-rules.md#no-prepended-or-appended-content) + * [Empty Lines Before And After](rules/horizontal-rules.md#empty-lines-before-and-after) + * [Use Cases](rules/horizontal-rules.md#use-cases) +* [Images](rules/images.md) + * [Absolute URLs](rules/images.md#absolute-urls) + * [Badges](rules/images.md#badges) +* [Links](rules/links.md) + * [Prefer Reference Links](rules/links.md#prefer-reference-links) + * [Inline](rules/links.md#inline) + * [Definition Placement](rules/links.md#definition-placement) + * [Empty Line Before](rules/links.md#empty-line-before) + * [Letter Case](rules/links.md#letter-case) + * [No ID Inner Spacing](rules/links.md#no-id-inner-spacing) + * [No Trailing Or Leading Title Spaces](rules/links.md#no-trailing-or-leading-title-spaces) + * [Spacing After Colon](rules/links.md#spacing-after-colon) + * [Sorting](rules/links.md#sorting) + * [Reference Link Groups](rules/links.md#reference-link-groups) + * [Reference Link Group Ordering](rules/links.md#reference-link-group-ordering) + * [No Unused](rules/links.md#no-unused) + * [No Undefined](rules/links.md#no-undefined) + * [Autolink Protocol](rules/links.md#autolink-protocol) + * [Unique IDs](rules/links.md#unique-ids) + * [No Empty URL](rules/links.md#no-empty-url) + * [No Reference Like URL](rules/links.md#no-reference-like-url) +* [Lists](rules/lists.md) + * [Unordered Marker](rules/lists.md#unordered-marker) + * [Ordered Marker](rules/lists.md#ordered-marker) + * [No Content Before](rules/lists.md#no-content-before) + * [Continuous Indentation](rules/lists.md#continuous-indentation) + * [Empty Lines](rules/lists.md#empty-lines) + * [Empty Lines Before And After](rules/lists.md#empty-lines-before-and-after) + * [Letter Case](rules/lists.md#letter-case) + * [Punctuation After Items](rules/lists.md#punctuation-after-items) + * [Checkbox Character Style](rules/lists.md#checkbox-character-style) +* [Naming Conventions](rules/naming-conventions.md) + * [File Extension](rules/naming-conventions.md#file-extension) + * [File Naming](rules/naming-conventions.md#file-naming) +* [Paragraphs](rules/paragraphs.md) + * [No Indentation](rules/paragraphs.md#no-indentation) +* [Raw HTML](rules/raw-html.md) + * [Aligned Content](rules/raw-html.md#aligned-content) + * [Inline Content](rules/raw-html.md#inline-content) + * [Collapsed Content](rules/raw-html.md#collapsed-content) +* [Strings](rules/strings.md) + * [Quotes](rules/strings.md#quotes) + * [Line Length](rules/strings.md#line-length) +* [Tables](rules/tables.md) + * [Prefer Lists](rules/tables.md#prefer-lists) + * [Empty Lines Before And After](rules/tables.md#empty-lines-before-and-after) + * [Content Spacing](rules/tables.md#content-spacing) + * [Header Delimiter Row Spacing](rules/tables.md#header-delimiter-row-spacing) + * [Minimum Column Width](rules/tables.md#minimum-column-width) + * [Alignment](rules/tables.md#alignment) + * [No Indentation](rules/tables.md#no-indentation) +* [Whitespace](rules/whitespace.md) + * [Indentation Character](rules/whitespace.md#indentation-character) + * [Newline](rules/whitespace.md#newline) + * [Before Blocks](rules/whitespace.md#before-blocks) + * [After Sentences](rules/whitespace.md#after-sentences) + * [Maximum Line Length](rules/whitespace.md#maximum-line-length) + * [Trailing](rules/whitespace.md#trailing) + +### Development + +* [Requirements](development/requirements.md) +* [Building](development/building.md) + * [Documentations](development/building.md#documentations) +* [Contributing](development/contributing.md) + * [Getting Started](development/contributing.md#getting-started) + * [Port Projects](development/contributing.md#port-projects) + * [Bug Reports](development/contributing.md#bug-reports) + * [Enhancement Suggestions](development/contributing.md#enhancement-suggestions) + * [Pull Requests](development/contributing.md#pull-requests) + * [Documentations](development/contributing.md#documentations) + * [Branch Organization](development/contributing.md#branch-organization) + * [How else can I help?](development/contributing.md#how-else-can-i-help) + * [Improve Issues](development/contributing.md#improve-issues) + * [Give Feedback On Issues and Pull Requests](development/contributing.md#give-feedback-on-issues-and-pull-requests) + * [Styleguides](development/contributing.md#styleguides) + * [Git Commit Messages](development/contributing.md#git-commit-messages) + * [MCVE](development/contributing.md#mcve) + * [Versioning](development/contributing.md#versioning) + * [Credits](development/contributing.md#credits) +* [Changelog](development/changelog.md) + * [0.1.0](development/changelog.md#010) +* [Code of Conduct](development/code-of-conduct.md) + * [What we believe in and how we act](development/code-of-conduct.md#what-we-believe-in-and-how-we-act) + * [Unacceptable Behavior](development/code-of-conduct.md#unacceptable-behavior) + * [Responsibilities](development/code-of-conduct.md#responsibilities) + * [Consequences for Violations](development/code-of-conduct.md#consequences-for-violations) + * [Scope](development/code-of-conduct.md#scope) +* [Credits](development/credits.md) diff --git a/src/assets/markdown-logo.png b/src/assets/markdown-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..768a659e7b76bf2e68a00da30593a195de6d23b1 GIT binary patch literal 31980 zcmeFacU%-#8$UYOAW=bMVu=DVyvl1tMU8+~m5rj^6Wn8i`+Q1o!o*ZB z0LW-l;C}>=O7Q+@b1J8z4yKJ{w<-53sflZ4smN0zQgqR*C;WdlcsG*62BNbRk08h*81%i(16b|NAfeUx`bS<>703N z4FR1 URf`ryeRLa-|QOqpH63W z{4l~_V(@hOt*4RgGylC}M#ImgIWJD0mzy(YWdHW^<$kmC|C(B}*!y73bKTEbd+O>I z?ebah$ARzJT{Av2*=73Kfzsm1I`es1bJJ5V-O3ugy{sZOe(2r!cv0Is;ZNhnQR8j- zhX2}8HXPSKa(zhx%X(Y)1=8P&BGJw{=3yp&iTJ5vvEqx|bQMSNiVB7 1{4vuK-ba>Xa5VV%B~OH6ONt1Uf%G6EAxZ)%|jV^Yq)R;BB1AyJ}u zgIvzzu29@B*+>+5*iX43(}OBKu0-CLbD)Y9AvWF`fkk)73H}5LpCA&tCP;XyEy*}f zhF8&YL^ 5qk+PEk&?+3WDQBiMEd+D$W2+-p>t6j zE72BnD;6Vs&?C873@7V@j45Vy0=${H-$9->SO1K3ja#J&ugZlmR{ep3v;&BOXCwup znaV6eNiU?2780uxh`b~t-d)Io1}T&9oQJr1)WEh5U`#T*SBg)@)9F=KqE*gto%O{D z-|A2D==n$no}{@D8X0(W9m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aL0(|>7G*&t}L;SS9`R}Q)`X6uaHX04><(W-y~;6iYf&3)c;amy8B4X>M^ri z$1q&y&-9CMj-elP*wtDpIiD#mXsan`vB5T>nLZ{fQ9{UoO4xpTeg6Eq9bh+=7O~UA zozb#(^Y=*0ATh@IP1Fo !U1r+2wA~kO-Lyii707+ z5>3O?J&mO$QtgcDIjWAh+CAiA@pPU3H|9}MEkJVEW~7^i>GnZcXaL`|EjJ*Wej-aK z_}zz;3@=Iyj-cZ3Pb&`}dt2X1Y|A5t `YCvuXIv4A!1K hMV*j0guGg#8+?X)Kyvlp6e82MMdrz+Z6a8rwLD_y=!Ohm;{FLr=D=9pEiCfb# z1)hCu10sj7KD%*Yi5di8U;)yuxyeYgR-onmVEIh9l-7K^d2$p)-R4pOSb|AflCvO! zeZq=HWf5EE;=Epe+^bT50VNIE7n=+l-2}QHnpUm ZOUaLQ;cfaGdO3((%IkBV3UK %Jid7 zCzqVrvhYPK)E^aJcc$Np2VlH1mNd#hjU0?OGIsmCL5>2}hdVSK0!0O!KTh2Y`6@2~ zsB2qj+SdF*CA!734c12PDZKWX)BShFstMI9hdT}VUf3Qxv3at6rWcr}J5X&4&Hx!S zm|NVS*M>qenp&k8ExOx6ABr`$RedN4G#!%92WTY9XquX<>QV6^p2HhM0o3$Bhq3BF exa5wmeth!?a{IcSf2F-Ib@*WL0q*yNU;Ymn^Of`f literal 0 HcmV?d00001 diff --git a/src/assets/snowflake.png b/src/assets/snowflake.png new file mode 100755 index 0000000000000000000000000000000000000000..d58d6f7bb8420f1c5758785bbf98670482b922b2 GIT binary patch literal 1541 zcmV+g2KxDlP) mKj%uZ 8MwDSI(AsoW6| zX>k~Y?ja$INd|$2LLb)lVNgb0t}by4ecr=htdNJ4veI;H1j1khg^);dThxbz`N6?u zcxkMw$nt8%7M6c!5BJK_l_j@=LJwTH_xJmq^ZovQ=g;q4RFy%V+yfoT-Fuu?RdR*$ zY_3qARaJ8L9;b5;bZAg}7K6%~cM8i|af{^~!X<=DZ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wj*D4!~N(#CVdI? z6E|N=5Z}5TfVZ+D0+iU?cgo2oYJ=Dt{5FhjWe6@4ghhnKo&N-XZXg+$fNh(*h?#OS r=^V;+l Please make sure to complete the [requirement][requirements] steps first in order to build the project! + +Run `npm install` from within the project root to bootstrap the project and install all dependencies. + +Continuous integration builds are running at [Circle CI][ci-circle]. + +## Documentations + +This documentation can be build by running + +```sh +npm run docs:build +``` + +from within the project root to bootstrap the build toolchain and install all dependencies. The output will be placed in `build/docs`. + +To start the local hot reload server with browser live reload, using the default port `4000`, run + +```sh +npm run docs:dev +``` + +[requirements]: requirements.md + +[ci-circle]: https://circleci.com/gh/arcticicestudio/styleguide-markdown diff --git a/src/development/changelog.md b/src/development/changelog.md new file mode 100644 index 0000000..b376bb0 --- /dev/null +++ b/src/development/changelog.md @@ -0,0 +1 @@ +{% include "git+https://github.com/arcticicestudio/styleguide-markdown.git/CHANGELOG.md" %} diff --git a/src/development/code-of-conduct.md b/src/development/code-of-conduct.md new file mode 100644 index 0000000..411dfab --- /dev/null +++ b/src/development/code-of-conduct.md @@ -0,0 +1 @@ +{% include "git+https://github.com/arcticicestudio/styleguide-markdown.git/CODE_OF_CONDUCT.md" %} diff --git a/src/development/contributing.md b/src/development/contributing.md new file mode 100644 index 0000000..12ec574 --- /dev/null +++ b/src/development/contributing.md @@ -0,0 +1 @@ +{% include "git+https://github.com/arcticicestudio/styleguide-markdown.git/CONTRIBUTING.md" %} diff --git a/src/development/credits.md b/src/development/credits.md new file mode 100644 index 0000000..f9c63c6 --- /dev/null +++ b/src/development/credits.md @@ -0,0 +1,43 @@ +Thanks for the inspirations and attributions to GitHub's [Open Source Guides](https://opensource.guide) and other large style guides like [Atlassian Design][atlassian-design], [Google's DocGuide][google-docguide-gh], the [Google Developer Documentation Style Guide][google-developer-doc-style-guide] and the [Markdown Style Guide][markdown_style_guide-ciro_santilli] by Ciro Santilli. + +If you use this style guide in your project, you can include these badges in the documentation to let other developer know that the code adheres to this style. + +![Markdown Style Guide Badge][badge-styleguide-markdown] + +```md +[![Markdown Style Guide](https://cdn.rawgit.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-markdown-banner-typography-badge.svg) +``` + +![Code Style Badge][badge-styleguide-code-style] + +```md +[![Markdown Style Guide](https://cdn.rawgit.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-badge-code-style.svg) +``` + +![Markdown Style Guide Badge Version][badge-shield-code-style-version] + +```md +![Markdown Style Guide](https://img.shields.io/badge/Markdown_Style_Guide-0.1.0-88C0D0.svg?style=flat-square&colorA=2E3440&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzOSIgaGVpZ2h0PSIzOSIgdmlld0JveD0iMCAwIDM5IDM5Ij48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNEOERFRTkiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMS41IDEuNWgzNnYzNmgtMzZ6Ii8%2BPHBhdGggZmlsbD0iI0Q4REVFOSIgZD0iTTIwLjY4MyAyNS42NTVsNS44NzItMTMuNDhoLjU2Nmw1Ljg3MyAxMy40OGgtMS45OTZsLTQuMTU5LTEwLjA1Ni00LjE2MSAxMC4wNTZoLTEuOTk1em0tMi42OTYgMGwtMTMuNDgtNS44NzJ2LS41NjZsMTMuNDgtNS44NzJ2MS45OTVMNy45MzEgMTkuNWwxMC4wNTYgNC4xNnoiLz48L3N2Zz4%3D) +``` + +![Code Style Badge][badge-shield-code-style] + +```md +![Markdown Style Guide](https://img.shields.io/badge/%20-Code_Style-88C0D0.svg?style=flat-square&colorA=2E3440&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzOSIgaGVpZ2h0PSIzOSIgdmlld0JveD0iMCAwIDM5IDM5Ij48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNEOERFRTkiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMS41IDEuNWgzNnYzNmgtMzZ6Ii8%2BPHBhdGggZmlsbD0iI0Q4REVFOSIgZD0iTTIwLjY4MyAyNS42NTVsNS44NzItMTMuNDhoLjU2Nmw1Ljg3MyAxMy40OGgtMS45OTZsLTQuMTU5LTEwLjA1Ni00LjE2MSAxMC4wNTZoLTEuOTk1em0tMi42OTYgMGwtMTMuNDgtNS44NzJ2LS41NjZsMTMuNDgtNS44NzJ2MS45OTVMNy45MzEgMTkuNWwxMC4wNTYgNC4xNnoiLz48L3N2Zz4%3D) +``` + +![Code Style Badge Color Inverted][badge-shield-code-style-inverted] + +```md +![Markdown Style Guide](https://img.shields.io/badge/%20-Code_Style-2E3440.svg?style=flat-square&colorA=ffffff&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMi41IiBoZWlnaHQ9IjMyLjUiIHZpZXdCb3g9IjAgMCAzMi41IDMyLjUiPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzJFMzQ0MCIgc3Ryb2tlLXdpZHRoPSIuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNLjI1LjI1aDMydjMyaC0zMnoiLz48cGF0aCBmaWxsPSIjMkUzNDQwIiBkPSJNMTcuNDMzIDIyLjQwNWw1Ljg3Mi0xMS45OGguNTY2bDUuODczIDExLjk4aC0uNDk2bC01LjY1OS0xMS41NTYtNS42NjEgMTEuNTU2aC0uNDk1em0tMi42OTYgMGwtMTEuOTgtNS44NzN2LS41NjZsMTEuOTgtNS44NzJ2LjQ5NUwzLjE4MSAxNi4yNWwxMS41NTYgNS42NnYuNDk1eiIvPjwvc3ZnPg%3D%3D) +``` + +[atlassian-design]: https://atlassian.design +[badge-shield-code-style]: https://img.shields.io/badge/%20-Code_Style-88C0D0.svg?style=flat-square&colorA=2E3440&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzOSIgaGVpZ2h0PSIzOSIgdmlld0JveD0iMCAwIDM5IDM5Ij48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNEOERFRTkiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMS41IDEuNWgzNnYzNmgtMzZ6Ii8%2BPHBhdGggZmlsbD0iI0Q4REVFOSIgZD0iTTIwLjY4MyAyNS42NTVsNS44NzItMTMuNDhoLjU2Nmw1Ljg3MyAxMy40OGgtMS45OTZsLTQuMTU5LTEwLjA1Ni00LjE2MSAxMC4wNTZoLTEuOTk1em0tMi42OTYgMGwtMTMuNDgtNS44NzJ2LS41NjZsMTMuNDgtNS44NzJ2MS45OTVMNy45MzEgMTkuNWwxMC4wNTYgNC4xNnoiLz48L3N2Zz4%3D +[badge-shield-code-style-inverted]: https://img.shields.io/badge/%20-Code_Style-2E3440.svg?style=flat-square&colorA=ffffff&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMi41IiBoZWlnaHQ9IjMyLjUiIHZpZXdCb3g9IjAgMCAzMi41IDMyLjUiPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzJFMzQ0MCIgc3Ryb2tlLXdpZHRoPSIuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNLjI1LjI1aDMydjMyaC0zMnoiLz48cGF0aCBmaWxsPSIjMkUzNDQwIiBkPSJNMTcuNDMzIDIyLjQwNWw1Ljg3Mi0xMS45OGguNTY2bDUuODczIDExLjk4aC0uNDk2bC01LjY1OS0xMS41NTYtNS42NjEgMTEuNTU2aC0uNDk1em0tMi42OTYgMGwtMTEuOTgtNS44NzN2LS41NjZsMTEuOTgtNS44NzJ2LjQ5NUwzLjE4MSAxNi4yNWwxMS41NTYgNS42NnYuNDk1eiIvPjwvc3ZnPg%3D%3D +[badge-shield-code-style-version]: https://img.shields.io/badge/Markdown_Style_Guide-0.1.0-88C0D0.svg?style=flat-square&colorA=2E3440&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzOSIgaGVpZ2h0PSIzOSIgdmlld0JveD0iMCAwIDM5IDM5Ij48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNEOERFRTkiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMS41IDEuNWgzNnYzNmgtMzZ6Ii8%2BPHBhdGggZmlsbD0iI0Q4REVFOSIgZD0iTTIwLjY4MyAyNS42NTVsNS44NzItMTMuNDhoLjU2Nmw1Ljg3MyAxMy40OGgtMS45OTZsLTQuMTU5LTEwLjA1Ni00LjE2MSAxMC4wNTZoLTEuOTk1em0tMi42OTYgMGwtMTMuNDgtNS44NzJ2LS41NjZsMTMuNDgtNS44NzJ2MS45OTVMNy45MzEgMTkuNWwxMC4wNTYgNC4xNnoiLz48L3N2Zz4%3D +[badge-styleguide-code-style]: https://cdn.rawgit.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-badge-code-style.svg +[badge-styleguide-markdown]: https://cdn.rawgit.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-markdown-banner-typography-badge.svg +[google-docguide-gh]: https://github.com/google/styleguide/blob/gh-pages/docguide +[google-developer-doc-style-guide]: https://developers.google.com/style/ +[markdown_style_guide-ciro_santilli]: http://www.cirosantilli.com/markdown-style-guide diff --git a/src/development/requirements.md b/src/development/requirements.md new file mode 100644 index 0000000..8941368 --- /dev/null +++ b/src/development/requirements.md @@ -0,0 +1,10 @@ +## Node.js + +Styleguide Markdown is build with [Node.js][nodejs] which is required to build some of the file formats. + +### npm + +[npm][npm] is used as package manager which comes prebundled with Node.js and can be used from the CLI. + +[nodejs]: https://nodejs.org/en/download/releases +[npm]: https://npmjs.com diff --git a/src/rules/accessibility-a11y.md b/src/rules/accessibility-a11y.md new file mode 100644 index 0000000..7880d02 --- /dev/null +++ b/src/rules/accessibility-a11y.md @@ -0,0 +1,25 @@ +This chapter provides rules to improve the accessibility as documented by the [A11Y][a11y] project. + +## Alternative Text + +Add an alternative text for images. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +![][snowflake] + +[snowflake]: https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/src/assets/snowflake.png +```` + +⇡ **Correct** code for this rule: + +```markdown +![snowflake icon][snowflake] + +[snowflake]: https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/src/assets/snowflake.png +```` + +[a11y]: https://a11yproject.com diff --git a/src/rules/blockquotes.md b/src/rules/blockquotes.md new file mode 100644 index 0000000..95f7830 --- /dev/null +++ b/src/rules/blockquotes.md @@ -0,0 +1,60 @@ +## Indentation + +Always separate the marker `>` from the actual content using a single whitespace. + +> remark-lint: [blockquote-indentation][remark-lint-blockquote-indentation] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +>Winter +``` + +```markdown +> Winter +``` + +⇡ **Correct** code for this rule: + +```markdown +> Winter +``` + +## Multi Line + +Use a `greater than` sign for every line, including wrapped. + +> remark-lint: [no-blockquote-without-marker][remark-lint-no-blockquote-without-marker] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +> Winter +Snow +``` + +```markdown +> Many snowflakes are falling down. The winter has sparkling and frozen elements! It is home +for many beautiful animals like snowy owls, +arctic foxes, and grizzly bears. +``` + +⇡ **Correct** code for this rule: + +```markdown +> Winter +> Snow +``` + +```markdown +> Many snowflakes are falling down. The winter has sparkling and frozen elements! It is home +> for many beautiful animals like snowy owls, +> arctic foxes, and grizzly bears. +``` + +[remark-lint-blockquote-indentation]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-blockquote-indentation +[remark-lint-no-blockquote-without-marker]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-blockquote-without-marker diff --git a/src/rules/code.md b/src/rules/code.md new file mode 100644 index 0000000..d444648 --- /dev/null +++ b/src/rules/code.md @@ -0,0 +1,238 @@ +## Blocks + +Avoid indentation based code blocks, use [fenced code blocks][gfm-spec-fenced_code_blocks] for multi line code. This prevents malformed rendered output due to wrong indentation errors, increases the readability and allows the usage of [language syntax highlighting][gh-help-gfm_code_syntax_highlighting]. + +> remark-lint: [code-block-style][remark-lint-code-block-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown + import React, { PureComponent } from "react"; + + class Frost extends PureComponent { + // ... + } + + export default Frost; +``` + +⇡ **Correct** code for this rule: + +`````markdown +```js +import React, { PureComponent } from "react"; + +class Frost extends PureComponent { + // ... +} + +export default Frost; +``` +````` + +## Syntax Highlighting + +Explicitly declare the language for blocks containing code snippets, so that neither the syntax highlighter nor the next editor must guess. + +> remark-lint: [fenced-code-flag][remark-lint-fenced-code-flag] + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +``` +import React, { PureComponent } from "react"; + +class Frost extends PureComponent { + // ... +} + +export default Frost; +``` +````` + +⇡ **Correct** code for this rule: + +`````markdown +```js +import React, { PureComponent } from "react"; + +class Frost extends PureComponent { + // ... +} + +export default Frost; +``` +````` + +## Escape Newlines In Terminal Commands + +Many command snippets are intended to be copied and pasted directly into e.g. a terminal. To protect the user to unintentional execute the copied code due to a newline (interpreted by the terminal as Enter) use a single backslash at the end of the line. + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +```sh +npx run docs:generate -- --template=winter --description="Sparkling and frozen" --elements="snow,frost,ice" --snowflakes=20 +``` +````` + +⇡ **Correct** code for this rule: + +`````markdown +```sh +npx run docs:generate -- --template=winter --description="Sparkling and frozen" \ +--elements="snow,frost,ice" --snowflakes=20 +``` +````` + +## No Shell Code Dollar Sign + +Avoid to use dollar sign (`$`) in shell code. It improves the readability and prevents error when users copy and paste the code. To clarify the output of a command use e.g. a comment on the next line or optionally append it to the command on the same line, separated by a whitespace. + +> remark-lint: [no-shell-dollars][remark-lint-no-shell-dollars] + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +```sh +$ echo "The winter is sparkling and frozen!" +``` +````` + +⇡ **Correct** code for this rule: + +`````markdown +```sh +echo "The winter is sparkling and frozen!" +``` +````` + +`````markdown +```sh +winter="The winter is sparkling and frozen!" +echo $winter # The winter is sparkling and frozen! +``` +````` + +## Within Lists + +When using code blocks within lists make sure to use the correct indention to not break the list. + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +* Winter +```jsx +const Snow = ; +``` +* Frost +````` + +⇡ **Correct** code for this rule: + +`````markdown +* Winter + ```jsx + const Snow = ; + ``` +* Frost +````` + +## Inline + +Use one (1) backtick character `` ` `` to create a `inline code` span which will render all wrapped content literally. + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +The winter has ```sparkling``` and frozen ```elements```! +````` + +⇡ **Correct** code for this rule: + +```markdown +The winter has `sparkling` and frozen `elements`! +``` + +To learn what content should be wrapped please read the [use cases](#use-cases) chapter. + +## Marker Character Style + +Use backtick characters `` ` `` for both blocks and inline code. + +> remark-lint: [fenced-code-marker][remark-lint-fenced-code-marker] + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +~~~js +import React, { PureComponent } from "react"; +class Snow extends PureComponent { + // ... +} +export default Snow; +~~~ +````` + +⇡ **Correct** code for this rule: + +`````markdown +```js +import React, { PureComponent } from "react"; +class Snow extends PureComponent { + // ... +} +export default Snow; +``` +````` + +## Use Cases + +[Code Blocks](#blocks) should be used for code snippets longer than a single line or terminal command quotations that contain sample output when the being executed. + +[Inline code spans](#inline) on the other hand should be used to highlight e.g. + +* **executables** - `gcc`, `npm`, `go`, `python` +* **paths** - `/etc/hosts`, `src/main/java/com/arcticicestudio/icecore/hashids/Hashids.java` +* **version numbers** - `0.2.0`, `1.8.6-frost.2` +* **code e.g. reserved keywords, builtins and operators** - `this`, `true`/`false`, `String`, `=>` + +Don't use it for + +* **project or proper names** - e.g [React][react], [GCC][gcc], [Node.js][nodejs], [Golang][golang] or [Rust][rustlang] +* **libraries** - e.g. [libgit2][], [libc][crates-libc] (Rust Bindings), [glibc][], [glib2][] or [jackson-databind][bintray-jackson-databind] (Java) +* **packages and modules** - e.g. [react-dom][npm-react-dom], [snowsaw][pypi-snowsaw] or [archlinux-keyring][archlinux-keyring] + +[archlinux-keyring]: https://www.archlinux.org/packages/core/any/archlinux-keyring +[bintray-jackson-databind]: https://bintray.com/bintray/jcenter/com.fasterxml.jackson.core%3Ajackson-databind +[crates-libc]: https://crates.io/crates/libc +[gcc]: https://gcc.gnu.org +[gfm-spec-fenced_code_blocks]: https://github.github.com/gfm/#fenced-code-blocks +[gh-help-gfm_code_syntax_highlighting]: https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting +[glib2]: https://wiki.gnome.org/Projects/GLib +[glibc]: https://www.gnu.org/software/libc +[golang]: https://golang.org +[libgit2]: https://libgit2.github.com +[nodejs]: https://nodejs.org +[npm-react-dom]: https://www.npmjs.com/package/react-dom +[pypi-snowsaw]: https://pypi.python.org/pypi/snowsaw +[react]: https://reactjs.org +[remark-lint-code-block-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-code-block-style +[remark-lint-fenced-code-flag]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-fenced-code-flag +[remark-lint-fenced-code-marker]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-fenced-code-marker +[remark-lint-no-shell-dollars]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-shell-dollars +[rustlang]: https://www.rust-lang.org diff --git a/src/rules/comments.md b/src/rules/comments.md new file mode 100644 index 0000000..49589c5 --- /dev/null +++ b/src/rules/comments.md @@ -0,0 +1,13 @@ +## HTML + +Prefer [HTML comment syntax][w3-html5-spec-comments] to add hidden, non-rendered comments to the code. + +###### Examples + +⇡ **Correct** code for this rule: + +```markdown + +``` + +[w3-html5-spec-comments]: https://www.w3.org/TR/html51/syntax.html#sec-comments diff --git a/src/rules/emphasis.md b/src/rules/emphasis.md new file mode 100644 index 0000000..dabcf3b --- /dev/null +++ b/src/rules/emphasis.md @@ -0,0 +1,151 @@ +## Italic + +Use two (2) underscore `__` marker to generate spans for italic formatted text. + +> remark-lint: [emphasis-marker][remark-lint-emphasis-marker] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +_Winter_ +```` + +```markdown +___Snow___ +```` + +⇡ **Correct** code for this rule: + +```markdown +__Winter__ +__Snow__ +```` + +## Bold + +Use two (2) asterisk `*` marker to generate spans for bold formatted text. + +> remark-lint: [emphasis-marker][remark-lint-emphasis-marker] and [strong-marker][remark-lint-strong-marker] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +*Winter* +```` + +```markdown +***Snow*** +```` + +⇡ **Correct** code for this rule: + +```markdown +**Winter** +**Snow** +```` + +## Strikethrough + +> Note that [strikethrough][gfm-spec-strikethrough] is an **extension of GFM** and not implemented by all parsers! + +Use two (2) tilde `~` marker to generate spans for striked through text. + +> remark-lint: [emphasis-marker][remark-lint-emphasis-marker] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +~Winter~ +```` + +```markdown +~~~Snow~~~ +```` + +⇡ **Correct** code for this rule: + +```markdown +~~Winter~~ +~~Snow~~ +```` + +## No Header Replacement + +Don't use emphasis elements (bold or italics) to introduce a multi line named section. Use headers instead which is exactly the semantic meaning of headers. As a consequence, many implementations add useful behaviors to headers and not to emphasis elements, such as automatic ID generation (anchor) to make it easier to refer to the header later on. Use a level 6 header if the meaning of the header section should not stand out great. + +> remark-lint: [no-emphasis-as-heading][remark-lint-no-emphasis-as-heading] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +**Winter** + +The winter has sparkling and frozen elements! + +__Snow__ + +Snow is falling down! +```` + +⇡ **Correct** code for this rule: + +```markdown +## Winter + +The winter has sparkling and frozen elements! + +## Snow + +Snow is falling down! +```` + +```markdown +###### Winter + +The winter has sparkling and frozen elements! + +###### Snow + +Snow is falling down! +```` + +## No Inner Spacing + +Don't use inner spaces for any markers. + +> remark-lint: [no-inline-padding][remark-lint-no-inline-padding] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +** Winter ** +__ Snow __ +```` + +```markdown +** Winter ** +__ Snow __ +```` + +⇡ **Correct** code for this rule: + +```markdown +**Winter** +__Snow__ +```` + +[gfm-spec-strikethrough]: https://github.github.com/gfm/#strikethrough-extension- +[remark-lint-emphasis-marker]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-emphasis-marker +[remark-lint-no-emphasis-as-heading]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-emphasis-as-heading +[remark-lint-no-inline-padding]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-inline-padding +[remark-lint-strong-marker]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-strong-marker diff --git a/src/rules/headings.md b/src/rules/headings.md new file mode 100644 index 0000000..5c1f34e --- /dev/null +++ b/src/rules/headings.md @@ -0,0 +1,256 @@ +## ATX Style + +Always use [atx-style][atx] headings (not closed) instead of [Setext][setex]. The level can be easily seen and the number of characters must not match in both lines. ATX also works for all levels, while Setex only goes up to level 2. + +> remark-lint: [heading-style][remark-lint-heading-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +Winter +====== + +Frost +----- +``` + +No closed ATX styled headings: + +```markdown +# Winter # + +## Frost ## + +### Snow ### +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter + +## Frost + +### Snow +``` + +## Empty Lines Before And After + +Always surround headers by a single empty line except at the beginning of the file. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +... snowflakes are falling. +# Winter +Sparkling and frozen... +``` + +```markdown +... snowflakes are falling. + + +# Winter + + +Sparkling and frozen... +``` + +⇡ **Correct** code for this rule: + +```markdown +... snowflakes are falling. + +# Winter + +Sparkling and frozen... +``` + +## Content Spacing + +Always separate the marker character `#` from the actual header content using a single whitespace. + +> remark-lint: [no-heading-content-indent][remark-lint-no-heading-content-indent] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +#Winter +``` + +```markdown +# Winter +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter +``` + +## No Content Before + +Make sure that there are no other characters (including whitespaces) in front of headings. + +> remark-lint: [no-heading-indent][remark-lint-no-heading-indent] + +###### Examples + +Note: The `·` character represents a whitespace character. + +⇣ **Incorrect** code for this rule: + +```markdown +.# Winter +``` + +```markdown +·# Winter +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter +``` + +## No Duplicate + +Avoid using two or more headers with the same content in the same markdown file. many Markdown renderer generate IDs for headers based on the header content. + +> remark-lint: [no-duplicate-headings][remark-lint-no-duplicate-headings] and [no-duplicate-headings-in-section][remark-lint-no-duplicate-headings-in-section] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +# Winter + +## Snow + +# Arctic + +## Snow +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter + +## Winter Snow + +# Arctic + +## Arctic Snow +``` + +## Letter Case + +Use an upper case letter as the first letter of a header, unless it is a word that always starts with lowercase letters, e.g. proper names or code snippets. The other letters have the same case they would have in the middle of a sentence. + +As an exception, [title case][wikipedia-title_case] can be optionally used for the top-level header. Use this exception sparingly, in cases where typographical perfection is important. Using title case all the time would require too much effort to decide if edge-case words should be upper case or not. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +# winter is sparkling and frozen +``` + +Proper names or code snippets: + +```markdown +# react + +# `String` + +# Init +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter is sparkling and frozen +``` + +Proper names or code snippets: + +```markdown +# React + +# `string` + +# init main +``` + +## Length + +Prefer using short header with a maximum length of 80 character (without markers). Instead of using a huge sentence, make the header a summary and write the huge sentence as the first paragraph beneath the header. This makes it is easier to refer to the header later, specially if automatic IDs or a TOC are created. + +> remark-lint: [maximum-heading-length][remark-lint-maximum-heading-length] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +# The winter is sparkling and frozen and soft snowflakes are falling down on the world! +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter + +The winter is sparkling and frozen and soft snowflakes are falling down on the world! +``` + +## Punctuation After Content + +Don't use any punctuation at the end of a header e.g. a trailing (semi)colon `;:`, period `.`, closing marker `#` or any "sentence amplifier" (`!?`). Every header is an introduction to what is about to come next, which is exactly the function of a colon. Also the header is not a sentence, or at least only a short sentence, so there is not need to add a sentence separator to it. + +> remark-lint: [no-heading-punctuation][remark-lint-no-heading-punctuation] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +# Winter: Sparkling +``` + +```markdown +# Winter. Frozen. +``` + +```markdown +# Winter # +``` + +⇡ **Correct** code for this rule: + +```markdown +# Winter + +Sparkling and frozen. +``` + +[atx]: http://www.aaronsw.com/2002/atx/intro +[remark-lint-heading-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-heading-style +[remark-lint-maximum-heading-length]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-maximum-heading-length +[remark-lint-no-duplicate-headings]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-duplicate-headings +[remark-lint-no-duplicate-headings-in-section]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-duplicate-headings-in-section +[remark-lint-no-heading-content-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-heading-content-indent +[remark-lint-no-heading-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-heading-indent +[remark-lint-no-heading-punctuation]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-heading-punctuation +[setex]: http://docutils.sourceforge.net/mirror/setext.html +[wikipedia-title_case]: https://en.wikipedia.org/wiki/Letter_case#Title_case diff --git a/src/rules/horizontal-rules.md b/src/rules/horizontal-rules.md new file mode 100644 index 0000000..8dffc5f --- /dev/null +++ b/src/rules/horizontal-rules.md @@ -0,0 +1,101 @@ +## Marker Character Style + +A horizontal rule must consist of three (3) hyphens (`-`) without spaces. + +> remark-lint: [rule-style][remark-lint-rule-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +- +``` + +```markdown +-- + +- - +``` + +```markdown +-- - + +- -- +``` + +⇡ **Correct** code for this rule: + +```markdown +--- +``` + +## No Prepended Or Appended Content + +Make sure that there are no other prepended or appended characters (including whitespaces). + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +.--- +``` + +```markdown + --- +``` + +```markdown +---x +``` + +```markdown +--- +``` + +⇡ **Correct** code for this rule: + +```markdown +--- +``` + +## Empty Lines Before And After + +Always surround lines by a single empty line except at the beginning of the file. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +... snowflakes are falling. +--- +Sparkling and frozen... +``` + +```markdown +... snowflakes are falling. + + +--- + + +Sparkling and frozen... +``` + +⇡ **Correct** code for this rule: + +```markdown +... snowflakes are falling. + +--- + +Sparkling and frozen... +``` + +## Use Cases + +Horizontal rules can be used to separate sections when headers are not applicable or to separate base document elements like a header, body and footer. + +[remark-lint-rule-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-rule-style diff --git a/src/rules/images.md b/src/rules/images.md new file mode 100644 index 0000000..63177ec --- /dev/null +++ b/src/rules/images.md @@ -0,0 +1,41 @@ +## Absolute URLs + +Prefer absolute URLs instead of relative ones to improve the portability of the document. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +![snowflake icon][snowflake] snowflakes falling down in the winter! + +[snowflake]: ../assets/snowflake.png +``` + +⇡ **Correct** code for this rule: + +```markdown +![snowflake icon][snowflake] snowflakes falling down in the winter! + +[snowflake]: https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/src/assets/snowflake.png +``` + +## Badges + +Use badges to represent simple information like latest version number and URL to its docs, the status of CI builds or fetched information of external systems like e.g. the latest version and total download amount from the [NPM registry][npm] or [Rust crates][crates.io]. + +###### Examples + +⇡ **Correct** code for this rule: + +```markdown +[![Nord GitHub Shield Latest Release][shields-gh-releases-nord]][nord-gh-releases] [![Nord NPM Registry Shield Latest Release Version Number][shields-npm-version-nord]][npm-nord] + +[nord-gh-releases]: https://github.com/arcticicestudio/nord/releases/latest +[npm-nord]: https://www.npmjs.com/package/nord +[shields-npm-version-nord]: https://img.shields.io/npm/v/nord.svg?style=flat-square +[shields-gh-releases-nord]: https://img.shields.io/github/release/arcticicestudio/nord.svg?style=flat-square +``` + +[crates.io]: https://crates.io +[npm]: https://npmjs.com diff --git a/src/rules/index.md b/src/rules/index.md new file mode 100644 index 0000000..22cdf5a --- /dev/null +++ b/src/rules/index.md @@ -0,0 +1,13 @@ + + + This section contains rules for Markdown with support for GitHub Flavored Markdown which is based on the CommonMark specification. + +Markdown is a [lightweight markup language][wikipedia-lightweight_markup_language] with plain text formatting syntax for writing structured documents. It is designed so that it can be converted to HTML and many other formats. + +As the initial specification of Markdown contained ambiguities and unanswered questions, many implementations and extensions of Markdown in many languages appeared over the years to answer these issues. Some extended the original Markdown syntax with conventions for footnotes, tables, and other document elements and allowed Markdown documents to be rendered in many formats other than HTML. + +Today the most used specifications are [CommonMark][commonmark] and its superset [GitHub Flavored Markdown][gfm] which powers the content of many large websites like GitHub, StackOverflow, and Reddit used by millions of people. And Markdown started to be used beyond the web, to author books, articles, slide shows, letters, and lecture notes. + +[commonmark]: http://commonmark.org +[gfm]: https://github.github.com/gfm +[wikipedia-lightweight_markup_language]: https://en.wikipedia.org/wiki/Lightweight_markup_language diff --git a/src/rules/links.md b/src/rules/links.md new file mode 100644 index 0000000..faaa630 --- /dev/null +++ b/src/rules/links.md @@ -0,0 +1,520 @@ +## Prefer Reference Links + +Always use [reference links][gfm-spec-links-ref] instead of [inline](#inline) links except for inner anchor links ([fragment identifiers][w3-html5-spec-navigate_fragment_identifier]). + +There are three kinds of reference links: full, collapsed, and shortcut. +This can be one of the three reference link types: + +* [full][gfm-spec-links-ref_full] +* [collapsed][gfm-spec-links-ref_collapsed] +* [short][gfm-spec-links-ref_short] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +[Winter](https://the-winter-is-sparkling-and-frozen.io) +``` + +⇡ **Correct** code for this rule: + +```markdown +[Winter](#winter) + +## Winter +``` + +```markdown +[Winter][winter-info] + +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Inline + +If it is necessary to use inline links instead of the preferred [reference links](prefer-reference-links) try to use shortened URLs wherever possible to keep the line length overhead as small as possible. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +[Winter](https://the-winter-is-sparkling-and-frozen-and-snow-falls-down.io) +``` + +⇡ **Correct** code for this rule: + +```markdown +[Winter](https://sho.rt/l1n-k) +``` + +## Definition Placement + +Always place reference links at the bottom of the document. This keeps the focus of the reader on the content and increases the maintainability. + +> remark-lint: [final-definition][remark-lint-final-definition] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[winter-info]: https://the-winter-is-sparkling-and-frozen.io + +Many snowflakes are falling down. +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +Many snowflakes are falling down. + +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Empty Line Before + +Always add a single empty line before the first reference link. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Letter Case + +Only use lower case letters for reference link IDs. This increases the readability and prevents errors since links are [case-insensitive][gfm-spec-links-case_insensitive]. + +> remark-lint: [definition-case][remark-lint-definition-case] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][WinterInfo] is sparkling and frozen! [Snowflakes][snowFlakes-Info] are falling. + +[snowFlakes-Info]: https://in-the-winter-many-snowflakes-are-falling.io +[WinterInfo]: https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## No ID Inner Spacing + +Don't use inner spaces within link IDs. + +> remark-lint: [no-inline-padding][remark-lint-no-inline-padding] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][ winter-info ] is sparkling and frozen! + +[Snowflakes][ snowflakes-info ] are falling. + +[ snowflakes-info ]: https://in-the-winter-many-snowflakes-are-falling.io +[ winter-info ]: https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## No Trailing Or Leading Title Spaces + +Don't use trailing or leading spaces in link titles. Add necessary spaces before or after the brackets/braces (`[]`, `()`) to format links within flowing text. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The[ Winter ][winter-info]is sparkling and frozen![ Snowflakes ][snowflakes-info]are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Spacing After Colon + +Only use a single space after the colon of [reference links](#prefer-reference-links). Don't add multiple spaces to e.g. align the URLs of reference links vertically. + +> remark-lint: [definition-spacing][remark-lint-definition-spacing] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]:https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]:https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Sorting + +Always sort reference links alphabetically by their IDs. Each [reference link group](#reference-link-groups) must be sorted independent of others! + +It is home for many beautiful animals like snowy owls, arctic foxes, and grizzly bears + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +[Snowflakes][snowflakes-info] are falling. + +The [Winter][winter-info] is sparkling and frozen! + +The [Arctic][arctic-animals] is home for many beautiful animals. + +Snowballs are made of [1000s of snowflakes][1000-snowball_flakes]. + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +[arctic-animals]: https://arctic-home-for.animals +[1000-snowball_flakes]: https://1000-snowball.flakes +``` + +⇡ **Correct** code for this rule: + +```markdown +[Snowflakes][snowflakes-info] are falling. + +The [Winter][winter-info] is sparkling and frozen! + +The [Arctic][arctic-animals] is home for many beautiful animals. + +Snowballs are made of [1000s of snowflakes][1000-snowball_flakes]. + +[1000-snowball_flakes]: https://1000-snowball.flakes +[arctic-animals]: https://arctic-home-for.animals +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +[winter-info]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Reference Link Groups + +Use blocks for internal and external reference links separated by one (1) empty line. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[winter-info]: winter/info.md +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +``` + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[winter-info]: winter/info.md + + + + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! [Snowflakes][snowflakes-info] are falling. + +[winter-info]: winter/info.md + +[snowflakes-info]: https://in-the-winter-many-snowflakes-are-falling.io +``` + +## Reference Link Group Ordering + +It is more convenient to always follow the same organization for reference link order to easier find internal and external targets. + +1. Internal links group + 1.1 [full reference links][gfm-spec-links-ref_full] + 1.2 [collapsed reference links][gfm-spec-links-ref_collapsed] + 1.2 [short reference links][gfm-spec-links-ref_short] +2. External links group + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[Snowflakes][] are falling. + +The [Arctic][arctic-animals] is home for many beautiful animals. + +[snowflakes]: https://in-the-winter-many-snowflakes-are-falling.io + +[arctic-animals]: arctic-animals.md +[winter-info]: winter/info.md +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[Snowflakes][] are falling. + +The [Arctic][arctic-animals] is home for many beautiful animals. + +[arctic-animals]: arctic-animals.md +[winter-info]: winter/info.md + +[snowflakes]: https://in-the-winter-many-snowflakes-are-falling.io +``` + +## No Unused + +Remove unused reference links to improve the overview and maintainability. + +> remark-lint: [no-unused-definitions][remark-lint-no-unused-definitions] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[arctic-animals]: arctic-animals.md +[snowflakes]: snow/flakes.md +[winter-info]: winter/info.md +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter-info] is sparkling and frozen! + +[winter-info]: winter/info.md +``` + +## No Undefined + +Never use references that are not defined. + +> remark-lint: [no-undefined-references][remark-lint-no-undefined-references] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [Winter][winter] is sparkling and frozen! +``` + +⇡ **Correct** code for this rule: + +```markdown +The [Winter][winter] is sparkling and frozen! + +[winter]: https://the-winter-is-sparkling-and-frozen.io +``` + +## Autolink Protocol + +Always add a valid protocol when using [autolinks][gfm-spec-links-autolinks]. + +> remark-lint: [no-auto-link-without-protocol][remark-lint-no-auto-link-without-protocol] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +www.arcticicestudio.com + +arcticicestudio.com +``` + +⇡ **Correct** code for this rule: + +```markdown +https://arcticicestudio.com + +https://www.arcticicestudio.com + +http://arcticicestudio.com + +http://www.arcticicestudio.com +``` + +```markdown +mailto:code@arcticicestudio.com +``` + +## Unique IDs + +Reference link IDs must be unique within a document file. + +> remark-lint: [no-duplicate-definitions][remark-lint-no-duplicate-definitions] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +[snow]: snow/flakes.md +[snow]: snow/index.md +``` + +⇡ **Correct** code for this rule: + +```markdown +[snow]: snow/index.md +[snowflakes]: snow/flakes.md +``` + +## No Empty URL + +Don't use links or images with empty URLs. + +> remark-lint: [no-empty-url][remark-lint-no-empty-url] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [winter][winter] is sparkling and frozen! + +![snowflake image][snowflake] + +[snowflake]: +[winter]: +``` + +```markdown +The [winter]() is sparkling and frozen! + +![snowflake image]() +``` + +⇡ **Correct** code for this rule: + +```markdown +The [winter][winter] is sparkling and frozen! + +![snowflake image][snowflake] + +[snowflake]: https://snow-is-falling-down.io/snowflake.png +[winter]: https://the-winter-is-sparkling-and-frozen.io +``` + +```markdown +The [winter](https://the-winter-is-sparkling-and-frozen.io) is sparkling and frozen! + +![snowflake image](https://snow-is-falling-down.io/snowflake.png) +``` + +## No Reference Like URL + +Never use URLs that are also defined reference link identifiers. + +> remark-lint: [no-reference-like-url][remark-lint-no-reference-like-url] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The [winter](winter) is sparkling and frozen! + +[winter]: https://the-winter-is-sparkling-and-frozen.io +``` + +⇡ **Correct** code for this rule: + +```markdown +The [winter](https://the-winter-is-sparkling-and-frozen.io) is sparkling and frozen! + +[winter]: https://the-winter-is-sparkling-and-frozen.io +``` + +[gfm-spec-links-autolinks]: https://github.github.com/gfm/#autolinks +[gfm-spec-links-case_insensitive]: https://github.github.com/gfm/#example-170 +[gfm-spec-links-ref]: https://github.github.com/gfm/#reference-link +[gfm-spec-links-ref_collapsed]: https://github.github.com/gfm/#collapsed-reference-link +[gfm-spec-links-ref_full]: https://github.github.com/gfm/#full-reference-link +[gfm-spec-links-ref_short]: https://github.github.com/gfm/#shortcut-reference-link +[remark-lint-definition-case]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-definition-case +[remark-lint-definition-spacing]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-definition-spacing +[remark-lint-final-definition]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-final-definition +[remark-lint-no-auto-link-without-protocol]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-auto-link-without-protocol +[remark-lint-no-duplicate-definitions]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-duplicate-definitions +[remark-lint-no-empty-url]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-empty-url +[remark-lint-no-inline-padding]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-inline-padding +[remark-lint-no-reference-like-url]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-reference-like-url +[remark-lint-no-undefined-references]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-undefined-references +[remark-lint-no-unused-definitions]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-unused-definitions +[w3-html5-spec-navigate_fragment_identifier]: https://www.w3.org/TR/html52/browsers.html#navigating-to-a-fragment-identifier diff --git a/src/rules/lists.md b/src/rules/lists.md new file mode 100644 index 0000000..ea46bfd --- /dev/null +++ b/src/rules/lists.md @@ -0,0 +1,422 @@ +## Unordered Marker + +Use asterisk `*` marker. + +> remark-lint: [unordered-list-marker-style][remark-lint-unordered-list-marker-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +- Winter +- Snow +- Frost +```` + +```markdown ++ Winter ++ Snow ++ Frost +```` + +⇡ **Correct** code for this rule: + +```markdown +* Winter +* Snow +* Frost +```` + +## Ordered Marker + +Use continuous numerating marker for ordered list items. This increases the readability and overview and allows to refer to items by their number in the same markdown file or externally. It also allows to create sub-items which is not possible if the same number will be used for all top-level items. The marker character must be a dot (`.`), characters like a closing brace (`)`) are not allowed since they are only supported in CommonMark. + +The only disadvantage is that references break when a new list item is added. This problem can be reduced by + +* using an unordered list until the final structure and layout has been determined. +* keeping references close to the list so authors are less likely to forget to update them. +* always specify an specific version of the markdown file when referring from an external document. + +> remark-lint: [ordered-list-marker-style][remark-lint-ordered-list-marker-style] and [ordered-list-marker-value][remark-lint-ordered-list-marker-value] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +1. Winter +1. Snow + 1.1 Snowflakes +1. Frost +```` + +```markdown +1) Winter +1) Snow + 1.1) Snowflakes +1) Frost +```` + +```markdown +1) Winter +2) Snow + 2.1) Snowflakes +3) Frost +```` + +⇡ **Correct** code for this rule: + +```markdown +1. Winter +2. Snow + 2.1 Snowflakes +3. Frost +```` + +## No Content Before + +Make sure that there are no other characters (including whitespaces) in front of each list item. + +> remark-lint: [list-item-bullet-indent][remark-lint-list-item-bullet-indent] + +###### Examples + +Note: The `·` character represents a whitespace character. + +⇣ **Incorrect** code for this rule: + +```markdown +x* Winter + * Snow + .* Snowflakes +"* Frost +·* Frost +``` + +```markdown +x1. Winter + 2. Snow + .2.1 Snowflakes +"3. Frost +·3. Frost +``` + +⇡ **Correct** code for this rule: + +```markdown +* Winter +* Snow + * Snowflakes +* Frost +``` + +```markdown +1. Winter +2. Snow + 2.1 Snowflakes +3. Frost +``` + +## Continuous Indentation + +Use two (2) whitespaces for continuous indentation of nested items and their content. + +> remark-lint: [list-item-content-indent][remark-lint-list-item-content-indent] and [list-item-indent][remark-lint-list-item-indent] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +* Winter + * Snow +* Snowflakes + * Frost +* Arctic + * Sparkling + * Frozen +``` + +```markdown +* Winter + Sparkling and frozen! +* Snowflakes + Made of snow! +* Snow + Falls down! + Arctic beauty +``` + +`````markdown +* Winter + ```js + import React, { PureComponent } from "react"; + class Frost extends PureComponent { + // ... + } + export default Frost; + ``` + * Snow + ```java + import static winter.Snow; + String[] flakes = Snow.getFlakes(); + ``` + * Frost + > Sparkling and frozen! +````` + +⇡ **Correct** code for this rule: + +```markdown +* Winter + * Snow +* Snowflakes + * Frost +* Arctic + * Sparkling + * Frozen +``` + +```markdown +* Winter + Sparkling and frozen! +* Snowflakes + Made of snow! +* Snow + Falls down! + Arctic beauty +``` + +`````markdown +* Winter + ```js + import React, { PureComponent } from "react"; + class Frost extends PureComponent { + // ... + } + export default Frost; + ``` + * Snow + ```java + import winter.Snow; + String[] flakes = Snow.getFlakes(); + ``` + * Frost + > Sparkling and frozen! +````` + +## Empty Lines + +A list must not contain blank lines between each list item. + +> remark-lint: [list-item-spacing][remark-lint-list-item-spacing] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +* Winter + +* Snow + + * Snowflakes + +* Frost +``` + +⇡ **Correct** code for this rule: + +```markdown +* Winter +* Snow + * Snowflakes +* Frost +``` + +## Empty Lines Before And After + +Always surround lists by a single empty line except at the beginning of the file. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +... snowflakes are falling. +* Winter +* Snow + * Snowflakes +* Frost +Sparkling and frozen... +``` + +```markdown +... snowflakes are falling. + + +* Winter +* Snow + * Snowflakes +* Frost + + +Sparkling and frozen... +``` + +⇡ **Correct** code for this rule: + +```markdown +... snowflakes are falling. + +* Winter +* Snow + * Snowflakes +* Frost + +Sparkling and frozen... +``` + +## Letter Case + +The case depends on the part of speech and syntax a list item contains. In general use upper cases for enumerations because most of the time the content is a noun, proper name, code snippet or standalone sentence. + +When the list items are meant to be imaginary concatenated with the sentence that comes before the list, adapt to the same case as the context. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +The winter has + +* Many snowflakes that are falling down. +* Sparkling and frozen elements! +* A lot of beautiful animals like snowy owls, arctic foxes, and grizzly bears. +``` + +Enumerations or context-dependent: + +```markdown +The winter has + +* **snowflakes** - They are falling down. +* **elements** - They are sparkling and frozen! +* **beautiful animals** - Like e.g a lot of snowy owls, arctic foxes, and grizzly bears. +``` + +Proper names or code snippets: + +```markdown +A list for + +* react +* `string` +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has + +* many snowflakes that are falling down. +* sparkling and frozen elements! +* a lot of beautiful animals like snowy owls, arctic foxes, and grizzly bears. +``` + +Enumerations or context-dependent: + +```markdown +The winter has + +* **Snowflakes** - They are falling down. +* **Elements** - They are sparkling and frozen! +* **Beautiful animals** - e.g a lot of snowy owls, arctic foxes, and grizzly bears. +``` + +Proper names or code snippets: + +```markdown +A list for + +* React +* `String` +``` + +## Punctuation After Items + +Use punctuation at the end of a list item when it contains a sentence that starts with an upper case letter or multiple sentences or paragraphs. Omit the punctuation for single words. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +* Winter. +* Snow. +* Frost. +``` + +```markdown +The Winter is + +* sparkling and frozen +* cold and snowy +* bright and enlightened +``` + +⇡ **Correct** code for this rule: + +```markdown +* Winter +* Snow +* Frost +``` + +```markdown +The Winter is + +* sparkling and frozen. +* cold and snowy. +* bright and enlightened. +``` + +## Checkbox Character Style + +Use `x` for ticked checkboxes and a single space ` ` for non ticked checkboxes. + +> remark-lint: [checkbox-character-style][remark-lint-checkbox-character-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +* [!] Winter +* [~] Snow +* [»] Frost +``` + +```markdown +* [] Winter +* [ ] Snow +* [ ] Frost +``` + +⇡ **Correct** code for this rule: + +```markdown +* [x] Winter +* [ ] Snow +* [x] Frost +``` + +[remark-lint-checkbox-character-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-checkbox-character-style +[remark-lint-list-item-bullet-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-list-item-bullet-indent +[remark-lint-list-item-content-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-list-item-content-indent +[remark-lint-list-item-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-list-item-indent +[remark-lint-list-item-spacing]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-list-item-spacing +[remark-lint-ordered-list-marker-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-ordered-list-marker-style +[remark-lint-ordered-list-marker-value]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-ordered-list-marker-value +[remark-lint-unordered-list-marker-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-unordered-list-marker-style diff --git a/src/rules/naming-conventions.md b/src/rules/naming-conventions.md new file mode 100644 index 0000000..e7d2704 --- /dev/null +++ b/src/rules/naming-conventions.md @@ -0,0 +1,62 @@ +## File Extension + +Always use `.md` file extension also for files with [GFM syntax][gfm]. + +> remark-lint: [file-extension][remark-lint-file-extension] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```raw +ice.gfm +snow.mdk +frost.markdown +```` + +⇡ **Correct** code for this rule: + +```markdown +ice.md +snow.md +frost.md +```` + +## File Naming + +Always prefer [spinal-case][wikipedia-letter_case-special_styles] (also named [*kebab-case* or *hyphen-separated*][stackoverflow-11273282]) for file names and use [snake_case][wikipedia-snake_case] only if it contributes to a better understanding of the content. + +> remark-lint: [no-file-name-mixed-case][remark-lint-no-file-name-mixed-case] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```raw +winterSeason.md +IceCold.md +snow fall.md +```` + +⇡ **Correct** code for this rule: + +```raw +winter_season.md +ice_cold.md +snow_fall.md +```` + +⇢ **Recommended** code for this rule: + +```raw +winter-season.md +ice-cold.md +snow-fall.md +```` + +[gfm]: https://github.github.com/gfm +[remark-lint-file-extension]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-file-extension +[remark-lint-no-file-name-mixed-case]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-file-name-mixed-case +[stackoverflow-11273282]: https://stackoverflow.com/questions/11273282/whats-the-name-for-hyphen-separated-case/12273101 +[wikipedia-letter_case-special_styles]: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles +[wikipedia-snake_case]: https://en.wikipedia.org/wiki/Snake_case diff --git a/src/rules/paragraphs.md b/src/rules/paragraphs.md new file mode 100644 index 0000000..819ca47 --- /dev/null +++ b/src/rules/paragraphs.md @@ -0,0 +1,30 @@ +## No Indentation + +Never indent the content of paragraphs. + +> remark-lint: [no-paragraph-content-indent][remark-lint-no-paragraph-content-indent] + +###### Examples + +Note: The `·` character represents a whitespace. + +⇣ **Incorrect** code for this rule: + +```markdown +·The winter has sparkling and frozen elements! +·Many snowflakes are falling down. +``` + +```markdown +······The winter has sparkling and frozen elements! +········Many snowflakes are falling down. +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has sparkling and frozen elements! +Many snowflakes are falling down. +``` + +[remark-lint-no-paragraph-content-indent]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-paragraph-content-indent diff --git a/src/rules/raw-html.md b/src/rules/raw-html.md new file mode 100644 index 0000000..e4a3266 --- /dev/null +++ b/src/rules/raw-html.md @@ -0,0 +1,75 @@ +> Please prefer standard Markdown syntax wherever possible and only use HTML if you can't accomplish the goal with the Markdown syntax! Raw HTML reduces the readability and portability, but can improve the design, layout and overview of rendered documents. +> Anyway, consider to **use raw HTML sparingly and only if necessary**! + +## Aligned Content + +Use a [HTML paragraph `
`][mdn-html-element-p] tag with the `align` attribute. Although if the [HTML 5 specification][w3-html5-spec-element-p] states that the `align` attribute is obsolete it is the only possible solution because the [`style` tag is disallowed raw HTML][gfm-spec-disallowed_raw_html] within Markdown so the CSS [`text-align`][mdn-css-text-align] property can not be used. + +Aligning content can improve the design and layout e.g. images and project logos by either using `center`, `left` or `right` as value for the `align` attribute. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +
The winter is winter is sparkling and frozen!
+```` + +⇡ **Correct** code for this rule: + +```markdown +The winter is winter is sparkling and frozen!
+```` + +## Inline Content + +Use a [HTML ``][mdn-html-element-img] to add inline content like images or icons for better visualization. This allows to use e.g. a favicon of a website and define its size with the `width` and `height` attributes using either a pixel or percentage (withdouble quotes for the `%` character) value. + +Although MDN states that the `width` and `height` attributes are deprecated and [advises to replace them with the corresponding CSS attributes][mdn-html-attributes], but it is the only possible solution because the [`style` tag is disallowed raw HTML][gfm-spec-disallowed_raw_html] within Markdown so the CSS [`width`][mdn-css-width] and [`height`][mdn-css-height] property can not be used. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +Sparkling snowflakes falling down in the winter! +```` + +No way to define the size: +```markdown +Sparkling ![snowflake icon](https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/src/assets/snowflake.png) snowflakes falling down in the winter! +```` + +⇡ **Correct** code for this rule: + +```markdown +Sparkling snowflakes falling down in the winter! +```` + +## Collapsed Content + +Use the HTML [``][mdn-html-element-details] tag to add collapsible content. It creates a disclosure widget in which information is visible only when the widget is toggled into an *open* state. A summary or label can be provided using the [``][mdn-html-element-summary] element. + +This can be useful to e.g. hide large table of contents or code blocks that might disturb the focus or force the reader to scroll long sites. + +###### Examples + +⇡ **Correct** code for this rule: + +```markdown +
++```` + +[gfm-spec-disallowed_raw_html]: https://github.github.com/gfm/#disallowed-raw-html-extension- +[mdn-css-height]: https://developer.mozilla.org/en-US/docs/Web/CSS/height +[mdn-css-text-align]: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align +[mdn-css-width]: https://developer.mozilla.org/en-US/docs/Web/CSS/width +[mdn-html-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes +[mdn-html-element-details]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details +[mdn-html-element-img]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img +[mdn-html-element-p]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p +[mdn-html-element-summary]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary +[w3-html5-spec-element-p]: https://www.w3.org/TR/html5/grouping-content.html#the-p-element diff --git a/src/rules/strings.md b/src/rules/strings.md new file mode 100644 index 0000000..a5f1733 --- /dev/null +++ b/src/rules/strings.md @@ -0,0 +1,53 @@ +## Quotes + +Use double quotes `""` for strings: + +* **Double quotes can be used for inline HTML**. +* **Consistency to other style guides**. Double quotes are used by many code styles like e.g. [Java][styleguide-java-ghio] and [JavaScript][styleguide-javascript-ghio]. +* **Parallelism to the natural language**. Double quotes are used to identify a passage of quoted text. When using single quotes, the reader may misinterpret it as a contraction. The other meaning of a passage of text surrounded by the `'` indicates the *colloquial* meaning. It makes sense to stay consistent with pre-existing languages, and this may likely ease the learning and interpretation of code. + +> remark-lint: [link-title-style][remark-lint-link-title-style] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +'The winter is sparkling and frozen!' +``` + +⇡ **Correct** code for this rule: + +```markdown +"The winter is sparkling and frozen!" +``` + +## Line Length + +Strings that cause the line to go over 100 characters should not be written across multiple lines using string concatenation. Broken strings are painful to work with and make code less searchable. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +"Cupcake ipsum candy pudding soufflé chocolate. Croissant \ +muffin biscuit brownie caramels pudding toffee pie. Tiramisu cookie ice cream \ +cake dessert icing donut." +``` + +```markdown +"Cupcake ipsum candy pudding soufflé chocolate. Croissant" + + "muffin biscuit brownie caramels pudding toffee pie. Tiramisu cookie ice cream " + + "cake dessert icing donut." +``` + +⇡ **Correct** code for this rule: + +```markdown +"Cupcake ipsum candy pudding soufflé chocolate. Croissant muffin biscuit brownie caramels pudding toffee pie. Tiramisu cookie ice cream cake dessert icing donut." +``` + +[remark-lint-link-title-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-link-title-style +[styleguide-java-ghio]: https://arcticicestudio.github.io/styleguide-java +[styleguide-javascript-ghio]: https://arcticicestudio.github.io/styleguide-javascript diff --git a/src/rules/tables.md b/src/rules/tables.md new file mode 100644 index 0000000..2c8133d --- /dev/null +++ b/src/rules/tables.md @@ -0,0 +1,295 @@ +## Prefer Lists + +Prefer [lists][lists] and only use tables for small, non-complex and single line content. +Complex, large tables are difficult to read in source and most importantly, a pain to modify, indent and also read later e.g. when using + +* line breaks within rows +* very long sentences that must be wrapped +* document elements like [code blocks][code-blocks] or [blockquotes][blockquotes] +* [inline links][links-inline] with long URLs + +Lists and subheadings usually suffice to present the same information in a slightly less compact, though much more edit-friendly and more elegant way. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +| Element | URL | Note | Attributes | Types | +| :------: | --- | ---- | ---------- | ----- | +| Snow | [Wikipedia](http://this-is-a-very-long-url-for-information-about-snowflakes.com) | It falls down in winter! | soft, damp, crystal-like | powder snow, wet snow, lazy snow | +| Frost | [Wikipedia](http://this-is-a-very-long-url-for-information-about-frost-and-the-winter-season.com) | Sparkling and frozen! | cold, grainy | permafrost, hard rime, ground frost | +``` + +⇡ **Correct** code for this rule: + +```markdown +## Elements + +### Snow + +* [Wikipedia][wikipedia-snow] +* It falls down in winter! +* Attributes: + * soft + * damp + * crystal-like +* Types: + * powder snow + * wet snow + * lazy snow + +## Frost + +* [Knowledge Base][knowledge_base-frost] +* Sparkling and frozen! +* Attributes: + * cold + * grainy +* Types: + * permafrost + * hard rime + * ground frost + +[knowledge_base-frost]: http://this-is-a-very-long-url-for-information-about-frost-and-the-winter-season.com +[wikipedia-snow]: http://this-is-a-very-long-url-for-information-about-snow.com +``` + +For small, non-complex and single line content: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling | +| Ice | Frozen | +``` + +## Empty Lines Before And After + +Always surround tables by a single empty line except at the beginning of the file. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +... snowflakes are falling. +| Element | Attribute | +| ------- | --------- | +| Snow | Falling | +| Frost | Sparkling | +| Ice | Cold | +Sparkling and frozen... +``` + +```markdown +... snowflakes are falling. + + +| Element | Attribute | +| ------- | --------- | +| Snow | Falling | +| Frost | Sparkling | +| Ice | Cold | + + +Sparkling and frozen... +``` + +⇡ **Correct** code for this rule: + +```markdown +... snowflakes are falling. + +| Element | Attribute | +| ------- | --------- | +| Snow | Falling | +| Frost | Sparkling | +| Ice | Cold | + +Sparkling and frozen... +``` + +## Content Spacing + +Surround the content of headers and cells with at least one (1) single whitespace. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +|Element|Attribute| +| ----- | ------- | +|Frost|Sparkling | +``` + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling | +``` + +⇡ **Correct** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling | +``` + +## Header Delimiter Row Spacing + +The delimiter row must only consist of cells whose only content are hyphens (`-`) surrounded by a single whitespace, and optionally, a leading or trailing colon (`:`), or both, to indicate left, right, or center alignment respectively. + +> remark-lint: [table-cell-padding][remark-lint-table-cell-padding] and [table-pipe-alignment][remark-lint-table-pipe-alignment] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +| Element | Attribute | +|---------|-----------| +| Frost | Sparkling | +``` + +```markdown +| Element | Attribute | +|---------|-----------| +| Frost | Sparkling | +``` + +```markdown +| Element | Attribute | +|--- | --- | +| Frost | Sparkling | +``` + +```markdown +| Element | Attribute | +|:-------:|----------:| +| Frost | Sparkling | +``` + +⇡ **Correct** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling | +``` + +```markdown +| Element | Attribute | +| :-----: | --------: | +| Frost | Sparkling | +``` + +## Minimum Column Width + +The minimum column width is determined by the cell with the longest content in the column. + +> remark-lint: [table-pipe-alignment][remark-lint-table-pipe-alignment] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling and frozen! | +| Snow | Falling down! | +``` + +⇡ **Correct** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling and frozen! | +| Snow | Falling down! | +``` + +## Alignment + +Always align tables vertically. + +Unaligned tables are easier to write, but tables with aligned border pipes (`|`) are more readable. Preceding pipes make it easier to determine where a table starts and ends. Trailing pipes make it look better because of symmetry. + +> remark-lint: [table-pipes][remark-lint-table-pipes] + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +| Element | Attribute | +| --- | --- | +| Frost | Sparkling and frozen! | +| Snow | Falling down! | +| Ice | Everything is smooth and slippery in winter! | +``` + +⇡ **Correct** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling and frozen! | +| Snow | Falling down! | +| Ice | Everything is smooth and slippery in winter! | +``` + +## No Indentation + +Never indent tables. + +> remark-lint: [no-table-indentation][remark-lint-no-table-indentation] + +###### Examples + +Note: The `·` character represents a whitespace. + +⇣ **Incorrect** code for this rule: + +```markdown +·| Element | Attribute | +·| ------- | --------- | +·| Frost | Sparkling and frozen! | +·| Snow | Falling down! | +``` + +```markdown +··| Element | Attribute | +··| ------- | --------- | +··| Frost | Sparkling and frozen! | +··| Snow | Falling down! | +``` + +```markdown +·········| Element | Attribute | +·········| ------- | --------- | +·········| Frost | Sparkling and frozen! | +·········| Snow | Falling down! | +``` + +⇡ **Correct** code for this rule: + +```markdown +| Element | Attribute | +| ------- | --------- | +| Frost | Sparkling and frozen! | +| Snow | Falling down! | +``` + +[blockquotes]: blockquotes.md +[code-blocks]: code.md#blocks +[lists]: lists.md +[links-inline]: links.md#inline + +[remark-lint-no-table-indentation]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-table-indentation +[remark-lint-table-cell-padding]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-table-cell-padding +[remark-lint-table-pipe-alignment]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-table-pipe-alignment +[remark-lint-table-pipes]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-table-pipes diff --git a/src/rules/whitespace.md b/src/rules/whitespace.md new file mode 100644 index 0000000..6739d14 --- /dev/null +++ b/src/rules/whitespace.md @@ -0,0 +1,222 @@ +## Indentation Character + +Always use spaces characters where two (2) spaces are used for indentation. **The usage of tab characters is disallowed**. A tab could be a different number of columns depending on the environment, but a space is always one column. Adhering to this rule increases the code readability and maintainability significantly. + +> remark-lint: [no-tabs][remark-lint-no-tabs] + +###### Examples + +Note: The `»` character represents a tab. + +⇣ **Incorrect** code for this rule: + +```markdown +The winter has sparkling and frozen elements! + » This line contains a tab character. +} +``` + +```markdown +The winter has sparkling and frozen elements! + This line contains 4 space characters. +} +``` + +```markdown +The winter has sparkling and frozen elements! + This line contains only 1 space character. +} +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has sparkling and frozen elements! + This line contains 2 space characters. +} +``` + +## Newline + +End files with a single [newline][wikipedia-newline] character. Always use unix-style _LF_ linebreaks (`\n`, denoted as `␊`) and avoid the usage of Microsoft Windows _CRLF_ characters (`\r\n`, denoted as `␍␊`). + +> remark-lint: [final-newline][remark-lint-final-newline] and [linebreak-style][remark-lint-linebreak-style] + +###### Examples + +Note: The `¬` character represents a line break. + +⇣ **Incorrect** code for this rule: + +```markdown +The winter has sparkling and frozen elements! +Many snowflakes are falling down. +``` + +```markdown +The winter has sparkling and frozen elements! +Many snowflakes are falling down.¬ +¬ + +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has sparkling and frozen elements! +Many snowflakes are falling down.¬ + +``` + +###### References + +* [Wikipedia: _Control Character_][wikipedia-control_character] + +## Before Blocks + +Always add one (1) blank line before blocks except the first line of the file. + +> remark-lint: [no-consecutive-blank-lines][remark-lint-no-consecutive-blank-lines] and [no-missing-blank-lines][remark-lint-no-missing-blank-lines] + +###### Examples + +Note: The `¬` character represents a line break. + +⇣ **Incorrect** code for this rule: + +```markdown +The winter has sparkling and frozen elements! +Many snowflakes are falling down. +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has sparkling and frozen elements! +¬ +Many snowflakes are falling down. +``` + +## After Sentences + +Use a single space after sentences. + +###### Examples + +⇣ **Incorrect** code for this rule: + +```markdown +Many snowflakes are falling down. The winter has sparkling and frozen elements! +``` + +```markdown +Many snowflakes are falling down.The winter has sparkling and frozen elements! +``` + +⇡ **Correct** code for this rule: + +```markdown +Many snowflakes are falling down. The winter has sparkling and frozen elements! +``` + +## Maximum Line Length + +In contrast to source code, where lines contain statements that can be almost always be broken up or indented, this rule can not be applied to flowing text. The author should be able to write sentences and text blocks without worrying about the line length. + +Other style guides suggest to use line breaks after the character limit has been reached, but this will lead to deformed rendered output since GFM supports [soft line breaks][gfm-spec-soft_line_breaks]. Therefore, this guide advices to **avoid using a character limit per line for flowing text**, but try to use a maximum line length of 120 characters (including whitespaces) for all other document elements. + +Instead of enforcing a maximum line length, users should use [soft line wrapping][wikipedia-line_wrap]: + +* **Soft wrapping allows line lengths to visually adjust automatically with adjustments to the width of the user's window** or margin settings - This is a standard feature of all modern text editors like [Atom][atom-doc-soft_wrap] or [VSCode][vscode-doc-soft_wrap], IDEs like [JetBrains IntelliJ IDEA][jetbrains-intellij-doc-soft_wrap], word processors, and email clients like [Thunderbird][thunderbird]. +* **Using hard wrap inserts actual line breaks in the text at wrap points causing the Markdown to not look like the rendered output** - With soft wrapping the actual text is still on the same line but will be rendered by the application like it's divided into several lines. This **increases the readability** significantly and leads to the same visual result as if a maximum line length with hard line breaks for flowing text would have been used. +* **Less writer effort** - The author can focus on the content instead of formatting. + +Note that the [rule for long strings][strings-line_length] is related to this rule, and should not be broken up. + +> remark-lint: [maximum-line-length][remark-lint-maximum-line-length] + +###### Examples + +⇣ **Incorrect** code for this rule: + +`````markdown +> The winter and all of its fascinating, sparkling and +frozen elements and lively, diverse and beautiful wildlife. + +Many snowflakes are falling down. The winter has sparkling and frozen elements! It is home +for many beautiful animals like snowy owls, +arctic foxes, and grizzly bears. + +```js +const season = winter && winter.elements && winter.elements.snow && winter.elements.snow.state && winter.elements.snow.state.temperature && winter.elements.snow.state.temperature.celsius; +``` +````` + +⇡ **Correct** code for this rule: + +`````markdown +> The winter and all of its fascinating, sparkling and frozen elements and lively, diverse and beautiful wildlife. + +Many snowflakes are falling down. The winter has sparkling and frozen elements! It is home for many beautiful animals like snowy owls, arctic foxes, and grizzly bears. + +```js +const season = winter + && winter.elements + && winter.elements.snow + && winter.elements.snow.state + && winter.elements.snow.state.temperature + && winter.elements.snow.state.temperature.celsius; +``` +````` + +## Trailing + +Don't use trailing whitespace to generate a line break, use flowing text style or a blank line to create a new paragraph. + +> remark-lint: [hard-break-spaces][remark-lint-hard-break-spaces] + +###### Examples + +Note: The `·` character represents a whitespace and the `¬` character represents a line break. + +⇣ **Incorrect** code for this rule: + +```markdown +The winter has sparkling and frozen elements!··¬ +Many snowflakes are falling down. +``` + +```markdown +The winter has sparkling and frozen elements!¬ +Many snowflakes are falling down. +``` + +⇡ **Correct** code for this rule: + +```markdown +The winter has sparkling and frozen elements! Many snowflakes are falling down. +``` + +```markdown +The winter has sparkling and frozen elements!¬ + +Many snowflakes are falling down. +``` + +[strings-line_length]: strings.md#line-length + +[atom-doc-soft_wrap]: http://flight-manual.atom.io/getting-started/sections/atom-basics/#soft-wrap +[gfm-spec-soft_line_breaks]: https://github.github.com/gfm/#soft-line-breaks +[jetbrains-intellij-doc-soft_wrap]: https://www.jetbrains.com/help/idea/general.html +[remark-lint-final-newline]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-final-newline +[remark-lint-hard-break-spaces]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-hard-break-spaces +[remark-lint-linebreak-style]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-linebreak-style +[remark-lint-maximum-line-length]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-maximum-line-length +[remark-lint-no-consecutive-blank-lines]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-consecutive-blank-lines +[remark-lint-no-missing-blank-lines]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-missing-blank-lines +[remark-lint-no-tabs]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-tabs +[thunderbird]: https://www.mozilla.org/thunderbird +[vscode-doc-soft_wrap]: https://code.visualstudio.com/docs/editor/codebasics#_common-questions +[wikipedia-control_character]: https://en.wikipedia.org/wiki/Control_character +[wikipedia-line_wrap]: https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap +[wikipedia-newline]: https://en.wikipedia.org/wiki/Newline diff --git a/src/styles/website.css b/src/styles/website.css new file mode 100644 index 0000000..5d7a0eb --- /dev/null +++ b/src/styles/website.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018-present Arctic Ice StudioWinter
+Sparkling and frozen!
++ * Copyright (c) 2018-present Sven Greb + * + * Project: Styleguide Markdown + * Repository: https://github.com/arcticicestudio/styleguide-markdown + * License: MIT + * References: + * https://www.gitbook.com + */ + +/* Remove the sidebar link to the hosted gitbook service */ +.gitbook-link { + display: none !important; +} + +/* Sidebar links */ +.book .book-summary nav ul.summary li a { + color: #444; + text-decoration: none; +} + +.book .book-summary nav ul.summary li a:hover, +.book .book-summary nav ul.summary li a:focus { + color: #000; +} + +.book .book-summary nav ul.summary li.active > a { + color: #008cff; +} + +/* anchor.js hover icons */ +.book .book-body .page-wrapper .page-inner section.normal a.anchorjs-link { + color: #008cff; +}