Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Oct 5, 2024
1 parent b75a82e commit fa14db3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ const styleRules = {
// disallow dangling underscores in identifiers
// https://eslint.org/docs/rules/no-underscore-dangle
'no-underscore-dangle': ['error', {
allow: [],
allow: ['_id'],
allowAfterThis: false,
allowAfterSuper: false,
enforceInMethodNames: true,
Expand Down Expand Up @@ -553,7 +553,7 @@ export default ts.config(
devDependencies: [
'test/**',
'dev/**',
'**/.eslintrc.js',
'**/eslint.config.js',
],
optionalDependencies: false,
}],
Expand All @@ -564,7 +564,7 @@ export default ts.config(
// I disagree that this is bad
'max-classes-per-file': 'off',
// Allow `continue` in loops
'no-continue': ['off'],
'no-continue': 'off',
// Allow `for..of`
'no-restricted-syntax': [
'error',
Expand Down Expand Up @@ -596,6 +596,7 @@ export default ts.config(
rules: {
strict: ['error', 'global'],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const uw = uwave({
helmet: false,
});

uw.use(async function registerSources () {
uw.use(async function registerSources() {
// Register your Media Sources. The API keys are configured in the config.json
// file.
uw.source(youTubeSource, {
Expand All @@ -34,7 +34,7 @@ uw.use(async function registerSources () {
});
});

uw.use(async function registerWebClient () {
uw.use(async function registerWebClient() {
const webClient = createWebClient({
apiBase: '/api',
});
Expand Down
2 changes: 1 addition & 1 deletion src/auth/JWTStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class JWTStrategy extends Strategy {
let value;
try {
value = jwt.verify(token, this.secret);
} catch (e) {
} catch {
return this.pass();
}

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/now.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function getFirstItem(uw, activePlaylist) {
const item = await uw.playlists.getPlaylistItem(playlist, playlist.media[0]);
return item;
}
} catch (e) {
} catch {
// Nothing
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async function disconnectUser(uw, userID) {

try {
await removeFromWaitlist(uw, userID);
} catch (e) {
} catch {
// Ignore
}

Expand Down
2 changes: 1 addition & 1 deletion src/redisMessages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsonObject } from 'type-fest'; // eslint-disable-line import/no-unresolved, node/no-missing-import, node/no-unpublished-import
import { JsonObject } from 'type-fest'; // eslint-disable-line import/no-unresolved, n/no-missing-import, n/no-unpublished-import

export type ServerActionParameters = {
'advance:complete': {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable node/no-missing-import,node/no-unpublished-import */
/* eslint-disable n/no-missing-import,n/no-unpublished-import */
// This file contains supporting types that can't be expressed in JavaScript/JSDoc.

import type { Model } from 'mongoose';
Expand Down

0 comments on commit fa14db3

Please sign in to comment.