Skip to content

Commit f87053c

Browse files
committed
refactor: use gts instead of xo
feat: add browser opening to test:notification feat: add c8 and mocha for testing feat: update Docker and ci style: update editorconfig
1 parent dbde781 commit f87053c

File tree

184 files changed

+30282
-33283
lines changed

Some content is hidden

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

184 files changed

+30282
-33283
lines changed

Diff for: .editorconfig

-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,4 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010

1111
[*.md]
12-
indent_style = space
13-
indent_size = 4
14-
15-
[*.ts]
16-
indent_style = tab
1712
indent_size = 4

Diff for: .eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
docs/

Diff for: .eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts/"
3+
}

Diff for: .github/workflows/ci.yaml

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- main
66
jobs:
7-
build-and-lint:
7+
build-lint:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
@@ -18,11 +18,12 @@ jobs:
1818
restore-keys: ${{ runner.os }}-node-
1919
- name: Add problem matcher
2020
run: echo "::add-matcher::.github/xo-problem-matcher.json"
21-
- name: Pull dependencies
22-
run: |
23-
npm ci
24-
npm run build
25-
npm run lint
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Compile TypeScript
24+
run: npm run compile
25+
- name: Run linter
26+
run: npm run lint
2627
build-docker:
2728
runs-on: ubuntu-latest
2829
steps:

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.vs/
33
.vscode/
44
build/
5+
coverage/
56
node_modules/
6-
src/config/*.yaml
77

88
.env
99
dotenv

Diff for: .prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
...require('gts/.prettierrc.json')
3+
}

Diff for: Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.15.0-alpine3.12 AS builder
1+
FROM node:14.15.4-alpine3.12 AS builder
22

33
LABEL org.opencontainers.image.source="https://github.com/jef/streetmerchant"
44

@@ -12,20 +12,20 @@ COPY tsconfig.json tsconfig.json
1212
RUN npm ci
1313

1414
COPY src/ src/
15-
RUN npm run build
15+
RUN npm run compile
1616
RUN npm prune --production
1717

18-
FROM node:14.15.0-alpine3.12
18+
FROM node:14.15.4-alpine3.12
1919

2020
RUN apk add --no-cache chromium
2121

2222
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser \
23-
DOCKER=true
23+
DOCKER=true
2424

2525
RUN addgroup -S appuser && adduser -S -g appuser appuser \
26-
&& mkdir -p /home/appuser/Downloads /app \
27-
&& chown -R appuser:appuser /home/appuser \
28-
&& chown -R appuser:appuser /app
26+
&& mkdir -p /home/appuser/Downloads /app \
27+
&& chown -R appuser:appuser /home/appuser \
28+
&& chown -R appuser:appuser /app
2929

3030
USER appuser
3131

Diff for: docs/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To customize streetmerchant, make a copy of `dotenv-example` as `dotenv` and mak
6464

6565
The command `npm run start:dev` can be used instead of `npm run start` to automatically restart the project when filesystem changes are detected in the `src/` folder or `dotenv` file.
6666

67-
Use `npm run lint` to see any linting uses and `npm run lint:fix` to automatically fix the issues it can.
67+
Use `npm run lint` to see any linting uses and `npm run fix` to automatically fix the issues it can.
6868

6969
### Developing in Docker
7070

Diff for: docs/javascripts/tables.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
app.document$.subscribe(function() {
2-
var tables = document.querySelectorAll("article table")
3-
tables.forEach(function(table) {
4-
new Tablesort(table)
5-
})
6-
})
1+
app.document$.subscribe(() => {
2+
const tables = document.querySelectorAll('article table');
3+
tables.forEach(table => {
4+
new Tablesort(table);
5+
});
6+
});

0 commit comments

Comments
 (0)