Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

remark-lint #36

Closed
5 tasks done
arcticicestudio opened this issue Jun 22, 2019 · 1 comment
Closed
5 tasks done

remark-lint #36

arcticicestudio opened this issue Jun 22, 2019 · 1 comment

Comments

@arcticicestudio
Copy link
Owner

arcticicestudio commented Jun 22, 2019

Epic: #33
Depends on #47 #49

Integrate remark-lint which is built on remark, the powerful Markdown processor powered by plugins such as remark-lint.

Ensuring the markdown you (and contributors) write is of great quality will provide better rendering in all the different markdown parsers, and makes sure less refactoring is needed afterwards.

remark-lint can be used through remark-cli through a preset. This preset will be remark-preset-lint-arcticicestudio, the custom preset that implements the Arctic ice Studio Markdown Style Guide.

Since the custom preset is still in major version 0 note that the version range should be >=0.x.x <1.0.0 to avoid NPM's “SemVer Major Zero Caveat”. When defining package versions with the the carat ^ or tilde ~ range selector it won't affect packages with a major version of 0. NPM will resolve these packages to their exact version until the major version is greater or equal to 1.
To avoid this caveat the more detailed version range >=0.x.x <1.0.0 should be used to resolve all versions greater or equal to 0.x.x but less than 1.0.0. This will always use the latest 0.x.x version and removes the need to increment the version manually on each new release.

Configuration

The .remarkrc.js configuration file will be placed in the project root as well as the .remarkignore file to also define ignore pattern.

NPM script/task

To allow to run the Markdown linting separately a lint:md npm script/task will be added to be included in the main lint script flow.

Tasks

  • Install remark-cli and remark-preset-lint-arcticicestudio packages to devDependencies.
  • Implement .remarkrc.js configuration file.
  • Implement .remarkignore ignore pattern file.
  • Implement npm lint:md script/task.
  • Lint current code base for the first time and fix possible Markdown style guide violations.
@arcticicestudio arcticicestudio added this to the 0.4.0 milestone Jun 22, 2019
@arcticicestudio arcticicestudio self-assigned this Jun 22, 2019
arcticicestudio added a commit that referenced this issue Jun 22, 2019
In order to start the Go project rewrite (1) from scratch the current
repository structure and files have been reset to a clean state to
remove all references to the previous implementations, documentations
and project structure/layout.

Starting from a "fresh" state allows to build the project up with the
correct structure and design pattern as if there were leftovers from
the previous repository data resulting in mixed files and folders.

This commit must be pushed first before all other blocked tickets can be
resolved that are also bound to the epic GH-33!
See the corresponding milestone (2) for more details about the
implementation/resolve order.

>>>> Tasks

- `.idea/` (3) - Deleted the whole folder, the files were scoped for
  "Pycharm Community Edition" and will be replaced with the correct
  files for "IntelliJ Ultimate Edition" with the official Go plugin (4)
  (Goland (5)) later on.
- `assets/` (6) - Deleted the whole folder, all assets will be
  redesigned and added again later on.
- `bin/` (7) - Deleted the whole folder, the script was part of the
  Python implementation and represented the entry point of the app.
- `snowsaw/` (8) - Deleted the whole folder, included the main Python
  app and API implementations.
- `.editorconfig` (9) - Deleted the file, it will be recreated in GH-38
  to match the new project layout and latest "Arctic Ice Studio" project
  design standards/guidelines.
- `.gitignore` (10) - Deleted the file, it will be recreated in GH-35 to
  match the new project layout and latest "Arctic Ice Studio" project
  design standards/guidelines.
- `CHANGELOG.md` (11) - Deleted the file, it will be recreated later on to
  match the new project layout and latest "Arctic Ice Studio" project
  design standards/guidelines.
- `README.md` (12) - Deleted the file, it will be recreated later on to
  match the new project layout and latest "Arctic Ice Studio" project
  design standards/guidelines including the new project assets
  (logo, repository hero etc.).

References:
  (1) #33
  (2) https://github.com/arcticicestudio/snowsaw/milestone/5
  (3) https://github.com/arcticicestudio/snowsaw/tree/bc54e5136be27f8037de5bbc2f046f37eb036274/.idea
  (4) https://plugins.jetbrains.com/plugin/9568-go
  (5) https://www.jetbrains.com/go
  (6) https://github.com/arcticicestudio/snowsaw/tree/bc54e5136be27f8037de5bbc2f046f37eb036274/assets
  (7) https://github.com/arcticicestudio/snowsaw/tree/bc54e5136be27f8037de5bbc2f046f37eb036274/bin
  (8) https://github.com/arcticicestudio/snowsaw/tree/bc54e5136be27f8037de5bbc2f046f37eb036274/snowsaw
  (9) https://github.com/arcticicestudio/snowsaw/blob/bc54e5136be27f8037de5bbc2f046f37eb036274/.editorconfig
  (10) https://github.com/arcticicestudio/snowsaw/blob/bc54e5136be27f8037de5bbc2f046f37eb036274/.gitignore
  (11) https://github.com/arcticicestudio/snowsaw/blob/bc54e5136be27f8037de5bbc2f046f37eb036274/CHANGELOG.md
  (12) https://github.com/arcticicestudio/snowsaw/blob/bc54e5136be27f8037de5bbc2f046f37eb036274/README.md

