From 85858c68e9f6a274ae335769540261d725436960 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:13:33 +0200 Subject: [PATCH 1/8] docs: contributions Some URLs we're pointing to another repository --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cd510013f1..b6823fd9fcd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for your interest in our project. Contributions are welcome. Feel free to [open an issue](https://github.com/db-ui/base/issues/new) with questions or reporting ideas and bugs, or [open pull requests](https://github.com/db-ui/base/compare) to contribute code. +Thanks for your interest in our project. Contributions are welcome. Feel free to [open an issue](https://github.com/db-ui/mono/issues/new) with questions or reporting ideas and bugs, or [open pull requests](https://github.com/db-ui/mono/compare) to contribute code. We are committed to fostering a welcoming, respectful, and harassment-free environment. Be kind! From 7b24e3d570cb3ce171cb13b36ed42f22685cef5f Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:21:20 +0200 Subject: [PATCH 2/8] Create conventions.md --- docs/conventions.md | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/conventions.md diff --git a/docs/conventions.md b/docs/conventions.md new file mode 100644 index 00000000000..a8513da528c --- /dev/null +++ b/docs/conventions.md @@ -0,0 +1,56 @@ +## Git commits conventions + +We're using [husky git hooks](https://www.npmjs.com/husky) in combination with [commitlint](https://www.npmjs.com/package/@commitlint/cli) according to : + +``` +type(scope?): subject +body? +footer? +``` + +> quote, commitlint documentation + +Source: +____ +> Type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] +____ + +If you'd like to test your commit message previous to using it, you could test it on the command line: +``` +echo 'foo: bar' | commitlint +``` + +## Code conventions + +The general code conventions are guaranteed by the following tools. + +### Through configuration files: `.editorconfig` for IDEs and `.gitattributes` for git checkins +Both the [`.editorconfig`](https://editorconfig.org/) and [`.gitattributes`](https://dev.to/deadlybyte/please-add-gitattributes-to-your-git-repository-1jld) ensure a consistent code structure and conventions through their configurations. + +### xo +The [xo](adr/linting-xo.adoc) tool provides a general code linting mechanism. + +### prettier +The [prettier](adr/code_style_formatter-prettier.adoc) tool provides a general code prettfying. + +## Linting via [Super-Linter](https://github.com/marketplace/actions/super-linter) + +To prevent the linting of generated files (like e.g. the reference screenshots by backstopjs), we'll be [excluding those via an environmental GitHub variable](https://github.com/github/super-linter#filter-linted-files) for this project with the env `FILTER_REGEX_EXCLUDE`. + +Further links regarding language specific settings are located in the super-lint repository: + +### json files via jsonlint + +- [pipeline-components.dev/containers/jsonlint](https://pipeline-components.dev/containers/jsonlint/) + +### yaml files via yamllint + +- [yamllint.readthedocs.io](https://yamllint.readthedocs.io/) + +### markdown files via markdownlint + +- [github.com/markdownlint/markdownlint](https://github.com/markdownlint/markdownlint/) + +### shell scripts via ShellCheck + +- [github.com/koalaman/shellcheck](https://github.com/koalaman/shellcheck/) From e93c21b2415ad175cb9d8425aa2f0bef4f7be759 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:21:54 +0200 Subject: [PATCH 3/8] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6823fd9fcd..fe324894f80 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,4 +12,4 @@ Moreover, you need to duplicate `.env.template` as `.env` and type your own emai ### Conventions -Please be aware that we have some [code and git commit (message and branch naming) conventions](https://github.com/db-ui/core/blob/main/docs/conventions.adoc), that we ensure with some linting tools. +Please be aware that we have some [code and git commit (message and branch naming) conventions](https://github.com/db-ui/mono/blob/main/docs/conventions.adoc), that we ensure with some linting tools. From 6b5d9adeea1bed6e098e69a7a4b3ece5fda361a8 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:32:35 +0200 Subject: [PATCH 4/8] Create .gitattributes --- .gitattributes | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..6510bf11f7d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +# adapted out of https://github.com/h5bp/html5-boilerplate/blob/main/.gitattributes +# Automatically normalize line endings for all text-based files +# https://git-scm.com/docs/gitattributes#_end_of_line_conversion + +* text=auto + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# For the following file types, normalize line endings to LF on +# checkin and prevent conversion to CRLF when they are checked out +# (this is required in order to prevent newline related issues like, +# for example, after the build script is run) + +.* text eol=lf +*.css text eol=lf +*.html text eol=lf +*.js text eol=lf +*.json text eol=lf +*.md text eol=lf +*.mjs text eol=lf +*.sh text eol=lf +*.txt text eol=lf +*.xml text eol=lf +*.yml text eol=lf From 594cee58e94b73536cbaf84c84b4de302fcd9383 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:39:02 +0200 Subject: [PATCH 5/8] Update conventions.md --- docs/conventions.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index a8513da528c..fadc211ef32 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -27,21 +27,13 @@ The general code conventions are guaranteed by the following tools. ### Through configuration files: `.editorconfig` for IDEs and `.gitattributes` for git checkins Both the [`.editorconfig`](https://editorconfig.org/) and [`.gitattributes`](https://dev.to/deadlybyte/please-add-gitattributes-to-your-git-repository-1jld) ensure a consistent code structure and conventions through their configurations. -### xo -The [xo](adr/linting-xo.adoc) tool provides a general code linting mechanism. - ### prettier The [prettier](adr/code_style_formatter-prettier.adoc) tool provides a general code prettfying. -## Linting via [Super-Linter](https://github.com/marketplace/actions/super-linter) - -To prevent the linting of generated files (like e.g. the reference screenshots by backstopjs), we'll be [excluding those via an environmental GitHub variable](https://github.com/github/super-linter#filter-linted-files) for this project with the env `FILTER_REGEX_EXCLUDE`. - -Further links regarding language specific settings are located in the super-lint repository: +## Linting -### json files via jsonlint - -- [pipeline-components.dev/containers/jsonlint](https://pipeline-components.dev/containers/jsonlint/) +### xo +The [xo](adr/linting-xo.adoc) tool provides a general code linting mechanism. ### yaml files via yamllint @@ -50,7 +42,3 @@ Further links regarding language specific settings are located in the super-lint ### markdown files via markdownlint - [github.com/markdownlint/markdownlint](https://github.com/markdownlint/markdownlint/) - -### shell scripts via ShellCheck - -- [github.com/koalaman/shellcheck](https://github.com/koalaman/shellcheck/) From 1a32647f69a0defca14cafc449558f2abbbf76e9 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:42:35 +0200 Subject: [PATCH 6/8] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe324894f80..8400b6dc981 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,4 +12,4 @@ Moreover, you need to duplicate `.env.template` as `.env` and type your own emai ### Conventions -Please be aware that we have some [code and git commit (message and branch naming) conventions](https://github.com/db-ui/mono/blob/main/docs/conventions.adoc), that we ensure with some linting tools. +Please be aware that we have some [code and git commit (message and branch naming) conventions](https://github.com/db-ui/mono/blob/main/docs/conventions.md), that we ensure with some linting tools. From db8548a9a68ebba8fdf1bd1b6f1873c34bbe90b3 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:58:02 +0200 Subject: [PATCH 7/8] Update conventions.md --- docs/conventions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index fadc211ef32..d0f39895c83 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -2,11 +2,11 @@ We're using [husky git hooks](https://www.npmjs.com/husky) in combination with [commitlint](https://www.npmjs.com/package/@commitlint/cli) according to : -``` +```` type(scope?): subject body? footer? -``` +```` > quote, commitlint documentation @@ -16,7 +16,7 @@ ____ ____ If you'd like to test your commit message previous to using it, you could test it on the command line: -``` +```shell echo 'foo: bar' | commitlint ``` From cf8274168bfd72e5d337fb4210d679352029e752 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:12:30 +0200 Subject: [PATCH 8/8] Update conventions.md --- docs/conventions.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index d0f39895c83..21d90a9b52f 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -1,24 +1,30 @@ ## Git commits conventions -We're using [husky git hooks](https://www.npmjs.com/husky) in combination with [commitlint](https://www.npmjs.com/package/@commitlint/cli) according to : +We're using [husky git hooks](https://www.npmjs.com/husky) in combination with [commitlint](https://www.npmjs.com/package/@commitlint/cli) according to : -```` +```text type(scope?): subject body? footer? -```` - -> quote, commitlint documentation +``` -Source: -____ -> Type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] -____ +[Type must be one of the following](https://commitlint.js.org/reference/rules.html#type-enum): +- build +- chore +- ci +– docs +- feat +- fix +- perf +- refactor +- revert +- style +- test If you'd like to test your commit message previous to using it, you could test it on the command line: ```shell echo 'foo: bar' | commitlint -``` +```` ## Code conventions