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

NPM project-level configuration file #47

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

NPM project-level configuration file #47

arcticicestudio opened this issue Jun 22, 2019 · 1 comment

Comments

@arcticicestudio
Copy link
Owner

arcticicestudio commented Jun 22, 2019

Epic: #33
Depends on #49
Blocks #36 #37 #44 #45

Add the NPM .npmrc file to ensure specific configurations are set project-wide for all core team members and contributors. This includes the usage of the lockfile and exact (dev)dependency package versions.

@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
Copy link
Owner Author

Resolved in 7a6fdd3

@arcticicestudio arcticicestudio removed their assignment Jun 22, 2019
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 added a commit that referenced this issue Jun 22, 2019
Installed the main `prettier` (1) NPM package.

References:
  (1) npmjs.com/package/prettier

Epic: GH-33
Depends on GH-47 GH-49
GH-37
arcticicestudio added a commit that referenced this issue Jun 22, 2019
This is one of the main features of Prettier: It already provides the
best and recommended style configurations of-out-the-box.
The only option that has been changed is the print width (1). It is set
to `80` by default which not up-to-date for modern screens (might only
be relevant when working in terminals only like e.g. with Vim). It is
now set to `120` used by all of Arctic Ice Studio's style guides.
The `prettier.config.js` configuration file is placed in the project
root as well as the `.prettierignore` file that defines ignore pattern.

References:
  (1) prettier.io/docs/en/options.html#print-width

Epic: GH-33
Depends on GH-47 GH-49
GH-37
arcticicestudio added a commit that referenced this issue Jun 22, 2019
To allow to format all sources the `format:pretty` NPM script/task has
been added as well as the `format` script/task to run all tasks of the
formatting workflow.

Epic: GH-33
Depends on GH-47 GH-49
Resolves GH-37
arcticicestudio added a commit that referenced this issue Jun 22, 2019
* Install `prettier`

Installed the main `prettier` (1) NPM package.

References:
  (1) npmjs.com/package/prettier

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

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

* Implement Prettier configuration and ignore pattern file

This is one of the main features of Prettier: It already provides the
best and recommended style configurations of-out-the-box.
The only option that has been changed is the print width (1). It is set
to `80` by default which not up-to-date for modern screens (might only
be relevant when working in terminals only like e.g. with Vim). It is
now set to `120` used by all of Arctic Ice Studio's style guides.
The `prettier.config.js` configuration file is placed in the project
root as well as the `.prettierignore` file that defines ignore pattern.

References:
  (1) prettier.io/docs/en/options.html#print-width

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


* Implement NPM `format:pretty` script/task for Prettier

To allow to format all sources the `format:pretty` NPM script/task has
been added as well as the `format` script/task to run all tasks of the
formatting workflow.

Epic: GH-33
Depends on GH-47 GH-49
Resolves GH-37
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
arcticicestudio added a commit that referenced this issue Jun 22, 2019
Installed Husky (1), the tool that make Git hooks easy and can prevent
bad Git commits, pushes and more!

The `.huskyrc.js` configuration file is placed in the project root and
includes the commands to run for any supported Git hook (1). This
commit initially adds configs for the following hook(s):

- `pre-commit` - Run lint-staged (GH-44) before each commit (via
  `lint-staged` command) to ensure all staged files are compliant to
  all style guides.

References:
  (1) https://github.com/typicode/husky
  (2) https://github.com/typicode/husky/blob/master/DOCS.md#supported-hooks

Epic: GH-33
Depends on GH-4 GH-47 GH-49
Resolves GH-45
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