Fix linter

This commit is contained in:
Natsumi
2023-01-08 02:29:49 +13:00
parent b95c184dde
commit d647b6a5ad
3 changed files with 25 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
{
"root": true,
"extends": ["@babel/core", "eslint:all", "prettier"],
"extends": ["eslint:all", "prettier"],
"env": {
"browser": true,
"commonjs": true,
@@ -16,7 +16,6 @@
},
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-env"],
"parserOpts": {
"plugins": ["importAssertions"]
}

View File

@@ -13001,16 +13001,18 @@ speechSynthesis.getVoices();
$app.data.isStartAtWindowsStartup = configRepository.getBool(
'VRCX_StartAtWindowsStartup'
);
$app.data.isStartAsMinimizedState =
(await VRCXStorage.Get('VRCX_StartAsMinimizedState')) === 'true';
$app.data.isCloseToTray = VRCXStorage.Get('VRCX_CloseToTray') === 'true';
$app.data.isStartAsMinimizedState = false;
$app.data.isCloseToTray = false;
VRCXStorage.Get('VRCX_StartAsMinimizedState').then((result) => {
$app.isStartAsMinimizedState = result === 'true';
});
VRCXStorage.Get('VRCX_CloseToTray').then((result) => {
$app.isCloseToTray = result === 'true';
});
if (configRepository.getBool('VRCX_CloseToTray')) {
// move back to JSON
$app.data.isCloseToTray = configRepository.getBool('VRCX_CloseToTray');
await VRCXStorage.Set(
'VRCX_CloseToTray',
$app.data.isCloseToTray.toString()
);
VRCXStorage.Set('VRCX_CloseToTray', $app.data.isCloseToTray.toString());
configRepository.remove('VRCX_CloseToTray');
}
var saveVRCXWindowOption = function () {

View File

@@ -4,21 +4,21 @@ function transformKey(key) {
return String(key).toLowerCase();
}
function waitSynchronous(promise) {
if (typeof promise !== 'object' || promise === null) {
return promise;
}
console.log('waitSynchronous', promise);
while (true) {
var state = promise.getState();
if (state === 'resolved') {
return promise.get();
}
if (state === 'rejected') {
return null;
}
}
}
// function waitSynchronous(promise) {
// if (typeof promise !== 'object' || promise === null) {
// return promise;
// }
// console.log('waitSynchronous', promise);
// while (true) {
// var state = promise.getState();
// if (state === 'resolved') {
// return promise.get();
// }
// if (state === 'rejected') {
// return null;
// }
// }
// }
class SharedRepository {
remove(key) {