-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
>> Previous Project State Before the repository only contained the actual style guide documentation while specific projects that implement the guidelines for linters and code style analyzer live in separate repositories. This was the best approach for modularity and a small and clear code base, but it increases the maintenance overhead by 1(n) since changes to the development workflow or toolbox, general project documentations as well as dependency management requires changes in every repository with dedicated tickets/issues and PRs. In particular, Node packages require frequent dependency management due to their fast development cycles to keep up-to-date with the latest package changes like (security) bug fixes. This style guide is currently implemented by the remark-preset-lint-arcticicestudio [1] Node package that lived in its own repository. The development workflow was clean using most of GitHub's awesome features like project boards, codeowner assignments, issue & PR automation and so on, but changes often require multiple actions when packages depend on each other or they use the same development tooling and documentation standards. >>> Monorepo Comparison Monorepos [2] are a fantastic way to manage such a project structure, but there are also some points that must be taken into account: - No more scoped code - the developer experience with Git is slightly worse because commits can contains changes to multiple scopes of the code. Since there is only a "transparent separation” of code, that was previously located in a dedicated repository but is not aggregated into a parent (e.g. `packages`) with other modules, commits can now contain changes to multiple code scopes spread over the entire code base. - No more assignment of commits to single modules - like described in the bullet point above, commit can contain changes to multiple modules, it is harder to detect which commit targeted a specific module. - Steeper learning curve for new contributors - in a dedicated repository that only hosts a specific module it is easier for new developers to contribute to the project, but in a monorepo they might need to change code in multiple places within other modules or the root code/documentation of the entire project. - Uniform version number - in order to keep conform to SemVer [3], the entire project must use a uniform version number. This means that a module that has not been changed since the last version must also be incremented in order to keep compatible with the other modules. Using different version numbers prefixed/suffixed with an individual version number is a not an option, increases the maintenance overhead and and drastically reduces the project overview and quality! This would result in multiple Git tags on the `main` branch as well as "empty” changelogs and release notes with placeholder logs that only refer to changes of other modules. >> Project Future Even though a monorepo requires some special thoughts, it also comes with a lot of benefits and makes sense for specific project modules that are slightly coupled and where using dedicated repositories only increases the maintenance overhead when changes must be reflected in multiple modules anyway. In order to reduce the maintenance overhead, the remark-preset-lint-arcticicestudio [1] Node package has been migrated into this repository by adapting to Yarn workspaces [4]. This simplifies the development tooling setup and allows to use a unified documentation base as well as a smoother development and testing workflow. This change also implies that the root of the repository is now the main package for the entire project setup including shared development dependencies, tools and documentations while the packages only contain specific configurations and (dev)dependencies. >>> Scoped Packages Before the remark-preset-lint-arcticicestudio [1] package was not a scoped package [5] but suffixed with `-arcticicestudio`. To simplify the naming and improving the usage of user/organization specific packages, it is now scoped to `@arcticicestudio` resulting in the new name `@arcticicestudio/remark-preset-lint`. The currently released public version will be deprecated using the `npm deprecate` command [6] where the provided message will point out to migrate to the new scoped packages. >>> Versioning The style guide itself and all packages now use a shared/fixed/locked version. This helps all packages to keep in sync and ensure the compatibility with the latest style guide version. [1]: https://github.com/arcticicestudio/remark-preset-lint-arcticicestudio [2]: https://trunkbaseddevelopment.com/monorepos [3]: https://semver.org [4]: https://yarnpkg.com/en/docs/workspaces [5]: https://docs.npmjs.com/about-scopes [6]: https://docs.npmjs.com/cli/deprecate Co-authored-by: Sven Greb <[email protected]> Closes GH-10
- Loading branch information
1 parent
2313028
commit 0c21fab
Showing
18 changed files
with
1,031 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
{ | ||
"name": "styleguide-markdown", | ||
"title": "Styleguide Markdown", | ||
"version": "0.2.0", | ||
"description": "The Arctic Ice Studio Markdown Code Style.", | ||
"author": { | ||
"name": "Arctic Ice Studio", | ||
"email": "[email protected]", | ||
"url": "http://arcticicestudio.com" | ||
}, | ||
"description": "Arctic Ice Studio Markdown code style", | ||
"author": "Arctic Ice Studio <[email protected]> (https://www.arcticicestudio.com)", | ||
"homepage": "https://arcticicestudio.github.io/styleguide-markdown", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -25,7 +20,9 @@ | |
"config", | ||
"preset" | ||
], | ||
"private": true, | ||
"workspaces": [ | ||
"packages/@arcticicestudio/*" | ||
], | ||
"scripts": { | ||
"clean": "del build", | ||
"docs:build": "gitbook install src && gitbook build src build/docs", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<p align="center"><img src="https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/assets/images/packages/@arcticicestudio/remark-preset-lint/repository-hero.svg?sanitize=true"/></p> | ||
|
||
<p align="center">The <a href="https://github.com/arcticicestudio/styleguide-markdown" target="_blank" rel="noreferrer">Arctic Ice Studio Markdown code style guide</a> rules as an extensible <a href="https://github.com/remarkjs/remark-lint" target="_blank" rel="noreferrer">remark-lint</a> rule preset.</p> | ||
|
||
<p align="center"><a href="https://github.com/arcticicestudio/styleguide-markdown/releases/latest" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-markdown.svg?style=flat-square&label=Release&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"/></a> <a href="https://arcticicestudio.github.io/styleguide-markdown" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-markdown.svg?style=flat-square&label=Docs&logo=read-the-docs&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"/></a> <a href="https://github.com/arcticicestudio/styleguide-markdown/blob/develop/CHANGELOG.md" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-markdown.svg?style=flat-square&label=Changelog&logo=github&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"/></a></p> | ||
|
||
<p align="center"><a href="https://www.npmjs.com/package/@arcticicestudio/remark-preset-lint" target="_blank" rel="noreferrer"><img src="https://img.shields.io/npm/v/@arcticicestudio/remark-preset-lint.svg?style=flat-square&label=npm&logoColor=eceff4&colorA=4c566a&colorB=88c0d0&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2Q4ZGVlOSIgZD0iTTEyIDE0SDRhMiAyIDAgMCAxLTItMlY0YTIgMiAwIDAgMSAyLTJoOGEyIDIgMCAwIDEgMiAydjhhMiAyIDAgMCAxLTIgMnpNNCAzLjMzMkEuNjcuNjcgMCAwIDAgMy4zMzIgNHY4YzAgLjM2Ny4zLjY2OC42NjguNjY4aDhhLjY3LjY3IDAgMCAwIC42NjgtLjY2OFY0QS42Ny42NyAwIDAgMCAxMiAzLjMzMnptMCAwIi8+PHBhdGggZmlsbD0iI2Q4ZGVlOSIgZD0iTTggNmgyLjY2OHY2LjY2OEg4em0wIDAiLz48L3N2Zz4K"/></a> <a href="https://www.npmjs.com/package/@arcticicestudio/remark-preset-lint" target="_blank" rel="noreferrer"><img src="https://img.shields.io/npm/dt/@arcticicestudio/remark-preset-lint.svg?style=flat-square&label=Downloads&logoColor=eceff4&colorA=4c566a&colorB=88c0d0&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2Q4ZGVlOSIgZD0iTTEyIDE0SDRhMiAyIDAgMCAxLTItMlY0YTIgMiAwIDAgMSAyLTJoOGEyIDIgMCAwIDEgMiAydjhhMiAyIDAgMCAxLTIgMnpNNCAzLjMzMkEuNjcuNjcgMCAwIDAgMy4zMzIgNHY4YzAgLjM2Ny4zLjY2OC42NjguNjY4aDhhLjY3LjY3IDAgMCAwIC42NjgtLjY2OFY0QS42Ny42NyAwIDAgMCAxMiAzLjMzMnptMCAwIi8+PHBhdGggZmlsbD0iI2Q4ZGVlOSIgZD0iTTggNmgyLjY2OHY2LjY2OEg4em0wIDAiLz48L3N2Zz4K"/></a></p> | ||
|
||
<p align="center"><a href="https://github.com/arcticicestudio/styleguide-markdown/releases/latest" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-markdown.svg?style=flat-square&label=Markdown%20Style%20Guide&logoColor=eceff4&colorA=4c566a&colorB=88c0d0&logo=markdown"/></a> <a href="https://github.com/arcticicestudio/styleguide-javascript/releases/latest" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-javascript.svg?style=flat-square&label=JavaScript%20Style%20Guide&logoColor=eceff4&colorA=4c566a&colorB=88c0d0&logo=javascript"/></a> <a href="https://github.com/arcticicestudio/styleguide-git/releases/latest" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/release/arcticicestudio/styleguide-git.svg?style=flat-square&label=Git%20Style%20Guide&logoColor=eceff4&colorA=4c566a&colorB=88c0d0&logo=git"/></a></p> | ||
|
||
|
||
This project implements the rules of the [“Arctic Ice Studio Markdown Style Guide”][gh-arcticicestudio/styleguide-markdown] as an extensible [remark-lint][gh-remarkjs/remark-lint] rule preset. | ||
The package supports all [official core rules][gh-remarkjs/remark-lint-blob-docs-rules] and [various plugins][gh-remarkjs/remark-blob-docs-plugins] like the [“frontmatter” Markdown extension][gh-remarkjs/remark-frontmatter] for [YAML][] and [TOML][gh-toml-lang/toml] and [“GitHub Flavoured“ Markdown][gh-remarkjs/remark-gfm]. | ||
|
||
## Getting Started | ||
|
||
Note that this project uses [npm version 7.7.0 or higher][gh-blog-npm_v7] as the main package manager, but the documentations also include instructions to work with [Yarn][yarn-classic] (classic / `v1`). | ||
|
||
### Installation | ||
|
||
Add the package as development dependency to your project: | ||
|
||
```sh | ||
# With npm... | ||
npm install --save-dev @arcticicestudio/remark-preset-lint | ||
|
||
# or Yarn. | ||
yarn add --dev @arcticicestudio/remark-preset-lint | ||
``` | ||
|
||
Note that [peer dependencies][node-blog-peer_deps], like the [remark-lint][gh-remarkjs/remark-lint] package itself, are **only installed automatically when using a npm version equal or higher than `7.0.0`**, otherwise they must be installed separately like described in the [peer dependencies](#peer-dependencies) section below. | ||
See the [Node distribution index][node-dist-index] for more information about which npm version is bundled with which Node version. | ||
|
||
#### Peer Dependencies | ||
|
||
This package depends on [various remark-lint rule packages][gh-remarkjs/remark-lint-tree-pkgs] that are defined as [peer dependencies][node-blog-peer_deps]. | ||
|
||
##### npm versions `>=7.0.0` | ||
|
||
As of **npm version `7.0.0`, peer dependencies are** [**installed automatically**][gh-npm/rfcs-blob-install_peer_deps] and does not require any additional steps. | ||
|
||
##### npm versions `>=5.0.0 <7.0.0` | ||
|
||
For **npm version equal to or higher than `5.0.0` (pre-bundled with [Node.js 8][node-dist-v8-latest]) but less than `7.0.0`**, all peer dependencies can be auto-installed using the pre-bundled [`npx`][npm-npx] package: | ||
|
||
```sh | ||
npx install-peerdeps --dev @arcticicestudio/remark-preset-lint | ||
``` | ||
##### npm versions `<5.0.0` | ||
|
||
If you’re using a **npm version less than `5.0.0`**, the `npx` package is not pre-bundled, but users can either simply install the [`npx`][npm-npx] package globally to run the above command or use the [install-peerdeps][npm-install-peerdeps] helper package locally/globally to let it handle the installation of all peer dependencies: | ||
|
||
```sh | ||
# Install and use the "install-peerdeps" helper package locally... | ||
npm install install-peerdeps | ||
./node_modules/.bin/install-peerdeps --dev @arcticicestudio/remark-preset-lint | ||
|
||
# ...or globally. | ||
npm install --global install-peerdeps | ||
install-peerdeps --dev @arcticicestudio/remark-preset-lint | ||
``` | ||
|
||
To install all peer dependencies manually without `npx` or any helper package, the npm `info` command can be used to get a list of all packages and their versions: | ||
|
||
```sh | ||
# List the names and versions of all peer dependencies... | ||
npm info "@arcticicestudio/remark-preset-lint" peerDependencies | ||
|
||
# ...and install each listed package manually. | ||
npm install PACKAGE@VERSION | ||
``` | ||
|
||
##### Using Yarn instead of npm | ||
|
||
If you’re not using npm but Yarn, peer dependencies can be installed by either adding them manually or using the [install-peerdeps][npm-install-peerdeps] helper package: | ||
|
||
```sh | ||
# Either add all packages manually by listing all required names and their versions and install them manually... | ||
yarn info @arcticicestudio/remark-preset-lint peerDependencies | ||
yarn add --dev remark-lint #... | ||
|
||
# ...or use the "install-peerdeps" helper package. | ||
yarn add --dev install-peerdeps | ||
yarn run install-peerdeps --dev @arcticicestudio/remark-preset-lint | ||
``` | ||
|
||
## Usage | ||
|
||
The package can be used as rule preset by adding it to the plugins within your `.remarkrc.js` or `.remarkrc` [configuration file][remark-lint-doc-conf]: | ||
|
||
```js | ||
module.exports = { | ||
plugins: ["@arcticicestudio/remark-preset-lint"], | ||
}; | ||
``` | ||
|
||
## Contributing | ||
|
||
Please read the [contribution guidelines][ghio-arcticicestudio/styleguide-markdown-dev-contributing] of the [“Arctic Ice Studio Markdown Style Guide”][gh-arcticicestudio/styleguide-markdown] for more details. | ||
|
||
<p align="center"><img src="https://raw.githubusercontent.com/arcticicestudio/nord-docs/develop/assets/images/nord/repository-footer-separator.svg?sanitize=true" /></p> | ||
|
||
<p align="center">Copyright © 2018-present <a href="https://www.arcticicestudio.com" target="_blank" rel="noreferrer">Arctic Ice Studio</a> and <a href="https://www.svengreb.de" target="_blank" rel="noreferrer">Sven Greb</a></p> | ||
|
||
<p align="center"><a href="https://github.com/arcticicestudio/styleguide-markdown/blob/develop/LICENSE" target="_blank" rel="noreferrer"><img src="https://img.shields.io/static/v1.svg?style=flat-square&label=License&message=MIT&logoColor=eceff4&logo=github&colorA=4c566a&colorB=88c0d0"/></a></p> | ||
|
||
[gh-arcticicestudio/styleguide-markdown]: https://github.com/arcticicestudio/styleguide-markdown | ||
[gh-remarkjs/remark-lint]: https://github.com/remarkjs/remark-lint | ||
[gh-remarkjs/remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter | ||
[gh-remarkjs/remark-gfm]: https://github.com/remarkjs/remark-gfm | ||
[gh-remarkjs/remark-blob-docs-plugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md | ||
[gh-remarkjs/remark-lint-tree-pkgs]: https://github.com/remarkjs/remark-lint/tree/main/packages | ||
[yarn-classic]: https://classic.yarnpkg.com | ||
[gh-blog-npm_v7]: https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli | ||
[npm]: https://www.npmjs.com | ||
[node-blog-peer_deps]: https://nodejs.org/en/blog/npm/peer-dependencies | ||
[gh-npm/rfcs-blob-install_peer_deps]: https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md | ||
[npm-install-peerdeps]: https://www.npmjs.com/package/install-peerdeps | ||
[node-dist-v8-latest]: https://nodejs.org/dist/latest-v8.x | ||
[npm-npx]: https://www.npmjs.com/package/npx | ||
[node-dist-index]: https://nodejs.org/dist/index.json | ||
[gh-remarkjs/remark-lint-blob-docs-rules]: https://github.com/remarkjs/remark-lint/blob/main/doc/rules.md#list-of-rules | ||
[gh-toml-lang/toml]: https://github.com/toml-lang/toml | ||
[yaml]: http://yaml.org | ||
[remark-lint-doc-conf]: https://github.com/remarkjs/remark-lint#configuring-remark-lint | ||
[ghio-arcticicestudio/styleguide-markdown-dev-contributing]: https://arcticicestudio.github.io/remark-preset-lint-arcticicestudio/development/contributing.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2018-present Arctic Ice Studio <[email protected]> | ||
* Copyright (c) 2018-present Sven Greb <[email protected]> | ||
* This source code is licensed under the MIT license found in the LICENSE file. | ||
*/ | ||
|
||
/** | ||
* Arctic Ice Studio Markdown Style Guide rules as an extensible remark-lint rule preset. | ||
* @version 0.3.0 | ||
* @license MIT | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @author Sven Greb <[email protected]> | ||
* @see https://github.com/remarkjs/remark-lint | ||
* @see https://remark.js.org | ||
* @see https://github.com/remarkjs/remark-lint/blob/master/doc/rules.md#list-of-rules | ||
* @see https://github.com/remarkjs/remark-lint#configuring-remark-lint | ||
*/ | ||
module.exports = { | ||
plugins: [ | ||
"remark-lint", | ||
"./rules/blockquotes", | ||
"./rules/code", | ||
"./rules/emphasis", | ||
"./rules/headings", | ||
"./rules/horizontal-rules", | ||
"./rules/links", | ||
"./rules/lists", | ||
"./rules/naming-conventions", | ||
"./rules/paragraphs", | ||
"./rules/raw-html", | ||
"./rules/strings", | ||
"./rules/support", | ||
"./rules/tables", | ||
"./rules/whitespace", | ||
].map(require.resolve), | ||
}; |
105 changes: 105 additions & 0 deletions
105
packages/@arcticicestudio/remark-preset-lint/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"name": "@arcticicestudio/remark-preset-lint", | ||
"version": "0.3.0", | ||
"description": "Arctic Ice Studio Markdown code style guide rules as an extensible remark-lint rule preset", | ||
"author": "Arctic Ice Studio <[email protected]> (https://www.arcticicestudio.com)", | ||
"homepage": "https://github.com/arcticicestudio/styleguide-markdown", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/arcticicestudio/styleguide-markdown.git", | ||
"directory": "packages/@arcticicestudio/remark-preset-lint" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/arcticicestudio/styleguide-markdown/issues" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"remark", | ||
"lint", | ||
"preset", | ||
"markdown", | ||
"styleguide", | ||
"codestyle" | ||
], | ||
"main": "index.js", | ||
"files": [ | ||
"rules", | ||
"index.js" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"remark-frontmatter": "^1.3.0", | ||
"remark-lint": "^6.0.1", | ||
"remark-lint-blockquote-indentation": "^1.0.1", | ||
"remark-lint-checkbox-character-style": "^1.0.1", | ||
"remark-lint-checkbox-content-indent": "^1.0.1", | ||
"remark-lint-code-block-style": "^1.0.1", | ||
"remark-lint-definition-case": "^1.0.1", | ||
"remark-lint-definition-spacing": "^1.0.1", | ||
"remark-lint-emphasis-marker": "^1.0.1", | ||
"remark-lint-fenced-code-flag": "^1.0.1", | ||
"remark-lint-fenced-code-marker": "^1.0.1", | ||
"remark-lint-file-extension": "^1.0.1", | ||
"remark-lint-final-definition": "^1.0.1", | ||
"remark-lint-final-newline": "^1.0.1", | ||
"remark-lint-first-heading-level": "^1.1.1", | ||
"remark-lint-hard-break-spaces": "^1.0.2", | ||
"remark-lint-heading-increment": "^1.0.1", | ||
"remark-lint-heading-style": "^1.0.1", | ||
"remark-lint-linebreak-style": "^1.0.1", | ||
"remark-lint-link-title-style": "^1.0.1", | ||
"remark-lint-list-item-bullet-indent": "^1.0.1", | ||
"remark-lint-list-item-content-indent": "^1.0.1", | ||
"remark-lint-list-item-indent": "^1.0.1", | ||
"remark-lint-list-item-spacing": "^1.1.1", | ||
"remark-lint-maximum-heading-length": "^1.0.1", | ||
"remark-lint-maximum-line-length": "^1.0.2", | ||
"remark-lint-no-auto-link-without-protocol": "^1.0.1", | ||
"remark-lint-no-blockquote-without-marker": "^2.0.1", | ||
"remark-lint-no-consecutive-blank-lines": "^1.0.1", | ||
"remark-lint-no-duplicate-definitions": "^1.0.1", | ||
"remark-lint-no-duplicate-headings": "^1.0.1", | ||
"remark-lint-no-duplicate-headings-in-section": "^1.0.1", | ||
"remark-lint-no-emphasis-as-heading": "^1.0.1", | ||
"remark-lint-no-empty-url": "^1.0.2", | ||
"remark-lint-no-file-name-articles": "^1.0.1", | ||
"remark-lint-no-file-name-consecutive-dashes": "^1.0.1", | ||
"remark-lint-no-file-name-irregular-characters": "^1.0.1", | ||
"remark-lint-no-file-name-mixed-case": "^1.0.1", | ||
"remark-lint-no-file-name-outer-dashes": "^1.0.2", | ||
"remark-lint-no-heading-content-indent": "^1.0.1", | ||
"remark-lint-no-heading-indent": "^1.0.1", | ||
"remark-lint-no-heading-like-paragraph": "^1.0.1", | ||
"remark-lint-no-heading-punctuation": "^1.0.1", | ||
"remark-lint-no-html": "^1.0.1", | ||
"remark-lint-no-inline-padding": "^1.0.1", | ||
"remark-lint-no-literal-urls": "^1.0.1", | ||
"remark-lint-no-missing-blank-lines": "^1.0.1", | ||
"remark-lint-no-multiple-toplevel-headings": "^1.0.1", | ||
"remark-lint-no-paragraph-content-indent": "^1.0.3", | ||
"remark-lint-no-reference-like-url": "^1.0.1", | ||
"remark-lint-no-shell-dollars": "^1.0.1", | ||
"remark-lint-no-shortcut-reference-image": "^1.0.1", | ||
"remark-lint-no-shortcut-reference-link": "^1.0.2", | ||
"remark-lint-no-table-indentation": "^1.0.1", | ||
"remark-lint-no-tabs": "^1.0.1", | ||
"remark-lint-no-undefined-references": "^1.0.1", | ||
"remark-lint-no-unused-definitions": "^1.0.1", | ||
"remark-lint-ordered-list-marker-style": "^1.0.1", | ||
"remark-lint-ordered-list-marker-value": "^1.0.1", | ||
"remark-lint-rule-style": "^1.0.1", | ||
"remark-lint-strong-marker": "^1.0.1", | ||
"remark-lint-table-cell-padding": "^1.0.1", | ||
"remark-lint-table-pipe-alignment": "^1.0.1", | ||
"remark-lint-table-pipes": "^1.0.1", | ||
"remark-lint-unordered-list-marker-style": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"remark-cli": "^5.0.0" | ||
}, | ||
"peerDependencies": { | ||
"remark-cli": "^5.0.0" | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
packages/@arcticicestudio/remark-preset-lint/rules/blockquotes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2018-present Arctic Ice Studio <[email protected]> | ||
* Copyright (c) 2018-present Sven Greb <[email protected]> | ||
* This source code is licensed under the MIT license found in the LICENSE file. | ||
*/ | ||
|
||
/** | ||
* Enforce correct indentation for blockquotes. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-blockquote-indentation | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/blockquotes.html#indentation | ||
*/ | ||
const blockquoteIndentation = require("remark-lint-blockquote-indentation"); | ||
/** | ||
* Disallow blank lines without markers ('>') in blockquotes. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-blockquote-without-marker | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/blockquotes.html#multi-line | ||
*/ | ||
const noBlockquoteWithoutMarker = require("remark-lint-no-blockquote-without-marker"); | ||
|
||
/** | ||
* Official remark-lint core rules for blockquote document nodes. | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @author Sven Greb <[email protected]> | ||
* @since 0.1.0 | ||
* @see https://github.com/remarkjs/remark-lint/blob/master/doc/rules.md#list-of-rules | ||
*/ | ||
module.exports = { | ||
plugins: [ | ||
[blockquoteIndentation, ["error", 2]], | ||
[noBlockquoteWithoutMarker, ["warn"]] | ||
] | ||
}; |
50 changes: 50 additions & 0 deletions
50
packages/@arcticicestudio/remark-preset-lint/rules/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2018-present Arctic Ice Studio <[email protected]> | ||
* Copyright (c) 2018-present Sven Greb <[email protected]> | ||
* This source code is licensed under the MIT license found in the LICENSE file. | ||
*/ | ||
|
||
/** | ||
* Enforce fenced code blocks. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-code-block-style | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/code.html#blocks | ||
*/ | ||
const codeBlockStyle = require("remark-lint-code-block-style"); | ||
/** | ||
* Enforce language syntax flags for fenced code blocks. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-fenced-code-flag | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/code.html#syntax-highlighting | ||
*/ | ||
const fencedCodeFlag = require("remark-lint-fenced-code-flag"); | ||
/** | ||
* Enforce language syntax flags for fenced code blocks. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-fenced-code-marker | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/code.html#marker-character-style | ||
*/ | ||
const fencedCodeMarker = require("remark-lint-fenced-code-marker"); | ||
/** | ||
* Warn when using a dollar sign ("$") in shell code. | ||
* | ||
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-shell-dollars | ||
* @see https://arcticicestudio.github.io/styleguide-markdown/rules/code.html#no-shell-code-dollar-sign | ||
*/ | ||
const noShellDollars = require("remark-lint-no-shell-dollars"); | ||
|
||
/** | ||
* Official remark-lint core rules for code document nodes. | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @author Sven Greb <[email protected]> | ||
* @since 0.1.0 | ||
* @see https://github.com/remarkjs/remark-lint/blob/master/doc/rules.md#list-of-rules | ||
*/ | ||
module.exports = { | ||
plugins: [ | ||
[codeBlockStyle, ["error", "fenced"]], | ||
[fencedCodeFlag, ["error", { allowEmpty: false }]], | ||
[fencedCodeMarker, ["error", "`"]], | ||
[noShellDollars, ["warn"]] | ||
] | ||
}; |
Oops, something went wrong.