Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from eslint to semistandard #288

Merged
merged 25 commits into from
May 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4834751
remove eslint
geoffrey-wu May 18, 2024
3943f88
add semistandard to devDependencies
geoffrey-wu May 18, 2024
f1ad46e
run `npx semistandard --fix`
geoffrey-wu May 18, 2024
45715d3
fix use of deprecated `url.parse`
geoffrey-wu May 18, 2024
086254c
replace `localStorage` -> `window.localStorage`
geoffrey-wu May 18, 2024
f55fbec
replace `sessionStorage` -> `window.sessionStorage`
geoffrey-wu May 18, 2024
5d9370a
add semistandard ignore paths to package.json
geoffrey-wu May 18, 2024
a66aef6
replace `alert` => `window.alert`
geoffrey-wu May 18, 2024
56984d9
add ignore for `Audio` global
geoffrey-wu May 18, 2024
55d6037
replace `location` => `window.location`
geoffrey-wu May 18, 2024
8ce820e
prefix `screen` and `history` with `window.`
geoffrey-wu May 18, 2024
ea9f8f3
use === instead of ==
geoffrey-wu May 18, 2024
e7b4b79
add Stripe global
geoffrey-wu May 18, 2024
9619a19
add globals to package.json
geoffrey-wu May 18, 2024
143a29f
capitalize `stripeClass` => `StripeClass`
geoffrey-wu May 18, 2024
3fba3a3
add WebSocket global
geoffrey-wu May 18, 2024
3276cd1
fix ending tag alignment
geoffrey-wu May 18, 2024
6202788
fix semistandard errors not related to camelcase
geoffrey-wu May 18, 2024
72d8e05
fix camelcase errors in server/
geoffrey-wu May 20, 2024
9ec04be
fix camelcase errors in routes/
geoffrey-wu May 20, 2024
8ad80c2
fix camelcase errors in database/
geoffrey-wu May 20, 2024
5e2911e
fix camelcase errors in client/
geoffrey-wu May 20, 2024
fb6470b
update github workflow to semistandard
geoffrey-wu May 24, 2024
8f37a56
update .vscode settings
geoffrey-wu May 24, 2024
4010434
update Contributing section of README
geoffrey-wu May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix use of deprecated url.parse
  • Loading branch information
geoffrey-wu committed May 18, 2024
commit 45715d317a72355eff2f66e72e1fd82a3d8f8a88
4 changes: 2 additions & 2 deletions server/server.js
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@ app.use(ipFilterMiddleware);
app.use(ipFilterError);

wss.on('connection', (ws, req) => {
const parsedUrl = url.parse(req.url, true);
let { private: isPrivate, roomName, userId, username } = parsedUrl.query;
const parsedUrl = new url.URL(req.url, process.env.BASE_URL ?? 'http://localhost');
let { private: isPrivate, roomName, userId, username } = Object.fromEntries(parsedUrl.searchParams);
isPrivate = (isPrivate === 'true');
userId = (userId === 'unknown') ? uuid.v4() : userId;