Skip to content

Commit 2db2029

Browse files
author
mariaaenc
committed
refactor: prettier format
1 parent b8b24d8 commit 2db2029

40 files changed

+865
-354
lines changed

.eslintrc.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ module.exports = {
33
env: {
44
node: true
55
},
6-
"parser": "@typescript-eslint/parser",
7-
"plugins": [
8-
"@typescript-eslint"
9-
],
10-
"extends": [
11-
"eslint:recommended",
12-
"plugin:@typescript-eslint/eslint-recommended",
13-
"plugin:@typescript-eslint/recommended"
6+
parser: '@typescript-eslint/parser',
7+
plugins: ['@typescript-eslint'],
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:@typescript-eslint/eslint-recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
'prettier'
1413
],
1514
rules: {
1615
'no-unused-vars': 'warn',
17-
"indent": "off",
18-
"@typescript-eslint/indent": ["error", 2],
19-
"@typescript-eslint/semi": ["error", "never"],
20-
"no-trailing-spaces": ["warn"],
21-
'@typescript-eslint/no-var-requires': 0,
22-
},
23-
}
16+
'@typescript-eslint/semi': ['error', 'never'],
17+
'no-trailing-spaces': ['warn'],
18+
'@typescript-eslint/no-var-requires': 0
19+
}
20+
}

.github/workflows/main.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
21
name: Test - Build
32

43
on:
54
push:
6-
branches: [ master ]
5+
branches: [master]
76

87
jobs:
98
build:
10-
119
runs-on: ubuntu-latest
1210

1311
strategy:
1412
matrix:
1513
node-version: [16.6.1]
1614

1715
steps:
18-
- uses: actions/checkout@v2
19-
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node-version }}
23-
- run: yarn
24-
- run: yarn test
25-
- run: yarn build
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: yarn
22+
- run: yarn test
23+
- run: yarn build

.github/workflows/test.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@ name: Build - Test
22

33
on:
44
push:
5-
branches-ignore:
6-
- 'master'
5+
branches-ignore:
6+
- 'master'
77
pull_request:
8-
branches-ignore:
9-
- 'master'
8+
branches-ignore:
9+
- 'master'
1010

1111
jobs:
1212
build:
13-
1413
runs-on: ubuntu-latest
1514

1615
strategy:
1716
matrix:
1817
node-version: [16.6.1]
1918

