Skip to content

Commit 3913946

Browse files
committed
Add Prettier Pug plugin; update dependencies
1 parent 48963dc commit 3913946

36 files changed

+450
-389
lines changed

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"plugins": ["@prettier/plugin-pug"],
23
"singleQuote": true,
34
"printWidth": 300
45
}

package-lock.json

Lines changed: 36 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@passport-js/passport-twitter": "^1.0.10",
3232
"@popperjs/core": "^2.11.8",
3333
"axios": "^1.8.4",
34-
"bootstrap": "^5.3.3",
34+
"bootstrap": "^5.3.4",
3535
"bootstrap-social": "github:SeattleDevs/bootstrap-social",
3636
"chart.js": "^4.4.8",
3737
"cheerio": "^1.0.0",
@@ -74,6 +74,7 @@
7474
"@eslint/compat": "^1.2.8",
7575
"@eslint/eslintrc": "^3.3.1",
7676
"@eslint/js": "^9.18.0",
77+
"@prettier/plugin-pug": "^3.3.0",
7778
"c8": "^10.1.3",
7879
"chai": "^5.2.0",
7980
"eslint": "^9.23.0",
@@ -85,7 +86,7 @@
8586
"husky": "^9.1.7",
8687
"mocha": "^11.1.0",
8788
"mongodb-memory-server": "^10.1.4",
88-
"prettier": "3.5.3",
89+
"prettier": "^3.5.3",
8990
"sinon": "^20.0.0",
9091
"supertest": "^7.1.0"
9192
},

views/account/forgot.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ block content
99
.form-group.row.mb-3
1010
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
1111
.col-md-7
12-
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, autocomplete='email', required)
12+
input#email.form-control(type='email', name='email', placeholder='Email', autofocus, autocomplete='email', required)
1313
.form-group.row
1414
.col-md-3
1515
.col-md-7

views/account/login.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ block content
88
.form-group.row.mb-3
99
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
1010
.col-md-7
11-
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, autocomplete='email', required)
11+
input#email.form-control(type='email', name='email', placeholder='Email', autofocus, autocomplete='email', required)
1212
.form-group.row.mb-3
1313
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') Password
1414
.col-md-7
15-
input.form-control(type='password', name='password', id='password', placeholder='Password', autocomplete='current-password', required)
15+
input#password.form-control(type='password', name='password', placeholder='Password', autocomplete='current-password', required)
1616
.form-group.row
1717
.col-md-7.offset-md-3
1818
button.col-md-2.btn.btn-primary(type='submit')

views/account/profile.pug

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ block content
99
.form-group.row
1010
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
1111
.col-md-7
12-
input.form-control(type='email', name='email', id='email', value=user.email, autocomplete='email', required)
12+
input#email.form-control(type='email', name='email', value=user.email, autocomplete='email', required)
1313
.offset-sm-3.col-md-7.pl-3.mb-2
1414
if user.emailVerified
1515
.text-success.font-italic
@@ -21,33 +21,33 @@ block content
2121
.form-group.row
2222
label.col-md-3.col-form-label.font-weight-bold.text-right(for='name') Name
2323
.col-md-7.mt-2
24-
input.form-control(type='text', name='name', id='name', value=user.profile.name, autocomplete='name')
24+
input#name.form-control(type='text', name='name', value=user.profile.name, autocomplete='name')
2525
.form-group.row
2626
label.col-md-3.col-form-label.font-weight-bold.text-right Gender
2727
.col-sm-6.mt-2
2828
.form-check.form-check-inline
29-
input(type='radio', class='form-check-input' checked=user.profile.gender == 'male', name='gender', value='male', data-toggle='radio')
29+
input.form-check-input(type='radio', checked=user.profile.gender == 'male', name='gender', value='male', data-toggle='radio')
3030
label.form-check-label Male
3131

3232
.form-check.form-check-inline
33-
input(type='radio', class='form-check-input' checked=user.profile.gender == 'female', name='gender', value='female', data-toggle='radio')
33+
input.form-check-input(type='radio', checked=user.profile.gender == 'female', name='gender', value='female', data-toggle='radio')
3434
label.form-check-label Female
3535

