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

lint-staged #44

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

lint-staged #44

arcticicestudio opened this issue Jun 22, 2019 · 1 comment

Comments

@arcticicestudio
Copy link
Owner

arcticicestudio commented Jun 22, 2019

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

Integrate lint-staged 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 will be placed in the project root and includes the command that should be run for matching file extensions (globs). It will include at least the three following entries with the same order as listed here:

  1. prettier --list-different - Run Prettier (Prettier #37) against *.{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 (remark-lint #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.

Tasks

  • Install lint-staged package.
  • Implement lint-staged.config.js configuration file.
@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 `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
Copy link
Owner Author

Resolved in 2696968

@arcticicestudio arcticicestudio removed their assignment Jun 22, 2019
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