Skip to content

Commit 8b4e1d5

Browse files
committed
feat: first stage migration
Signed-off-by: Kevin O'Donnell <kevin@blockchaintp.com>
1 parent 325ad0a commit 8b4e1d5

Some content is hidden

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

78 files changed

+28630
-8689
lines changed

.babelrc

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
{
22
"presets": [
33
"@babel/env",
4-
"@babel/preset-react",
4+
"@babel/preset-react"
55
],
66
"plugins": [
77
"@babel/transform-runtime",
88
"@babel/plugin-syntax-dynamic-import",
99
"@babel/plugin-syntax-import-meta",
1010
"@babel/plugin-proposal-json-strings",
11+
"@babel/plugin-transform-react-jsx",
1112
[
1213
"@babel/plugin-proposal-decorators",
1314
{
1415
"legacy": true
15-
},
16+
}
1617
],
1718
[
1819
"@babel/plugin-proposal-class-properties",
1920
{
2021
"loose": true
21-
},
22+
}
23+
],
24+
[
25+
"@babel/plugin-proposal-private-methods",
26+
{
27+
"loose": true
28+
}
2229
],
2330
"@babel/plugin-proposal-function-sent",
2431
"@babel/plugin-proposal-export-namespace-from",
2532
"@babel/plugin-proposal-numeric-separator",
26-
"@babel/plugin-proposal-throw-expressions",
33+
"@babel/plugin-proposal-throw-expressions"
2734
],
2835
"env": {
2936
"development": {
3037
"plugins": [
3138
"@babel/plugin-transform-react-jsx-source"
32-
],
33-
},
34-
},
39+
]
40+
}
41+
}
3542
}

.eslintrc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
env:
2+
browser: true
3+
es2020: true
4+
extends:
5+
- airbnb
6+
parser: babel-eslint
7+
parserOptions:
8+
ecmaFeatures:
9+
jsx: true
10+
ecmaVersion: 11
11+
sourceType: module
12+
rules:
13+
semi: 0
14+
react/jsx-filename-extension: 0
15+
react/prefer-stateless-function: 1
16+
react/prop-types: 0
17+
react/no-array-index-key: 1
18+
react/forbid-prop-types: 1
19+
react/jsx-props-no-spreading: 1
20+
react/state-in-constructor: 0
21+
no-param-reassign: 0
22+
no-use-before-define: 1
23+
no-await-in-loop: 1
24+
import/no-cycle: 1
25+
import/no-unresolved: 1
26+
max-len: 0
27+
no-restricted-syntax: 0
28+
settings:
29+
import/resolver:
30+
node:
31+
paths:
32+
- src

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,6 @@ typings/
218218

219219
# direnv settings
220220
.envrc
221+
build
222+
markers
223+
build

