From eb063267afc22e7975c53a0ef62328a0e8db62b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= <4096670+Citymonstret@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:31:35 +0100 Subject: [PATCH] chore: setup & fix style (#7) --- .editorconfig | 10 + .github/workflows/prettier.yml | 27 +++ .gitignore | 401 +++++++++++++++++++++++++++++++++ .prettierignorefile | 1 + .prettierrc.yml | 1 + README.md | 12 +- docs/annotations/index.md | 2 +- docs/core/index.md | 8 +- docs/discord/index.md | 2 +- docs/kotlin/index.md | 2 +- docs/minecraft/index.md | 2 +- docs/other/index.md | 2 +- mkdocs.yml | 2 +- placeholder-plugin.yaml | 2 +- 14 files changed, 463 insertions(+), 11 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/workflows/prettier.yml create mode 100644 .gitignore create mode 100644 .prettierignorefile create mode 100644 .prettierrc.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..11e4d67 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..ff6efcd --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,27 @@ +name: Continuous Integration + +on: + pull_request: + push: + branches: [main] + +jobs: + prettier: + name: Prettier Check + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Run Prettier + id: prettier-run + uses: rutajdash/prettier-cli-action@v1.0.0 + with: + config_path: ./.prettierrc.yml + + - name: Prettier Output + if: ${{ failure() }} + shell: bash + run: | + echo "The following files are not formatted correctly:" + echo "${{steps.prettier-run.outputs.prettier_output}}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a0539e --- /dev/null +++ b/.gitignore @@ -0,0 +1,401 @@ +# Created by https://www.toptal.com/developers/gitignore/api/python,intellij+all,node +# Edit at https://www.toptal.com/developers/gitignore?templates=python,intellij+all,node + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +# End of https://www.toptal.com/developers/gitignore/api/python,intellij+all,node \ No newline at end of file diff --git a/.prettierignorefile b/.prettierignorefile new file mode 100644 index 0000000..26f5c15 --- /dev/null +++ b/.prettierignorefile @@ -0,0 +1 @@ +.github diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 0000000..0f4487e --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1 @@ +tabWidth: 2 diff --git a/README.md b/README.md index 33b3044..42a845e 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,22 @@ Each PR will deploy a temporary preview version of the site. ## Install & Build You can install MkDocs by using + ```shell $ python3 -m pip install -r docs/requirements.txt ``` + and then you may run MkDocs locally using + ```shell $ mkdocs serve ``` + after which the docs will be available at `http://127.0.0.1:8000/`. -The built site will auto-refresh when the files are updated. \ No newline at end of file +The built site will auto-refresh when the files are updated. + +### Prettier + +We use prettier to validate the files when building the project. +It is recommended that you install prettier and run it when you make changes. +You can find instructions [here](https://prettier.io/docs/en/install). diff --git a/docs/annotations/index.md b/docs/annotations/index.md index 39d593b..69d5557 100644 --- a/docs/annotations/index.md +++ b/docs/annotations/index.md @@ -1 +1 @@ -# cloud-annotations \ No newline at end of file +# cloud-annotations diff --git a/docs/core/index.md b/docs/core/index.md index a444a61..8148fd4 100644 --- a/docs/core/index.md +++ b/docs/core/index.md @@ -2,17 +2,19 @@ Version: xCLOUD_BASE_VERSIONx - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Auctor elit sed vulputate mi sit amet mauris. Sollicitudin ac orci phasellus egestas tellus. Habitasse platea dictumst quisque sagittis purus. Gravida neque convallis a cras semper auctor. Sed libero enim sed faucibus. Consequat id porta nibh venenatis cras sed felis eget velit. Risus at ultrices mi tempus imperdiet nulla malesuada pellentesque. Suspendisse potenti nullam ac tortor vitae purus faucibus ornare suspendisse. Eu turpis egestas pretium aenean pharetra magna ac placerat. Leo duis ut diam quam nulla porttitor massa. Faucibus et molestie ac feugiat sed lectus vestibulum mattis. Non nisi est sit amet facilisis magna etiam tempor orci. -## Aliquam +## Aliquam + Aliquam nulla facilisi cras fermentum odio eu. Auctor urna nunc id cursus metus aliquam eleifend. Scelerisque fermentum dui faucibus in ornare quam viverra orci sagittis. Commodo nulla facilisi nullam vehicula ipsum a. Ultricies lacus sed turpis tincidunt. Montes nascetur ridiculus mus mauris vitae. Ultrices mi tempus imperdiet nulla malesuada. Lacus sed viverra tellus in hac habitasse. Consectetur a erat nam at. Blandit cursus risus at ultrices mi tempus. Gravida in fermentum et sollicitudin ac. Diam maecenas ultricies mi eget mauris pharetra et ultrices neque. Proin libero nunc consequat interdum varius. Montes nascetur ridiculus mus mauris vitae ultricies leo integer. Tellus id interdum velit laoreet id donec ultrices. Mi sit amet mauris commodo quis imperdiet massa tincidunt nunc. Eget nullam non nisi est sit amet facilisis magna. Nunc sed velit dignissim sodales. Sapien faucibus et molestie ac. Diam in arcu cursus euismod quis viverra nibh cras. ## Fermentum + Fermentum odio eu feugiat pretium nibh ipsum consequat nisl. Nulla aliquet enim tortor at auctor urna. Dui id ornare arcu odio ut sem nulla pharetra. Nibh praesent tristique magna sit amet purus gravida quis. Curabitur vitae nunc sed velit dignissim sodales ut eu. Interdum velit laoreet id donec ultrices tincidunt. Id nibh tortor id aliquet lectus proin nibh nisl condimentum. Mi eget mauris pharetra et ultrices neque. Cursus risus at ultrices mi tempus imperdiet nulla malesuada. Tellus orci ac auctor augue mauris augue neque. Velit scelerisque in dictum non consectetur a erat nam at. Montes nascetur ridiculus mus mauris vitae ultricies. Consequat id porta nibh venenatis cras sed felis eget. Amet nulla facilisi morbi tempus iaculis urna id volutpat. Vitae tempus quam pellentesque nec nam aliquam sem et tortor. Malesuada fames ac turpis egestas. Eleifend quam adipiscing vitae proin sagittis nisl rhoncus mattis. Sit amet nulla facilisi morbi tempus iaculis urna. Pharetra pharetra massa massa ultricies mi. ## Pharetra + Pharetra magna ac placerat vestibulum. Enim praesent elementum facilisis leo vel fringilla. Sapien et ligula ullamcorper malesuada proin. Id aliquet risus feugiat in ante metus dictum at. Mattis pellentesque id nibh tortor. Cras ornare arcu dui vivamus arcu felis bibendum ut tristique. Cras fermentum odio eu feugiat pretium nibh ipsum consequat nisl. Odio pellentesque diam volutpat commodo sed egestas egestas fringilla phasellus. Mus mauris vitae ultricies leo integer. Leo vel fringilla est ullamcorper eget. Mattis enim ut tellus elementum sagittis vitae et. Leo urna molestie at elementum eu facilisis sed odio morbi. Nunc congue nisi vitae suscipit tellus mauris a diam maecenas. Lectus vestibulum mattis ullamcorper velit sed ullamcorper. Aliquam etiam erat velit scelerisque in dictum non. Risus in hendrerit gravida rutrum. !!! example - Sit amet volutpat consequat mauris nunc congue nisi vitae. Volutpat sed cras ornare arcu dui vivamus arcu felis bibendum. At consectetur lorem donec massa sapien faucibus. Ut faucibus pulvinar elementum integer enim neque volutpat. Nunc congue nisi vitae suscipit tellus. Viverra aliquet eget sit amet tellus cras adipiscing enim. Praesent tristique magna sit amet purus gravida quis. Sed blandit libero volutpat sed cras ornare. Lectus quam id leo in vitae turpis massa sed elementum. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras. Molestie ac feugiat sed lectus vestibulum. Proin fermentum leo vel orci porta. Vitae elementum curabitur vitae nunc sed velit. Sit amet consectetur adipiscing elit duis tristique sollicitudin nibh. Ac tortor dignissim convallis aenean et tortor. Nunc sed velit dignissim sodales ut eu sem integer. Euismod nisi porta lorem mollis aliquam. \ No newline at end of file +Sit amet volutpat consequat mauris nunc congue nisi vitae. Volutpat sed cras ornare arcu dui vivamus arcu felis bibendum. At consectetur lorem donec massa sapien faucibus. Ut faucibus pulvinar elementum integer enim neque volutpat. Nunc congue nisi vitae suscipit tellus. Viverra aliquet eget sit amet tellus cras adipiscing enim. Praesent tristique magna sit amet purus gravida quis. Sed blandit libero volutpat sed cras ornare. Lectus quam id leo in vitae turpis massa sed elementum. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras. Molestie ac feugiat sed lectus vestibulum. Proin fermentum leo vel orci porta. Vitae elementum curabitur vitae nunc sed velit. Sit amet consectetur adipiscing elit duis tristique sollicitudin nibh. Ac tortor dignissim convallis aenean et tortor. Nunc sed velit dignissim sodales ut eu sem integer. Euismod nisi porta lorem mollis aliquam. diff --git a/docs/discord/index.md b/docs/discord/index.md index 07feb11..1a8279a 100644 --- a/docs/discord/index.md +++ b/docs/discord/index.md @@ -1 +1 @@ -# cloud-discord \ No newline at end of file +# cloud-discord diff --git a/docs/kotlin/index.md b/docs/kotlin/index.md index 909a4e1..2bde9b4 100644 --- a/docs/kotlin/index.md +++ b/docs/kotlin/index.md @@ -1 +1 @@ -# cloud-kotlin \ No newline at end of file +# cloud-kotlin diff --git a/docs/minecraft/index.md b/docs/minecraft/index.md index df01ff1..ba6e9db 100644 --- a/docs/minecraft/index.md +++ b/docs/minecraft/index.md @@ -1 +1 @@ -# cloud-minecraft \ No newline at end of file +# cloud-minecraft diff --git a/docs/other/index.md b/docs/other/index.md index 2482f42..b194173 100644 --- a/docs/other/index.md +++ b/docs/other/index.md @@ -1 +1 @@ -# ... \ No newline at end of file +# ... diff --git a/mkdocs.yml b/mkdocs.yml index 61aa6ab..d3e7c77 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,4 +75,4 @@ extra: We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to - make our documentation better. \ No newline at end of file + make our documentation better. diff --git a/placeholder-plugin.yaml b/placeholder-plugin.yaml index 28617aa..3d16749 100644 --- a/placeholder-plugin.yaml +++ b/placeholder-plugin.yaml @@ -1,4 +1,4 @@ placeholders: CLOUD_BASE_VERSION: 2.0.0-dev settings: - auto_placeholder_tables: false \ No newline at end of file + auto_placeholder_tables: false