Skip to content

Commit

Permalink
Initial repo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-szlapa committed Jan 31, 2024
1 parent 0ba20a5 commit ecd6578
Show file tree
Hide file tree
Showing 152 changed files with 13,377 additions and 6,687 deletions.
39 changes: 39 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# System updates
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y dist-upgrade \
&& apt-get -y install --no-install-recommends \
git make

# Python dependencies
RUN apt-get -y install --no-install-recommends \
libffi-dev libsqlite3-dev

USER vscode

# Install ASDF
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.3; \
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc; \
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc;

ENV PATH="$PATH:/home/vscode/.asdf/bin/:/workspaces/nhs-eps-spine-client/node_modules/.bin"

# Install ASDF plugins
RUN asdf plugin add python; \
asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git; \
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git; \
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git; \
asdf plugin-add direnv; \
asdf plugin add actionlint;

WORKDIR /workspaces/nhs-eps-spine-client
ADD .tool-versions /workspaces/nhs-eps-spine-client/.tool-versions
ADD .tool-versions /home/vscode/.tool-versions

RUN asdf install; \
asdf reshim python; \
asdf reshim poetry; \
asdf reshim nodejs; \
asdf direnv setup --shell bash --version 2.32.2;
87 changes: 87 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {}
},
"mounts": [
"source=${env:HOME}${env:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind",
"source=${env:HOME}${env:USERPROFILE}/.gnupg,target=/home/vscode/.gnupg,type=bind"
],
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest",
"moby": "true",
"installDockerBuildx": "true"
},
},
"customizations": {
"vscode": {
"extensions": [
"redhat.vscode-yaml",
"eamodio.gitlens",
"lfm.vscode-makefile-term",
"streetsidesoftware.code-spell-checker",
"timonwong.shellcheck",
"mkhl.direnv",
"github.vscode-github-actions",
"Orta.vscode-jest",
"rvest.vs-code-prettier-eslint",
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker",
"tamasfe.even-better-toml"
],
"settings": {
"python.defaultInterpreterPath": "/workspaces/nhs-eps-spine-client/.venv/bin/python",
"python.analysis.autoSearchPaths": true,
"python.analysis.extraPaths": [],
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"vs-code-prettier-eslint.prettierLast": false,
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"files.associations": {
".releaserc": "json"
},
"cSpell.words": [
"fhir",
"Formik",
"pino",
"serialisation",
"devcontainer",
"sonarcloud"
]
}
}
},
"postCreateCommand": "rm -f ~/.docker/config.json; git config --global --add safe.directory /workspaces/nhs-eps-spine-client; make install; direnv allow ."
}
21 changes: 0 additions & 21 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/bin/bash
77 changes: 77 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"root": true,
"env": {
"node": true,
"es6": true,
"jest": true
},
"ignorePatterns": ["lib"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"plugins": ["@typescript-eslint", "import-newlines"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"block-spacing": "error",
"brace-style": ["error", "1tbs"],
"comma-dangle": ["error", "never"],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"dot-location": ["error", "property"],
"eol-last": ["error", "always"],
"eqeqeq": "error",
"func-call-spacing": "error",
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": true
}
],
"import-newlines/enforce": [
"error",
{
"items": 3,
"max-len": 120,
"semi": false
}
],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"max-len": ["error", 120],
"no-multi-spaces": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "never"],
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true,
"avoidEscape": true
}
],
"semi": ["error", "never"],
"@typescript-eslint/no-explicit-any": "off"
}
}
7 changes: 0 additions & 7 deletions .gitattributes

This file was deleted.

52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE/1_support_request.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/ISSUE_TEMPLATE/2_feature_request.yaml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/ISSUE_TEMPLATE/3_bug_report.yaml

This file was deleted.

Loading

0 comments on commit ecd6578

Please sign in to comment.