3636
.form-check.form-check-inline
37-
input(type='radio', class='form-check-input' checked=user.profile.gender == 'other', name='gender', value='other', data-toggle='radio')
37+
input.form-check-input(type='radio', checked=user.profile.gender == 'other', name='gender', value='other', data-toggle='radio')
3838
label.form-check-label Other
3939
.form-group.row
4040
label.col-md-3.col-form-label.font-weight-bold.text-right(for='location') Location
4141
.col-md-7.mb-2
42-
input.form-control(type='text', name='location', id='location', value=user.profile.location, autocomplete)
42+
input#location.form-control(type='text', name='location', value=user.profile.location, autocomplete)
4343
.form-group.row
4444
label.col-md-3.col-form-label.font-weight-bold.text-right(for='website') Website
4545
.col-md-7.mb-2
46-
input.form-control(type='text', name='website', id='website', value=user.profile.website, autocomplete='url')
46+
input#website.form-control(type='text', name='website', value=user.profile.website, autocomplete='url')
4747
.form-group.row
4848
label.col-md-3.col-form-label.font-weight-bold.text-right Profile Picture
4949
.col-sm-4.mb-2
50-
img(src=(user.profile.picture ? user.profile.picture : user.gravatar()), class='profile', width='100', height='100')
50+
img.profile(src=user.profile.picture ? user.profile.picture : user.gravatar(), width='100', height='100')
5151
.form-group
5252
.offset-sm-3.col-md-7.pl-2
5353
button.btn.btn.btn-primary(type='submit')
@@ -62,11 +62,11 @@ block content
6262
.form-group.row
6363
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') New Password
6464
.col-md-7.mb-2
65-
input.form-control(type='password', name='password', id='password', autocomplete='new-password', minlength='8', required)
65+
input#password.form-control(type='password', name='password', autocomplete='new-password', minlength='8', required)
6666
.form-group.row
6767
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirmPassword') Confirm Password
6868
.col-md-7.mb-2
69-
input.form-control(type='password', name='confirmPassword', id='confirmPassword', autocomplete='new-password', minlength='8', required)
69+
input#confirmPassword.form-control(type='password', name='confirmPassword', autocomplete='new-password', minlength='8', required)
7070
.form-group
7171
.offset-sm-3.col-md-7.pl-2
7272
button.btn.btn-primary(type='submit')
@@ -89,7 +89,7 @@ block content
8989
.pb-2.mt-2.mb-4.border-bottom
9090
h3 Delete Account
9191

92-
form(action='/account/delete', method='POST', onsubmit="return confirm('Are you sure you want to delete your account?');")
92+
form(action='/account/delete', method='POST', onsubmit='return confirm(\'Are you sure you want to delete your account?\');')
9393
.form-group
9494
p.offset-sm-3.col-md-7.pl-2 You can delete your account, but keep in mind this action is irreversible.
9595
input(type='hidden', name='_csrf', value=_csrf)

views/account/reset.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ block content
88
.form-group.row.mb-4
99
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') New Password
1010
.col-md-7
11-
input.form-control(type='password', name='password', id='password', placeholder='New password', autofocus, autocomplete='new-password', minlength='8', required)
11+
input#password.form-control(type='password', name='password', placeholder='New password', autofocus, autocomplete='new-password', minlength='8', required)
1212
.form-group.row.mb-4
1313
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirm') Confirm Password
1414
.col-md-7
15-
input.form-control(type='password', name='confirm', id='confirm', placeholder='Confirm password', autocomplete='new-password', minlength='8', required)
15+
input#confirm.form-control(type='password', name='confirm', placeholder='Confirm password', autocomplete='new-password', minlength='8', required)
1616
.form-group.row
1717
.col-md-3
1818
.col-md-7

views/account/signup.pug

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ extends ../layout
33
block content
44
.pb-2.mt-2.mb-4.border-bottom
55
h3 Sign up
6-
form(id='signup-form', method='POST')
6+
form#signup-form(method='POST')
77
input(type='hidden', name='_csrf', value=_csrf)
88
.form-group.row.mb-3
99
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
1010
.col-md-7
11-
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, autocomplete='email', required)
11+
input#email.form-control(type='email', name='email', placeholder='Email', autofocus, autocomplete='email', required)
1212
.form-group.row.mb-3
1313
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') Password
1414
.col-md-7
15-
input.form-control(type='password', name='password', id='password', placeholder='Password', autocomplete='new-password', minlength='8', required)
15+
input#password.form-control(type='password', name='password', placeholder='Password', autocomplete='new-password', minlength='8', required)
1616
.form-group.row.mb-3
1717
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirmPassword') Confirm Password
1818
.col-md-7
19-
input.form-control(type='password', name='confirmPassword', id='confirmPassword', placeholder='Confirm Password', autocomplete='new-password', minlength='8', required)
19+
input#confirmPassword.form-control(type='password', name='confirmPassword', placeholder='Confirm Password', autocomplete='new-password', minlength='8', required)
2020
.form-group.row
2121
.col-md-3
2222
.col-md-7

views/api/chart.pug

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ block head
66
block content
77
.pb-2.mt-2.mb-4.border-bottom
88
h2
9-
i.fas.fa-chart-bar.fa-sm(style='color: #FF6384').fa-sm.iconpadding
9+
i.fas.fa-chart-bar.fa-sm.fa-sm.iconpadding(style='color: #ff6384')
1010
| Chart.js and Alpha Vantage
1111

