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,52 +1,54 @@
const network = await Service.import("network");
import { BoxWidget } from 'lib/types/widget';
const Ethernet = () => {
const network = await Service.import('network');
const Ethernet = (): BoxWidget => {
return Widget.Box({
class_name: "menu-section-container ethernet",
class_name: 'menu-section-container ethernet',
vertical: true,
children: [
Widget.Box({
class_name: "menu-label-container",
hpack: "fill",
class_name: 'menu-label-container',
hpack: 'fill',
child: Widget.Label({
class_name: "menu-label",
class_name: 'menu-label',
hexpand: true,
hpack: "start",
label: "Ethernet",
hpack: 'start',
label: 'Ethernet',
}),
}),
Widget.Box({
class_name: "menu-items-section",
class_name: 'menu-items-section',
vertical: true,
child: Widget.Box({
class_name: "menu-content",
class_name: 'menu-content',
vertical: true,
setup: (self) => {
self.hook(network, () => {
return (self.child = Widget.Box({
class_name: "network-element-item",
class_name: 'network-element-item',
child: Widget.Box({
hpack: "start",
hpack: 'start',
children: [
Widget.Icon({
class_name: `network-icon ethernet ${network.wired.state === "activated" ? "active" : ""}`,
class_name: `network-icon ethernet ${network.wired.state === 'activated' ? 'active' : ''}`,
tooltip_text: network.wired.internet,
icon: `${network.wired["icon_name"]}`,
icon: `${network.wired['icon_name']}`,
}),
Widget.Box({
class_name: "connection-container",
class_name: 'connection-container',
vertical: true,
children: [
Widget.Label({
class_name: "active-connection",
hpack: "start",
truncate: "end",
class_name: 'active-connection',
hpack: 'start',
truncate: 'end',
wrap: true,
label: `Ethernet Connection ${network.wired.state !== "unknown" && typeof network.wired?.speed === "number" ? `(${network.wired?.speed / 1000} Gbps)` : ""}`,
label: `Ethernet Connection ${network.wired.state !== 'unknown' && typeof network.wired?.speed === 'number' ? `(${network.wired?.speed / 1000} Gbps)` : ''}`,
}),
Widget.Label({
hpack: "start",
class_name: "connection-status dim",
hpack: 'start',
class_name: 'connection-status dim',
label:
network.wired.internet.charAt(0).toUpperCase() +
network.wired.internet.slice(1),