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,26 +1,29 @@
import Gtk from "gi://Gtk?version=3.0";
import { Child } from "lib/types/bar";
import options from "options";
import { ButtonProps } from "types/widgets/button";
import { BarBoxChild } from 'lib/types/bar';
import { Bind } from 'lib/types/variable';
import { Attribute, GtkWidget } from 'lib/types/widget';
import options from 'options';
import Button from 'types/widgets/button';
export const BarItemBox = (child: Child): ButtonProps<Gtk.Widget> => {
const computeVisible = () => {
export const BarItemBox = (child: BarBoxChild): Button<GtkWidget, Attribute> => {
const computeVisible = (): Bind | boolean => {
if (child.isVis !== undefined) {
return child.isVis.bind("value");
return child.isVis.bind('value');
}
return child.isVisible;
};
return Widget.Button({
class_name: options.theme.bar.buttons.style.bind("value").as((style) => {
class_name: options.theme.bar.buttons.style.bind('value').as((style) => {
const styleMap = {
default: "style1",
split: "style2",
wave: "style3",
wave2: "style4",
default: 'style1',
split: 'style2',
wave: 'style3',
wave2: 'style4',
};
return `bar_item_box_visible ${styleMap[style]} ${Object.hasOwnProperty.call(child, "boxClass") ? child.boxClass : ""}`;
const boxClassName = Object.hasOwnProperty.call(child, 'boxClass') ? child.boxClass : '';
return `bar_item_box_visible ${styleMap[style]} ${boxClassName}`;
}),
child: child.component,
visible: computeVisible(),