.pre-commit-config.yaml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
default_language_version:
3+
# force all unspecified python hooks to run python3
4+
python: python3
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.0.1
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
# - id: check-yaml
12+
- id: check-added-large-files
13+
- id: check-json
14+
- id: check-merge-conflict
15+
- id: detect-aws-credentials
16+
- id: detect-private-key
17+
- id: mixed-line-ending
18+
- repo: https://github.com/commitizen-tools/commitizen
19+
rev: v2.17.11
20+
hooks:
21+
- id: commitizen
22+
stages: [commit-msg]
23+
- repo: https://github.com/gruntwork-io/pre-commit
24+
rev: v0.1.12
25+
hooks:
26+
- id: helmlint
27+
- repo: https://github.com/gherynos/pre-commit-java
28+
rev: v0.1.0
29+
hooks:
30+
- id: checkstyle
31+
args:
32+
- -c
33+
- google_checks.xml
34+
exclude: ".*/src/test/.*"
35+
- id: cpd
36+
exclude: ".*/src/test/.*"
37+
- id: pmd
38+
exclude: ".*/src/test/.*"
39+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
40+
rev: 2.1.5
41+
hooks:
42+
- id: forbid-binary
43+
exclude: ".*.(png|jpg|jpeg)$"
44+
- id: shellcheck
45+
args:
46+
- -a
47+
- -x
48+
- -e
49+
- SC1072,SC1073
50+
- id: script-must-have-extension
51+
- id: script-must-not-have-extension
52+
- id: shfmt
53+
args:
54+
- -l
55+
- -i
56+
- "2"
57+
- -ci
58+
- repo: https://github.com/markdownlint/markdownlint
59+
rev: master
60+
hooks:
61+
- id: markdownlint_docker
62+
- repo: https://github.com/pre-commit/mirrors-eslint
63+
rev: v7.17.0
64+
hooks:
65+
- id: eslint
66+
- repo: https://github.com/pre-commit/pre-commit-hooks
67+
rev: v3.4.0
68+
hooks:
69+
- id: check-added-large-files
70+
- id: check-case-conflict
71+
- id: check-executables-have-shebangs
72+
- id: check-json
73+
- id: check-merge-conflict
74+
- id: detect-aws-credentials
75+
- id: detect-private-key
76+
- id: end-of-file-fixer
77+
- id: mixed-line-ending
78+
- id: no-commit-to-branch
79+
args:
80+
- --pattern
81+
- '^(?!((fix|feature)\/[a-zA-Z0-9\-]+)$).*'
82+
- id: trailing-whitespace
83+
- repo: https://github.com/Lucas-C/pre-commit-hooks-go
84+
rev: v1.0.1
85+
hooks:
86+
- id: checkmake
87+
- repo: https://github.com/Lucas-C/pre-commit-hooks
88+
rev: v1.1.10
89+
hooks:
90+
- id: forbid-tabs
91+
exclude: "^(.*/?Makefile|.*.mk|.*.go)$"
92+
- repo: git://github.com/doublify/pre-commit-go
93+
rev: 208a4aaa7f86b44e961eaaea526743b920e187a0
94+
hooks:
95+
- id: fmt
96+
- id: vet
97+
- id: fix
98+
- repo: https://github.com/doublify/pre-commit-rust
99+
rev: v1.0
100+
hooks:
101+
- id: fmt
102+
- id: cargo-check
103+
- repo: https://github.com/adrienverge/yamllint
104+
rev: v1.25.0
105+
hooks:
106+
- id: yamllint
107+
exclude: ".*/templates/.*"
108+
- repo: https://github.com/IamTheFij/docker-pre-commit
109+
rev: v2.0.0
110+
hooks:
111+
- id: docker-compose-check
112+
files: docker-compose.*y[a]{0,1}ml$
113+
- id: docker-compose-check
114+
files: "^docker/.*yaml$"
115+
- repo: https://gitlab.com/daverona/pre-commit/cpp
116+
rev: 0.8.0 # use the most recent version
117+
hooks:
118+
# - id: docker-clang-format
119+
- id: docker-cppcheck # cppcheck in Docker container
120+
args:
121+
- --force
122+
# - id: insert-license
123+
#files: \.js$
124+
#args:
125+
#- --license-filepath
126+
#- COPYRIGHT
127+
#- --comment-style
128+
#- /*| *| */
129+
# - id: insert-license
130+
# files: \.yaml$
131+
#args:
132+
#- --license-filepath
133+
#- COPYRIGHT
134+
#- --comment-style
135+
#- #
136+
#- repo: https://github.com/doublify/pre-commit-clang-format
137+
# rev: master
138+
# hooks:
139+
# - id: clang-format

Dockerfile.dev

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@
1414
# ------------------------------------------------------------------------------
1515

1616
FROM mhart/alpine-node:11.12
17-
RUN apk update
18-
RUN apk upgrade
19-
RUN apk add bash
17+
18+
RUN apk update && \
19+
apk upgrade && \
20+
apk add bash git
21+
2022
WORKDIR /app/frontend
23+
24+
COPY ./.babelrc /app/frontend/
25+
COPY ./src /app/frontend/src
26+
COPY ./config /app/frontend/config
2127
COPY ./package.json /app/frontend/package.json
22-
COPY ./yarn.lock /app/frontend/yarn.lock
23-
RUN yarn install
24-
COPY ./ /app/frontend
25-
ENTRYPOINT ["yarn", "run", "develop"]
28+
COPY ./package-lock.json /app/frontend/package-lock.json
29+
RUN npm ci
30+
31+
ENTRYPOINT ["npm", "run", "develop"]

Dockerfile.prod

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,29 @@
1414
# ------------------------------------------------------------------------------
1515

1616
FROM mhart/alpine-node:11.12 as builder
17-
RUN apk update
18-
RUN apk upgrade
19-
RUN apk add bash
17+
RUN apk update \
18+
&& apk upgrade \
19+
&& apk add bash
20+
2021
WORKDIR /app/frontend
22+
2123
COPY ./package.json /app/frontend/package.json
22-
COPY ./yarn.lock /app/frontend/yarn.lock
23-
RUN yarn install
24-
COPY ./ /app/frontend
25-
RUN cd /app/frontend && yarn build
24+
COPY ./package-lock.json /app/frontend/package-lock.json
25+
RUN npm ci
26+
27+
COPY ./.babelrc /app/frontend/
28+
COPY ./src /app/frontend/src
29+
COPY ./config /app/frontend/config
30+
31+
RUN npm run build
2632

2733
FROM nginx:alpine
2834
COPY ./nginx.conf /etc/nginx/nginx.template
2935
COPY ./nginx_entry.sh /nginx_entry.sh
3036
COPY --from=builder /app/frontend/dist /www
31-
RUN apk update && apk upgrade
32-
RUN apk add bash
37+
38+
RUN apk update \
39+
&& apk upgrade \
40+
&& apk add bash
3341

3442
ENTRYPOINT ["bash","nginx_entry.sh"]

0 commit comments

Comments
 (0)