-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remark-lint #14
Milestone
Comments
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
Installs remark-lint (1) can through remark-cli (2) through the remark-preset-lint-arcticicestudio (3) preset that implements the Arctic ice Studio Markdown Style Guide (4). References: (1) https://github.com/remarkjs/remark-lint (2) https://www.npmjs.com/package/remark-cli (3) https://github.com/arcticicestudio/remark-preset-lint-arcticicestudio (4) https://arcticicestudio.github.io/styleguide-markdown GH-14
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
This commit creates the main remark (1) configuration file and initially sets up the "remark-preset-lint-arcticicestudio" (2) preset. It also adds the ".remarkignore" file with defined ignore pattern. References: (1) https://remark.js.org (2) https://github.com/remarkjs/remark-lint (3) https://github.com/arcticicestudio/remark-preset-lint-arcticicestudio GH-14
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
The NPM script/task allows to run the Markdown linting separately and will be included in the main linting script flow later on. GH-14
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
This commit fixes multiple Markdown style guide violations after integrating remark-lint (1) and running it for the first time. References: (1) https://github.com/remarkjs/remark-lint GH-14
Merged
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
Merge pull request #19 from arcticicestudio/feature/gh-14-remark-lint Integrated remark-lint (1) which is built on remark (2), the powerful Markdown processor powered by plugins such as remark-lint. "Ensuring the Markdown you (and contributors) write is of great quality will provide better rendering in all the different markdown parsers, and makes sure less refactoring is needed afterwards." - remark-lint project description remark-lint is used through remark-cli with a preset. This preset is remark-preset-lint-arcticicestudio (4), the custom preset that implements the Arctic ice Studio Markdown Style Guide (5). Since the custom preset is still in major version `0` note that the version range is `>=0.x.x <1.0.0` to avoid NPM's "SemVer Major Zero Caveat". When defining package versions with the the carat `^` or tilde `~` range selector it won't affect packages with a major version of `0`. NPM will resolve these packages to their exact version until the major version is greater or equal to `1`. To avoid this caveat the more detailed version range `>=0.x.x <1.0.0` is used to resolve all versions greater or equal to `0.x.x` but less than `1.0.0`. This will always use the latest `0.x.x` version and removes the need to increment the version manually on each new release. >>> Configuration The `.remarkrc.js` configuration file is placed in the project root as well as the `.remarkignore` file to that defines ignore pattern. >>> NPM script/task To allow to run the Markdown linting separately a `lint:md` NPM script/task has been added to be included in the main `lint` script flow later on. >> Initial linting After setting up remark-lint the current code base has been linted for the first time and Markdown style guide violations have been fixed. References: (1) https://github.com/remarkjs/remark-lint (2) https://remark.js.org (3) https://www.npmjs.com/package/remark-cli (4) https://github.com/arcticicestudio/remark-preset-lint-arcticicestudio (5) https://arcticicestudio.github.io/styleguide-markdown
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
The configuration file `lint-staged.config.js` (1) has been placed in the project root and includes the commands that should be run for matching file extensions (globs). It includes at least the three following entries with the same order as listed here: 1. `prettier --list-different` - Run Prettier (#16) against `*.{js,json,jsx,mdx,yml}` to ensure all files are formatted correctly. The `--list-different` flag prints the found files that are not conform to the Prettier configuration. 2. `eslint` - Run ESLint (#15) against `*.{js,jsx}` to ensure all JavaScript files are compliant to the style guide after being formatted with Prettier. 3. `remark --no-stdout` - Run remark-lint (#14) against `*.md` to ensure all Markdown files are compliant to the style guide. The `--no-stdout` flag suppresses the output of the parsed file content. References: (1) https://github.com/okonet/lint-staged GH-17
arcticicestudio
added a commit
that referenced
this issue
Nov 17, 2018
Merge pull request #22 from arcticicestudio/task/gh-17-lint-staged Integrated lint-staged (1) to run linters against staged Git files to prevent to add code that violates any style guide into the code base. >> Configuration The configuration file `lint-staged.config.js` (1) has been placed in the project root and includes the commands that should be run for matching file extensions (globs). It includes at least the three following entries with the same order as listed here: 1. `prettier --list-different` - Run Prettier (#16) against `*.{js,json,jsx,mdx,yml}` to ensure all files are formatted correctly. The `--list-different` flag prints the found files that are not conform to the Prettier configuration. 2. `eslint` - Run ESLint (#15) against `*.{js,jsx}` to ensure all JavaScript files are compliant to the style guide after being formatted with Prettier. 3. `remark --no-stdout` - Run remark-lint (#14) against `*.md` to ensure all Markdown files are compliant to the style guide. The `--no-stdout` flag suppresses the output of the parsed file content. References: (1) https://github.com/okonet/lint-staged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Integrate remark-lint which is built on remark, the powerful Markdown processor powered by plugins such as remark-lint.
remark-lint can be used through remark-cli through a preset. This preset will be remark-preset-lint-arcticicestudio, the custom preset that implements the Arctic ice Studio Markdown Style Guide.
Since the custom preset is still in major version
0
note that the version range should be>=0.x.x <1.0.0
to avoid NPM's “SemVer Major Zero Caveat”. When defining package versions with the the carat^
or tilde~
range selector it won't affect packages with a major version of0
. NPM will resolve these packages to their exact version until the major version is greater or equal to1
.To avoid this caveat the more detailed version range
>=0.x.x <1.0.0
should be used to resolve all versions greater or equal to0.x.x
but less than1.0.0
. This will always use the latest0.x.x
version and removes the need to increment the version manually on each new release.Configuration
The
.remarkrc.js
configuration file will be placed in the project root as well as the.remarkignore
file to also define ignore pattern.NPM script/task
To allow to run the Markdown linting separately a
lint:md
npm script/task will be added to be included in the mainlint
script flow.Tasks
devDependencies
..remarkrc.js
configuration file..remarkignore
ignore pattern file.lint:md
script/task.The text was updated successfully, but these errors were encountered: