Skip to content

Commit 59c0b37

Browse files
authored
DATC-15-base-repo
- added base apps with base env - prep pr workflows
1 parent 17f0a35 commit 59c0b37

File tree

165 files changed

+17370
-17366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+17370
-17366
lines changed

.devcontainer/devcontainer.json

+22-28
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
1+
// https://containers.dev/implementors/json_reference/
32
{
4-
"name": "Debian",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
7-
"features": {
8-
"ghcr.io/devcontainers/features/node:1": {
9-
"nodeGypDependencies": true,
10-
"version": "20",
11-
"pnpmVersion": "8",
12-
"nvmVersion": "latest"
13-
},
14-
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
15-
"packages": "tmux"
16-
}
3+
"build": {
4+
//__BUG: do not get applied for some reason
5+
// "args": {
6+
// "current_branch": "my_branch"
7+
// },
8+
// "options": ["-t", "datc-dev-env"],
9+
"dockerfile": "../env/docker/base",
10+
"context": ".."
1711
},
1812
"customizations": {
1913
"vscode": {
2014
"extensions": [
15+
"esbenp.prettier-vscode",
16+
"Bubulus.copilot-inline-toggle",
17+
"EditorConfig.EditorConfig",
2118
"GitHub.copilot",
2219
"GitHub.copilot-chat",
23-
"eamodio.gitlens",
20+
"dbaeumer.vscode-eslint",
21+
"mgmcdermott.vscode-language-babel",
22+
"firsttris.vscode-jest-runner",
2423
"vitaliymaz.vscode-svg-previewer",
25-
"nrwl.angular-console",
26-
"usernamehw.errorlens",
24+
"redhat.vscode-yaml",
2725
"naumovs.color-highlight",
28-
"esbenp.prettier-vscode",
29-
"ms-playwright.playwright",
30-
"firsttris.vscode-jest-runner",
31-
"Orta.vscode-jest",
32-
"Bubulus.copilot-inline-toggle",
33-
"stylelint.vscode-stylelint",
34-
"styled-components.vscode-styled-components",
35-
"mgmcdermott.vscode-language-babel",
36-
"EditorConfig.EditorConfig"
26+
"kaiwood.center-editor-window",
27+
"eamodio.gitlens",
28+
"wayou.vscode-todo-highlight",
29+
"PKief.material-icon-theme",
30+
"yoavbls.pretty-ts-errors"
3731
]
3832
}
3933
},
40-
"postCreateCommand": "pnpm install",
4134
"runArgs": ["--name", "datc-dev-env"]
35+
// "postCreateCommand": "npm install"
4236
}

.docker/base

-17
This file was deleted.

.docker/compose/dev.yml

-67
This file was deleted.

.docker/dev/admin

-5
This file was deleted.

.docker/dev/pg4admin

-10
This file was deleted.

.docker/dev/server

-5
This file was deleted.

.docker/dev/ui

-5
This file was deleted.

.dockerignore

-7
This file was deleted.

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ indent_size = 2
1818

1919
[makefile]
2020
indent_style = tab
21-
indent_size = 2
21+
indent_size = 2

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
.devcontainer
2+
.vscode
13
node_modules
4+
env

.eslintrc.frontend.yml

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
parser: "@typescript-eslint/parser"
2+
3+
parserOptions:
4+
# allows for ES Modules
5+
sourceType: "module"
6+
# maps our tsconfig with appropriate settings (e.g. paths) to eslint
7+
project: "./tsconfig.json"
8+
# default recommended settings from vite // alligned with tsconfig
9+
ecmaVersion: 2020
10+
ecmaFeatures:
11+
# enables to parse jsx code (react components)
12+
jsx: true
13+
14+
env:
15+
# allows for browser specific globals like window, document etc.
16+
browser: true
17+
# allows for jest specific globals like test, expect etc.
18+
jest: true
19+
20+
plugins:
21+
- "prettier"
22+
- "jest"
23+
- "promise"
24+
- "@typescript-eslint"
25+
26+
# Important Note: The order of rules IS NOT ARBITRARY, but follows a specific order of precedence
27+
extends:
28+
# --------------------------- Core ------------------------------
29+
# create basis for all JS rules, neutral opinions
30+
- "eslint:recommended"
31+
32+
# create basis for all TS rules, neutral opinions, enhanced with typed-linting
33+
- "plugin:@typescript-eslint/strict-type-checked"
34+
- "plugin:@typescript-eslint/stylistic-type-checked"
35+
36+
# this introduces React rules and overrides some of the JS and TS rules in favor of AirBnB opinions
37+
- airbnb
38+
- airbnb-typescript
39+
- airbnb/hooks
40+
41+
# --------------------------- Additional JS ---------------------
42+
# NOTE: Make sure that none of the introduced rules conflict with the airbnb rules
43+
# suprisingly AirBnB has neither opinions on promises nor deprecations
44+
- "plugin:promise/recommended"
45+
- "plugin:deprecation/recommended"
46+
47+
# --------------------------- Additional Libraries ---------------
48+
# -- JEST --
49+
- "plugin:jest/recommended"
50+
- "plugin:jest/style"
51+
# -- STORYBOOK --
52+
# NOTE: Quote from docs: "This plugin will only be applied to files following the *.stories.* (we recommend this) or *.story.* pattern."
53+
# Its recommended to lint also the config files in .storybook, which in our current file context, is painfull to achieve, so this is emmited.
54+
# It would not have made any major difference anyhow, can only help with mistyped addon names, we will survive without it...
55+
- "plugin:storybook/recommended"
56+
57+
# --------------------------- Formatting -------------------------
58+
# NOTE: Needs to go very last, because the formatting rules should be enforced ONLY by prettier, overwriting some AirBnB rules
59+
- "plugin:prettier/recommended"
60+
61+
rules:
62+
# --------------------------- RESTORATION -------------------------------
63+
# Note: restoring airbnb rules
64+
# overwrites are introduced by import/resolver
65+
import/order: off
66+
import/extensions:
67+
- error
68+
- ignorePackages
69+
- { js: never, jsx: never, ts: never, tsx: never }
70+
71+
# --------------------------- DEVIATIONS -------------------------------
72+
# Note: deviations from rules which are required because default community guidelines might not consider the stack context
73+
74+
# the default type-definitions from typescript-eslint enforces interfaces (for OOP usage), but because we are in react 16+ functional component context we should stick with types
75+
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
76+
77+
# react is brought default into scope, so we can disable this rule
78+
"react/react-in-jsx-scope": off
79+
80+
# --------------------------- ADDITIONS -------------------------------
81+
# In order to ensure consistency in type imports and exports we enforce the consistent type imports and exports rules
82+
# these will make sure that imports and exports that concern types are prefixed with the word "type"
83+
# also these imports / exports must not be mixed with actual runtime code related imports / exports
84+
# essentially the defaults of both rules are enforced
85+
"@typescript-eslint/consistent-type-exports": "error"
86+
"@typescript-eslint/consistent-type-imports": "error"
87+
88+
# --------------------------- FORMATTING --------------------------
89+
# lints falsely formated code, easier to fix and will be subsequently enforced by ci/cd as well
90+
prettier/prettier: "warn"
91+
92+
settings:
93+
# makes sure that eslint can resolve aliased imports derived from the paths config in tsconfig
94+
import/resolver:
95+
typescript:
96+
# in case third party packages dont ship their types with them, but with a seperate package, this will help resolve eslint errors
97+
# example: lodash might have types in @types/lodash
98+
alwaysTryTypes: true
99+
# project key is not specified, because if omited, it will default to the tsconfig in the root of the project
100+
# meaning: project: "./tsconfig.json"
101+
react:
102+
# corresponding to the package.json version
103+
version: "detect"
104+
105+
# --------------------------- Overrides ------------------------------
106+
# Note: In general, always denote the reasoning for the override, so that the next person can understand the context
107+
overrides:
108+
# for index files, named exports should be allowed
109+
- files: ["index.ts", "index.tsx", "hooks.ts", "hooks.tsx"]
110+
rules:
111+
import/prefer-default-export: off
112+
# is located at src location, but runs devDeps only
113+
- files: ["vite.config.mts"]
114+
rules:
115+
import/no-extraneous-dependencies: off
116+
- files: ["**/*"]
117+
rules:
118+
# because we are not using defaultProps but defaultArguments, we need to augment the rule to resolve when default arguments are provided for the props
119+
react/require-default-props:
120+
- error
121+
- functions: "defaultArguments"
122+
# test files, usual naming does not apply do needs to re-disable certain rules
123+
- files: ["**/*tests.ts", "**/*tests.tsx"]
124+
rules:
125+
import/no-extraneous-dependencies: off

.eslintrc.json

-36
This file was deleted.

.github/dependabot.yml

-12
This file was deleted.

0 commit comments

Comments
 (0)