diff --git a/.eslintrc.js b/.eslintrc.js index 66a0f12ba1..f9ddb42ae0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -333,7 +333,7 @@ module.exports = defineConfig({ ], parserOptions: { - project: true, + projectService: true, tsconfigRootDir: __dirname, }, diff --git a/Gemfile.lock b/Gemfile.lock index de541edfbd..1564c267b8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,16 +100,16 @@ GEM attr_required (1.0.2) awrence (1.2.1) aws-eventstream (1.3.0) - aws-partitions (1.970.0) - aws-sdk-core (3.203.0) + aws-partitions (1.973.0) + aws-sdk-core (3.204.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.89.0) + aws-sdk-kms (1.90.0) aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.160.0) + aws-sdk-s3 (1.161.0) aws-sdk-core (~> 3, >= 3.203.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -601,7 +601,7 @@ GEM actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) - propshaft (0.9.1) + propshaft (1.0.0) actionpack (>= 7.0.0) activesupport (>= 7.0.0) rack @@ -691,7 +691,7 @@ GEM redlock (1.3.2) redis (>= 3.0.0, < 6.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) request_store (1.6.0) rack (>= 1.4) diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb index d956e4fcd8..bba6d64a47 100644 --- a/app/helpers/statuses_helper.rb +++ b/app/helpers/statuses_helper.rb @@ -4,6 +4,13 @@ module StatusesHelper EMBEDDED_CONTROLLER = 'statuses' EMBEDDED_ACTION = 'embed' + VISIBLITY_ICONS = { + public: 'globe', + unlisted: 'lock_open', + private: 'lock', + direct: 'alternate_email', + }.freeze + def nothing_here(extra_classes = '') content_tag(:div, class: "nothing-here #{extra_classes}") do t('accounts.nothing_here') @@ -57,17 +64,8 @@ module StatusesHelper embedded_view? ? '_blank' : nil end - def fa_visibility_icon(status) - case status.visibility - when 'public' - material_symbol 'globe' - when 'unlisted' - material_symbol 'lock_open' - when 'private' - material_symbol 'lock' - when 'direct' - material_symbol 'alternate_email' - end + def visibility_icon(status) + VISIBLITY_ICONS[status.visibility.to_sym] end def embedded_view? diff --git a/app/javascript/mastodon/actions/markers.ts b/app/javascript/mastodon/actions/markers.ts index 521859f6c2..6254e3f083 100644 --- a/app/javascript/mastodon/actions/markers.ts +++ b/app/javascript/mastodon/actions/markers.ts @@ -65,7 +65,7 @@ export const synchronouslySubmitMarkers = createAppAsyncThunk( client.setRequestHeader('Content-Type', 'application/json'); client.setRequestHeader('Authorization', `Bearer ${accessToken}`); client.send(JSON.stringify(params)); - } catch (e) { + } catch { // Do not make the BeforeUnload handler error out } }, diff --git a/app/javascript/mastodon/actions/streaming.js b/app/javascript/mastodon/actions/streaming.js index bfdd894b81..03013110c3 100644 --- a/app/javascript/mastodon/actions/streaming.js +++ b/app/javascript/mastodon/actions/streaming.js @@ -151,7 +151,7 @@ async function refreshHomeTimelineAndNotification(dispatch, getState) { // TODO: polling for merged notifications try { await dispatch(pollRecentGroupNotifications()); - } catch (error) { + } catch { // TODO } } else { diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js index 28857de534..c61e02250c 100644 --- a/app/javascript/mastodon/common.js +++ b/app/javascript/mastodon/common.js @@ -5,7 +5,7 @@ export function start() { try { Rails.start(); - } catch (e) { + } catch { // If called twice } } diff --git a/app/javascript/mastodon/components/error_boundary.jsx b/app/javascript/mastodon/components/error_boundary.jsx index 7fea08e85f..392a3ad61e 100644 --- a/app/javascript/mastodon/components/error_boundary.jsx +++ b/app/javascript/mastodon/components/error_boundary.jsx @@ -60,8 +60,8 @@ export default class ErrorBoundary extends PureComponent { try { textarea.select(); document.execCommand('copy'); - } catch (e) { - + } catch { + // do nothing } finally { document.body.removeChild(textarea); } diff --git a/app/javascript/mastodon/components/media_gallery.jsx b/app/javascript/mastodon/components/media_gallery.jsx index 9a8f852128..ba54b7f903 100644 --- a/app/javascript/mastodon/components/media_gallery.jsx +++ b/app/javascript/mastodon/components/media_gallery.jsx @@ -327,7 +327,7 @@ class MediaGallery extends PureComponent { } return ( -