1212
.btn-group.d-flex(role='group')
13-
a.btn.btn-primary(href='https://www.chartjs.org/docs', target='_blank').w-100
13+
a.btn.btn-primary.w-100(href='https://www.chartjs.org/docs', target='_blank')
1414
i.fas.fa-chart-bar.fa-sm.iconpadding
1515
| Chart.js Docs
16-
a.btn.btn-primary(href='https://www.alphavantage.co/documentation', target='_blank').w-100
16+
a.btn.btn-primary.w-100(href='https://www.alphavantage.co/documentation', target='_blank')
1717
i.fas.fa-money-check-alt.fa-sm.iconpadding
1818
| Alpha Vantage Docs
1919
.container
@@ -23,27 +23,29 @@ block content
2323
| ChartJS can render various chart types with different formatting.
2424
| This example plots the closing stock price of Microsoft for the last 100 days.
2525
p
26-
h6 #{dataType}
26+
h6 #{ dataType }
2727
.mt-2.mb-4
28-
div(style='width:90%; height:80%; margin: 0 auto;')
28+
div(style='width: 90%; height: 80%; margin: 0 auto')
2929
canvas#chart
3030
script.
31-
var datesList = !{dates};
32-
var closingList = !{closing};
31+
var datesList = !{ dates };
32+
var closingList = !{ closing };
3333
var ctx = document.getElementById('chart').getContext('2d');
3434
var myChart = new Chart(ctx, {
35-
type: 'line',
36-
data: {
37-
labels: datesList,
38-
datasets: [{
39-
label: "Microsoft's Closing Stock Values",
40-
data: closingList,
41-
borderColor: "#3e95cd",
42-
backgroundColor: "rgba(118,152,255,0.4)"
43-
}]
44-
},
45-
options: {
46-
responsive:true,
47-
maintainAspectRatio: true,
48-
},
49-
});
35+
type: 'line',
36+
data: {
37+
labels: datesList,
38+
datasets: [
39+
{
40+
label: "Microsoft's Closing Stock Values",
41+
data: closingList,
42+
borderColor: '#3e95cd',
43+
backgroundColor: 'rgba(118,152,255,0.4)',
44+
},
45+
],
46+
},
47+
options: {
48+
responsive: true,
49+
maintainAspectRatio: true,
50+
},
51+
});

views/api/facebook.pug

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@ extends ../layout
33
block content
44
.pb-2.mt-2.mb-4.border-bottom
55
h2
6-
i.fab.fa-facebook-square(style='color: #335397').fa-sm.iconpadding
6+
i.fab.fa-facebook-square.fa-sm.iconpadding(style='color: #335397')
77
| Facebook API
88
.btn-group.d-flex(role='group')
9-
a.btn.btn-primary(href='https://developers.facebook.com/docs/graph-api/quickstart/', target='_blank').w-100
9+
a.btn.btn-primary.w-100(href='https://developers.facebook.com/docs/graph-api/quickstart/', target='_blank')
1010
i.far.fa-check-square.fa-sm.iconpadding
1111
| Quickstart
12-
a.btn.btn-primary(href='https://developers.facebook.com/tools/explorer', target='_blank').w-100
12+
a.btn.btn-primary.w-100(href='https://developers.facebook.com/tools/explorer', target='_blank')
1313
i.fab.fa-facebook.fa-sm.iconpadding
1414
| Graph API Explorer
15-
a.btn.btn-primary(href='https://developers.facebook.com/docs/graph-api/reference/', target='_blank').w-100
15+
a.btn.btn-primary.w-100(href='https://developers.facebook.com/docs/graph-api/reference/', target='_blank')
1616
i.fas.fa-code-branch.fa-sm.iconpadding
1717
| API Reference
1818

1919
h3
2020
i.far.fa-user.fa-sm
21-
| My Profile
21+
|
22+
| My Profile
2223
img.thumbnail(src=`https://graph.facebook.com/${profile.id}/picture?type=large`, width='90', height='90')
2324
h4= profile.name
24-
h6 First Name: #{profile.first_name}
25-
h6 Last Name: #{profile.last_name}
26-
h6 Gender: #{profile.gender}
27-
h6 Username: #{profile.username}
28-
h6 Link: #{profile.link}
29-
h6 Email: #{profile.email}
30-
h6 Locale: #{profile.locale}
31-
h6 Timezone: #{profile.timezone}
25+
h6 First Name: #{ profile.first_name }
26+
h6 Last Name: #{ profile.last_name }
27+
h6 Gender: #{ profile.gender }
28+
h6 Username: #{ profile.username }
29+
h6 Link: #{ profile.link }
30+
h6 Email: #{ profile.email }
31+
h6 Locale: #{ profile.locale }
32+
h6 Timezone: #{ profile.timezone }

0 commit comments

Comments
 (0)