[feature] fix sonarlint issues

This commit is contained in:
MathieuG-P
2024-09-01 22:55:21 +02:00
parent f84758c42d
commit 846945b75a
3 changed files with 4 additions and 4 deletions
@@ -67,7 +67,7 @@ export class InstallationLocationService {
}
if(this.staticConfig.has(this.STORE_INSTALLATION_PATH_KEY)) {
return this.staticConfig.get(this.STORE_INSTALLATION_PATH_KEY) as string;
return this.staticConfig.get(this.STORE_INSTALLATION_PATH_KEY);
}
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
@@ -4,14 +4,14 @@ type Item = {
text: string;
desc?: string;
checked?: boolean;
onChange?: (isChecked: boolean) => void;
onChange?: (isChecked: boolean) => void|Promise<void>;
};
type Props = {
items: Item[];
};
export function SettingToogleSwitchGrid({ items }: Props) {
export function SettingToogleSwitchGrid({ items }: Readonly<Props>) {
const handleItemChange = (item: Item, state: boolean) => {
item.onChange?.(state);
@@ -17,7 +17,7 @@ type Props = {
onChange?: (isChecked: boolean) => void;
}
export function ToogleSwitch({ checked, className, classNames, bgColor, onChange }: Props) {
export function ToogleSwitch({ checked, className, classNames, bgColor, onChange }: Readonly<Props>) {
const uuid = useConstant(() => crypto.randomUUID());
const { firstColor } = useThemeColor();