Epic: GH-33
Blocked GH-34 GH-35 GH-36 GH-37 GH-38 GH-39 GH-42 GH-43 GH-44 GH-45
        GH-46 GH-47 GH-48
Resolves GH-49
arcticicestudio added a commit that referenced this issue Jun 22, 2019
Added the NPM `.npmrc` (1) configuration file to ensure specific
configurations are set project-wide for all core team members and
contributors. This includes the usage of the lockfile
(`package-lock.json`) (2) and exact (dev)dependency package versions.

References:
  (1) https://docs.npmjs.com/files/npmrc
  (2) https://docs.npmjs.com/files/package-locks

Epic: GH-33
Depends on GH-49
Blocks GH-36 GH-37 GH-44 GH-45
Resolves GH-47
arcticicestudio added a commit that referenced this issue Jun 22, 2019
Installed remark-lint (1) through `remark-cli` (2) using the
`remark-preset-lint-arcticicestudio` (3) preset that implements the
"Arctic ice Studio" Markdown Style Guide (4).

Also updated the Git ignore pattern to handle "Node.js" data.

References:
  (1) remarkjs/remark-lint
  (2) npmjs.com/package/remark-cli
  (3) arcticicestudio/remark-preset-lint-arcticicestudio
  (4) arcticicestudio.github.io/styleguide-markdown

Epic: GH-33
Depends on GH-47 GH-49
GH-36
arcticicestudio added a commit that referenced this issue Jun 22, 2019
Created the main remark (1) configuration file and initially set up the
`remark-preset-lint-arcticicestudio` (2) preset.
Also added the `.remarkignore` file with to define ignore pattern.

References:
  (1) remark.js.org
  (2) remarkjs/remark-lint
  (3) arcticicestudio/remark-preset-lint-arcticicestudio

Epic: GH-33
Depends on GH-47 GH-49
GH-36
arcticicestudio added a commit that referenced this issue Jun 22, 2019
The NPM scripts/tasks allow to run the Markdown linting separately and
as well as running the all `lint` task together.

Also added the `npm-run-all` package that simplifies the paralell and
serial execution of multiple NPM scripts/tasks including name wildcard
support.

Epic: GH-33
Depends on GH-47 GH-49
GH-36
arcticicestudio added a commit that referenced this issue Jun 22, 2019
* Install `remark-cli` and `remark-preset-lint-arcticicestudio` NPM pkgs.

Installed remark-lint (1) through `remark-cli` (2) using the
`remark-preset-lint-arcticicestudio` (3) preset that implements the
"Arctic ice Studio" Markdown Style Guide (4).

Also updated the Git ignore pattern to handle "Node.js" data.

References:
  (1) remarkjs/remark-lint
  (2) npmjs.com/package/remark-cli
  (3) arcticicestudio/remark-preset-lint-arcticicestudio
  (4) arcticicestudio.github.io/styleguide-markdown

Epic: GH-33
Depends on GH-47 GH-49
GH-36

<--------------------------------------------------------------------->

* Implement remark config and ignore pattern file

Created the main remark (1) configuration file and initially set up the
`remark-preset-lint-arcticicestudio` (2) preset.
Also added the `.remarkignore` file with to define ignore pattern.

References:
  (1) remark.js.org
  (2) remarkjs/remark-lint
  (3) arcticicestudio/remark-preset-lint-arcticicestudio

Epic: GH-33
Depends on GH-47 GH-49
GH-36

<--------------------------------------------------------------------->

* Implement NPM script/task to lint Markdown files

The NPM scripts/tasks allow to run the Markdown linting separately and
as well as running the all `lint` task together.

Also added the `npm-run-all` package that simplifies the paralell and
serial execution of multiple NPM scripts/tasks including name wildcard
support.

Epic: GH-33
Depends on GH-47 GH-49
GH-36
@arcticicestudio
Copy link
Owner Author

Resolved in #54 (acd0df4)

@arcticicestudio arcticicestudio removed their assignment Jun 22, 2019
arcticicestudio added a commit that referenced this issue Jun 22, 2019
Installed `lint-staged` (1) to run linters against staged Git files to
prevent to add code that violates any style guide into the code base.

The `lint-staged.config.js` configuration file 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 (GH-37) against
  `*.{js,json,md,yml}` to ensure all files are formatted correctly.
  The `--list-different` prints the found files that are not conform to
  the Prettier configuration.
2. `remark --no-stdout` - Run remark-lint (GH-36) 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

Epic: GH-33
Depends on GH-36 GH-37 GH-47 GH-49
Blocks GH-45
Resolves GH-44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant