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/docs/conventions.md b/docs/conventions.md index 515d114f210..5d178fb0d7a 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -1,6 +1,6 @@ ## 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 @@ -8,13 +8,23 @@ body? footer? ``` -> 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): -source: [commitlint documentation](https://commitlint.js.org/#/?id=test) +- 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: -```terminal +```shell echo 'foo: bar' | commitlint ``` @@ -26,10 +36,20 @@ The general code conventions are guaranteed by the following tools. 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](https://github.com/db-ui/core/blob/main/docs/adr/code_style_formatter-prettier.adoc) tool provides a general code prettfying. + +## Linting + ### xo The [xo](https://github.com/db-ui/core/blob/main/docs/adr/linting-xo.adoc) tool provides a general code linting mechanism. -### prettier +### yaml files via yamllint -The [prettier](https://github.com/db-ui/core/blob/main/docs/adr/code_style_formatter-prettier.adoc) tool provides a general code prettfying. +- [yamllint.readthedocs.io](https://yamllint.readthedocs.io/) + +### markdown files via markdownlint + +- [github.com/markdownlint/markdownlint](https://github.com/markdownlint/markdownlint/)