mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-12-22 19:25:40 +00:00
lint: automated lint
This commit is contained in:
parent
ca6ac320c2
commit
713b85b59a
7
build.rs
7
build.rs
|
@ -87,8 +87,8 @@ fn main() {
|
|||
// Copy for the main build
|
||||
copy(&target_config, output_dir.join("bootstrap.toml")).expect("Unable to copy config file");
|
||||
|
||||
let yarn_binary = which::which("yarn")
|
||||
.expect("Failed to find yarn - please go ahead and install it!");
|
||||
let yarn_binary =
|
||||
which::which("yarn").expect("Failed to find yarn - please go ahead and install it!");
|
||||
|
||||
// Build and deploy frontend files
|
||||
Command::new(&yarn_binary)
|
||||
|
@ -100,7 +100,8 @@ fn main() {
|
|||
.arg(ui_dir.to_str().expect("Unable to covert path"))
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait().expect("Unable to install Node.JS dependencies using Yarn");
|
||||
.wait()
|
||||
.expect("Unable to install Node.JS dependencies using Yarn");
|
||||
let return_code = Command::new(&yarn_binary)
|
||||
.args(&[
|
||||
"--cwd",
|
||||
|
|
|
@ -22,8 +22,8 @@ use futures::sink::Sink;
|
|||
|
||||
mod attributes;
|
||||
mod config;
|
||||
mod default_path;
|
||||
mod dark_mode;
|
||||
mod default_path;
|
||||
mod exit;
|
||||
mod install;
|
||||
mod installation_status;
|
||||
|
|
|
@ -12,7 +12,7 @@ use log::Level;
|
|||
enum CallbackType {
|
||||
SelectInstallDir { callback_name: String },
|
||||
Log { msg: String, kind: String },
|
||||
Test {}
|
||||
Test {},
|
||||
}
|
||||
|
||||
/// Starts the main web UI. Will return when UI is closed.
|
||||
|
|
|
@ -38,9 +38,9 @@ extern crate chrono;
|
|||
|
||||
extern crate clap;
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
#[cfg(windows)]
|
||||
extern crate widestring;
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
extern crate slug;
|
||||
|
|
|
@ -300,7 +300,7 @@ mod natives {
|
|||
Ok(file) => file,
|
||||
Err(e) => return Err(format!("Unable to create desktop file: {}", e)),
|
||||
};
|
||||
let mut desktop_f = desktop_f.write_all(desktop_file.as_bytes());
|
||||
let desktop_f = desktop_f.write_all(desktop_file.as_bytes());
|
||||
match desktop_f {
|
||||
Ok(_) => Ok("".to_string()),
|
||||
Err(e) => Err(format!("Unable to write desktop file: {}", e)),
|
||||
|
|
|
@ -24,14 +24,14 @@ function intercept (method) {
|
|||
}
|
||||
|
||||
// See if we have access to the JSON interface
|
||||
var has_external_interface = false;
|
||||
var has_external_interface = false
|
||||
try {
|
||||
window.external.invoke(JSON.stringify({
|
||||
Test: {}
|
||||
}))
|
||||
has_external_interface = true;
|
||||
has_external_interface = true
|
||||
} catch (e) {
|
||||
console.warn("Running without JSON interface - unexpected behaviour may occur!")
|
||||
console.warn('Running without JSON interface - unexpected behaviour may occur!')
|
||||
}
|
||||
|
||||
// Overwrite loggers with the logging backend
|
||||
|
@ -101,13 +101,14 @@ var app = new Vue({
|
|||
'/api/exit',
|
||||
function () {},
|
||||
function (msg) {
|
||||
var search_location = app.metadata.install_path.length > 0 ? app.metadata.install_path :
|
||||
"the location where this installer is";
|
||||
var search_location = app.metadata.install_path.length > 0 ? app.metadata.install_path
|
||||
: 'the location where this installer is'
|
||||
|
||||
app.$router.replace({ name: 'showerr', params: { msg: msg +
|
||||
app.$router.replace({ name: 'showerr',
|
||||
params: { msg: msg +
|
||||
'\n\nPlease upload the log file (in ' + search_location + ') to ' +
|
||||
'the ' + app.attrs.name + ' team'
|
||||
}});
|
||||
} })
|
||||
}
|
||||
)
|
||||
},
|
||||
|
@ -116,4 +117,4 @@ var app = new Vue({
|
|||
}
|
||||
}).$mount('#app')
|
||||
|
||||
console.log("Vue started")
|
||||
console.log('Vue started')
|
||||
|
|
|
@ -38,12 +38,12 @@ export default {
|
|||
return {
|
||||
// https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
|
||||
msg: this.$route.params.msg
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'")
|
||||
.replace(/\n/g, "<br />"),
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\n/g, '<br />'),
|
||||
remaining: window.history.length > 1
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue