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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cd510013f1..8400b6dc981 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! @@ -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.md), that we ensure with some linting tools. diff --git a/docs/conventions.md b/docs/conventions.md new file mode 100644 index 00000000000..21d90a9b52f --- /dev/null +++ b/docs/conventions.md @@ -0,0 +1,50 @@ +## 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 : + +```text +type(scope?): subject +body? +footer? +``` + +[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 + +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. + +### prettier +The [prettier](adr/code_style_formatter-prettier.adoc) tool provides a general code prettfying. + +## Linting + +### xo +The [xo](adr/linting-xo.adoc) tool provides a general code linting mechanism. + +### yaml files via yamllint + +- [yamllint.readthedocs.io](https://yamllint.readthedocs.io/) + +### markdown files via markdownlint + +- [github.com/markdownlint/markdownlint](https://github.com/markdownlint/markdownlint/)