2019
steps:
21-
- uses: actions/checkout@v2
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
- run: yarn
27-
- run: yarn test
28-
- run: yarn build
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: yarn
26+
- run: yarn test
27+
- run: yarn build

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true
6+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build - Deploy](https://github.com/codecon-dev/codecodes-api/actions/workflows/main.yml/badge.svg)](https://github.com/codecon-dev/codecodes-api/actions/workflows/main.yml)
44
[![https://img.shields.io/badge/made%20with-express-blue](https://img.shields.io/badge/made%20with-express-blue)](https://expressjs.com/)
55

6-
This is the API version of the CodeCodes gamification Discord Bot.
6+
This is the API version of the CodeCodes gamification Discord Bot.
77

88
You can check the available routes and methods by accessing /docs in the API URL (which is secret for now).
99

insomnia.json

Lines changed: 255 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,255 @@
1-
{"_type":"export","__export_format":4,"__export_date":"2021-09-05T13:32:00.783Z","__export_source":"insomnia.desktop.app:v2021.5.0","resources":[{"_id":"req_80ef6f2605d04fcca039e7b4374350ac","parentId":"fld_a636d28a6a8046c398d2854fa2bc6866","modified":1630848669202,"created":1628978528733,"url":"http://localhost:8080/token/claim","name":"Local - Claim","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"code\": \"CODE\",\n\t\"email\": \"mark@email.com\",\n\t\"name\": \"Mark Kop\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_deb2faf7d0ca458b9b262e43ec089eb5"},{"id":"pair_b2c39cdc7c404e84a05ab50adb0103c7","name":"x-apikey","value":"{{ _.apikey }}","description":""}],"authentication":{},"metaSortKey":-1628978528733,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_a636d28a6a8046c398d2854fa2bc6866","parentId":"wrk_e0726252a41d4d35aec21c9f1dd56984","modified":1628980633166,"created":1628980633166,"name":"Local","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1628980633166,"_type":"request_group"},{"_id":"wrk_e0726252a41d4d35aec21c9f1dd56984","parentId":null,"modified":1628978500394,"created":1628978500394,"name":"Codecon","description":"","scope":"collection","_type":"workspace"},{"_id":"req_08d2817bb79642c68f7dc8d06f857012","parentId":"fld_a636d28a6a8046c398d2854fa2bc6866","modified":1630848164336,"created":1629146754001,"url":"http://localhost:8080/user/rank","name":"Local - Rank","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_deb2faf7d0ca458b9b262e43ec089eb5"},{"id":"pair_b2c39cdc7c404e84a05ab50adb0103c7","name":"x-apikey","value":"{{ _.apikey }}","description":""}],"authentication":{},"metaSortKey":-1628978528708,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d78f02c07e0848c89cfd2767920d7710","parentId":"fld_a636d28a6a8046c398d2854fa2bc6866","modified":1630848177988,"created":1629146807642,"url":"http://localhost:8080/docs","name":"Local - Docs","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_deb2faf7d0ca458b9b262e43ec089eb5"},{"id":"pair_b2c39cdc7c404e84a05ab50adb0103c7","name":"x-apikey","value":"{{ _.apikey }}","description":""}],"authentication":{},"metaSortKey":-1628978528695.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_627eba67aa6849af9ba68e502db9a814","parentId":"fld_50c55e2305a140a6993efdc2dfe3d1b2","modified":1630848682603,"created":1628980589032,"url":"{{ _.base_url }}/token/claim","name":"Prod - Claim","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"code\": \"CODE\",\n\t\"email\": \"mark@email.com\",\n\t\"name\": \"Mark Kop\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_deb2faf7d0ca458b9b262e43ec089eb5"},{"id":"pair_b2c39cdc7c404e84a05ab50adb0103c7","name":"x-apikey","value":"{{ _.apikey }}","description":""}],"authentication":{},"metaSortKey":-1628978528683,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_50c55e2305a140a6993efdc2dfe3d1b2","parentId":"wrk_e0726252a41d4d35aec21c9f1dd56984","modified":1628980629915,"created":1628980629915,"name":"Production","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1628980629915,"_type":"request_group"},{"_id":"req_15acfd744b7742c5935954efb11a2f49","parentId":"fld_50c55e2305a140a6993efdc2dfe3d1b2","modified":1630848200477,"created":1629147246637,"url":"{{ _.base_url }}/user/rank","name":"Prod - Rank","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_deb2faf7d0ca458b9b262e43ec089eb5"},{"id":"pair_b2c39cdc7c404e84a05ab50adb0103c7","name":"x-apikey","value":"{{ _.apikey }}","description":""}],"authentication":{},"metaSortKey":-1628978528633,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_7b12eefe682227b690b9e5eb5bc0d0042543f6af","parentId":"wrk_e0726252a41d4d35aec21c9f1dd56984","modified":1628978500490,"created":1628978500490,"name":"Base Environment","data":{},"dataPropertyOrder":null,"color":null,"isPrivate":false,"metaSortKey":1628978500490,"_type":"environment"},{"_id":"jar_7b12eefe682227b690b9e5eb5bc0d0042543f6af","parentId":"wrk_e0726252a41d4d35aec21c9f1dd56984","modified":1628978500494,"created":1628978500494,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_0c9888d679404edb920a0636607c90c9","parentId":"wrk_e0726252a41d4d35aec21c9f1dd56984","modified":1628978500401,"created":1628978500401,"fileName":"Codecon","contents":"","contentType":"yaml","_type":"api_spec"}]}
1+
{
2+
"_type": "export",
3+
"__export_format": 4,
4+
"__export_date": "2021-09-05T13:32:00.783Z",
5+
"__export_source": "insomnia.desktop.app:v2021.5.0",
6+
"resources": [
7+
{
8+
"_id": "req_80ef6f2605d04fcca039e7b4374350ac",
9+
"parentId": "fld_a636d28a6a8046c398d2854fa2bc6866",
10+
"modified": 1630848669202,
11+
"created": 1628978528733,
12+
"url": "http://localhost:8080/token/claim",
13+
"name": "Local - Claim",
14+
"description": "",
15+
"method": "POST",
16+
"body": {
17+
"mimeType": "application/json",
18+
"text": "{\n\t\"code\": \"CODE\",\n\t\"email\": \"mark@email.com\",\n\t\"name\": \"Mark Kop\"\n}"
19+
},
20+
"parameters": [],
21+
"headers": [
22+
{
23+
"name": "Content-Type",
24+
"value": "application/json",
25+
"id": "pair_deb2faf7d0ca458b9b262e43ec089eb5"
26+
},
27+
{
28+
"id": "pair_b2c39cdc7c404e84a05ab50adb0103c7",
29+
"name": "x-apikey",
30+
"value": "{{ _.apikey }}",
31+
"description": ""
32+
}
33+
],
34+
"authentication": {},
35+
"metaSortKey": -1628978528733,
36+
"isPrivate": false,
37+
"settingStoreCookies": true,
38+
"settingSendCookies": true,
39+
"settingDisableRenderRequestBody": false,
40+
"settingEncodeUrl": true,
41+
"settingRebuildPath": true,
42+
"settingFollowRedirects": "global",
43+
"_type": "request"
44+
},
45+
{
46+
"_id": "fld_a636d28a6a8046c398d2854fa2bc6866",
47+
"parentId": "wrk_e0726252a41d4d35aec21c9f1dd56984",
48+
"modified": 1628980633166,
49+
"created": 1628980633166,
50+
"name": "Local",
51+
"description": "",
52+
"environment": {},
53+
"environmentPropertyOrder": null,
54+
"metaSortKey": -1628980633166,
55+
"_type": "request_group"
56+
},
57+
{
58+
"_id": "wrk_e0726252a41d4d35aec21c9f1dd56984",
59+
"parentId": null,
60+
"modified": 1628978500394,
61+
"created": 1628978500394,
62+
"name": "Codecon",
63+
"description": "",
64+
"scope": "collection",
65+
"_type": "workspace"
66+
},
67+
{
68+
"_id": "req_08d2817bb79642c68f7dc8d06f857012",
69+
"parentId": "fld_a636d28a6a8046c398d2854fa2bc6866",
70+
"modified": 1630848164336,
71+
"created": 1629146754001,
72+
"url": "http://localhost:8080/user/rank",
73+
"name": "Local - Rank",
74+
"description": "",
75+
"method": "GET",
76+
"body": { "mimeType": "application/json", "text": "" },
77+
"parameters": [],
78+
"headers": [
79+
{
80+
"name": "Content-Type",
81+
"value": "application/json",
82+
"id": "pair_deb2faf7d0ca458b9b262e43ec089eb5"
83+
},
84+
{
85+
"id": "pair_b2c39cdc7c404e84a05ab50adb0103c7",
86+
"name": "x-apikey",
87+
"value": "{{ _.apikey }}",
88+
"description": ""
89+
}
90+
],
91+
"authentication": {},
92+
"metaSortKey": -1628978528708,
93+
"isPrivate": false,
94+
"settingStoreCookies": true,
95+
"settingSendCookies": true,
96+
"settingDisableRenderRequestBody": false,
97+
"settingEncodeUrl": true,
98+
"settingRebuildPath": true,
99+
"settingFollowRedirects": "global",
100+
"_type": "request"
101+
},
102+
{
103+
"_id": "req_d78f02c07e0848c89cfd2767920d7710",
104+
"parentId": "fld_a636d28a6a8046c398d2854fa2bc6866",
105+
"modified": 1630848177988,
106+
"created": 1629146807642,
107+
"url": "http://localhost:8080/docs",
108+
"name": "Local - Docs",
109+
"description": "",
110+
"method": "GET",
111+
"body": { "mimeType": "application/json", "text": "" },
112+
"parameters": [],
113+
"headers": [
114+
{
115+
"name": "Content-Type",
116+
"value": "application/json",
117+
"id": "pair_deb2faf7d0ca458b9b262e43ec089eb5"
118+
},
119+
{
120+
"id": "pair_b2c39cdc7c404e84a05ab50adb0103c7",
121+
"name": "x-apikey",
122+
"value": "{{ _.apikey }}",
123+
"description": ""
124+
}
125+
],
126+
"authentication": {},
127+
"metaSortKey": -1628978528695.5,
128+
"isPrivate": false,
129+
"settingStoreCookies": true,
130+
"settingSendCookies": true,
131+
"settingDisableRenderRequestBody": false,
132+
"settingEncodeUrl": true,
133+
"settingRebuildPath": true,
134+
"settingFollowRedirects": "global",
135+
"_type": "request"
136+
},
137+
{
138+
"_id": "req_627eba67aa6849af9ba68e502db9a814",
139+
"parentId": "fld_50c55e2305a140a6993efdc2dfe3d1b2",
140+
"modified": 1630848682603,
141+
"created": 1628980589032,
142+
"url": "{{ _.base_url }}/token/claim",
143+
"name": "Prod - Claim",
144+
"description": "",
145+
"method": "POST",
146+
"body": {
147+
"mimeType": "application/json",
148+
"text": "{\n\t\"code\": \"CODE\",\n\t\"email\": \"mark@email.com\",\n\t\"name\": \"Mark Kop\"\n}"
149+
},
150+
"parameters": [],
151+
"headers": [
152+
{
153+
"name": "Content-Type",
154+
"value": "application/json",
155+
"id": "pair_deb2faf7d0ca458b9b262e43ec089eb5"
156+
},
157+
{
158+
"id": "pair_b2c39cdc7c404e84a05ab50adb0103c7",
159+
"name": "x-apikey",
160+
"value": "{{ _.apikey }}",
161+
"description": ""
162+
}
163+
],
164+
"authentication": {},
165+
"metaSortKey": -1628978528683,
166+
"isPrivate": false,
167+
"settingStoreCookies": true,
168+
"settingSendCookies": true,
169+
"settingDisableRenderRequestBody": false,
170+
"settingEncodeUrl": true,
171+
"settingRebuildPath": true,
172+
"settingFollowRedirects": "global",
173+
"_type": "request"
174+
},
175+
{
176+
"_id": "fld_50c55e2305a140a6993efdc2dfe3d1b2",
177+
"parentId": "wrk_e0726252a41d4d35aec21c9f1dd56984",
178+
"modified": 1628980629915,
179+
"created": 1628980629915,
180+
"name": "Production",
181+
"description": "",
182+
"environment": {},
183+
"environmentPropertyOrder": null,
184+
"metaSortKey": -1628980629915,
185+
"_type": "request_group"
186+
},
187+
{
188+
"_id": "req_15acfd744b7742c5935954efb11a2f49",
189+
"parentId": "fld_50c55e2305a140a6993efdc2dfe3d1b2",
190+
"modified": 1630848200477,
191+
"created": 1629147246637,
192+
"url": "{{ _.base_url }}/user/rank",
193+
"name": "Prod - Rank",
194+
"description": "",
195+
"method": "GET",
196+
"body": { "mimeType": "application/json", "text": "" },
197+
"parameters": [],
198+
"headers": [
199+
{
200+
"name": "Content-Type",
201+
"value": "application/json",
202+
"id": "pair_deb2faf7d0ca458b9b262e43ec089eb5"
203+
},
204+
{
205+
"id": "pair_b2c39cdc7c404e84a05ab50adb0103c7",
206+
"name": "x-apikey",
207+
"value": "{{ _.apikey }}",
208+
"description": ""
209+
}
210+
],
211+
"authentication": {},
212+
"metaSortKey": -1628978528633,
213+
"isPrivate": false,
214+
"settingStoreCookies": true,
215+
"settingSendCookies": true,
216+
"settingDisableRenderRequestBody": false,
217+
"settingEncodeUrl": true,
218+
"settingRebuildPath": true,
219+
"settingFollowRedirects": "global",
220+
"_type": "request"
221+
},
222+
{
223+
"_id": "env_7b12eefe682227b690b9e5eb5bc0d0042543f6af",
224+
"parentId": "wrk_e0726252a41d4d35aec21c9f1dd56984",
225+
"modified": 1628978500490,
226+
"created": 1628978500490,
227+
"name": "Base Environment",
228+
"data": {},
229+
"dataPropertyOrder": null,
230+
"color": null,
231+
"isPrivate": false,
232+
"metaSortKey": 1628978500490,
233+
"_type": "environment"
234+
},
235+
{
236+
"_id": "jar_7b12eefe682227b690b9e5eb5bc0d0042543f6af",
237+
"parentId": "wrk_e0726252a41d4d35aec21c9f1dd56984",
238+
"modified": 1628978500494,
239+
"created": 1628978500494,
240+
"name": "Default Jar",
241+
"cookies": [],
242+
"_type": "cookie_jar"
243+
},
244+
{
245+
"_id": "spc_0c9888d679404edb920a0636607c90c9",
246+
"parentId": "wrk_e0726252a41d4d35aec21c9f1dd56984",
247+
"modified": 1628978500401,
248+
"created": 1628978500401,
249+
"fileName": "Codecon",
250+
"contents": "",
251+
"contentType": "yaml",
252+
"_type": "api_spec"
253+
}
254+
]
255+
}

0 commit comments

Comments
 (0)