Implemented strict linting standards and prettier formatting config. (#248)

* Implemented strict linting standards and prettier formatting config.

* More linter fixes and type updates.

* More linter updates and type fixes

* Remove noisy comments

* Linter and type updates

* Linter, formatting and type updates.

* Linter updates

* Type updates

* Type updates

* fixed all linter errors

* Fixed all linting, formatting and type issues.

* Resolve merge conflicts.
This commit is contained in:
Jas Singh
2024-09-14 16:20:05 -07:00
committed by GitHub
parent ff13e3dd3c
commit 2c72cc66d8
222 changed files with 13141 additions and 8433 deletions

View File

@@ -1,33 +1,34 @@
import { closeNotifications } from "globals/notification";
import { Notifications } from "types/service/notifications";
import { closeNotifications } from 'globals/notification';
import { BoxWidget } from 'lib/types/widget';
import { Notifications } from 'types/service/notifications';
const Controls = (notifs: Notifications) => {
const Controls = (notifs: Notifications): BoxWidget => {
return Widget.Box({
class_name: "notification-menu-controls",
class_name: 'notification-menu-controls',
expand: false,
vertical: false,
children: [
Widget.Box({
class_name: "menu-label-container notifications",
hpack: "start",
vpack: "center",
class_name: 'menu-label-container notifications',
hpack: 'start',
vpack: 'center',
expand: true,
children: [
Widget.Label({
class_name: "menu-label notifications",
label: "Notifications",
class_name: 'menu-label notifications',
label: 'Notifications',
}),
],
}),
Widget.Box({
hpack: "end",
vpack: "center",
hpack: 'end',
vpack: 'center',
expand: false,
children: [
Widget.Switch({
class_name: "menu-switch notifications",
vpack: "center",
active: notifs.bind("dnd").as((dnd: boolean) => !dnd),
class_name: 'menu-switch notifications',
vpack: 'center',
active: notifs.bind('dnd').as((dnd: boolean) => !dnd),
on_activate: ({ active }) => {
notifs.dnd = !active;
},
@@ -35,14 +36,14 @@ const Controls = (notifs: Notifications) => {
Widget.Box({
children: [
Widget.Separator({
hpack: "center",
hpack: 'center',
vexpand: true,
vertical: true,
class_name: "menu-separator notification-controls",
class_name: 'menu-separator notification-controls',
}),
Widget.Button({
className: "clear-notifications-button",
tooltip_text: "Clear Notifications",
className: 'clear-notifications-button',
tooltip_text: 'Clear Notifications',
on_primary_click: () => {
if (removingNotifications.value) {
return;
@@ -51,12 +52,12 @@ const Controls = (notifs: Notifications) => {
closeNotifications(notifs.notifications);
},
child: Widget.Label({
class_name: removingNotifications.bind("value").as((removing: boolean) => {
class_name: removingNotifications.bind('value').as((removing: boolean) => {
return removing
? "clear-notifications-label txt-icon removing"
: "clear-notifications-label txt-icon";
? 'clear-notifications-label txt-icon removing'
: 'clear-notifications-label txt-icon';
}),
label: "",
label: '',
}),
}),
],