mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-25 16:55:37 +01:00
feat(ui): lint js code
This commit is contained in:
parent
3727e4185b
commit
c61c068ed0
@ -19,19 +19,19 @@
|
||||
"vue-router": "^3.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.14",
|
||||
"@vue/cli-plugin-eslint": "^4.5.14",
|
||||
"@vue/cli-service": "^4.5.14",
|
||||
"@vue/cli-plugin-babel": "^5.0.4",
|
||||
"@vue/cli-plugin-eslint": "^5.0.4",
|
||||
"@vue/cli-service": "^5.0.4",
|
||||
"@vue/eslint-config-standard": "^6.1.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^5.1.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^7.19.1",
|
||||
"express": "^4.17.1",
|
||||
"http-proxy-middleware": "^2.0.1",
|
||||
"eslint-plugin-vue": "^8.5.0",
|
||||
"express": "^4.17.3",
|
||||
"http-proxy-middleware": "^2.0.4",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* @param data POST data. Optional.
|
||||
*/
|
||||
export function stream_ajax (path, callback, successCallback, failCallback, data) {
|
||||
var req = new XMLHttpRequest()
|
||||
const req = new XMLHttpRequest()
|
||||
|
||||
console.log('Making streaming HTTP request to ' + path)
|
||||
|
||||
@ -28,23 +28,23 @@ export function stream_ajax (path, callback, successCallback, failCallback, data
|
||||
}
|
||||
})
|
||||
|
||||
var buffer = ''
|
||||
var seenBytes = 0
|
||||
let buffer = ''
|
||||
let seenBytes = 0
|
||||
|
||||
req.onreadystatechange = function () {
|
||||
if (req.readyState > 2) {
|
||||
buffer += req.responseText.substr(seenBytes)
|
||||
|
||||
var pointer
|
||||
let pointer
|
||||
while ((pointer = buffer.indexOf('\n')) >= 0) {
|
||||
var line = buffer.substring(0, pointer).trim()
|
||||
const line = buffer.substring(0, pointer).trim()
|
||||
buffer = buffer.substring(pointer + 1)
|
||||
|
||||
if (line.length === 0) {
|
||||
continue
|
||||
}
|
||||
|
||||
var contents = JSON.parse(line)
|
||||
const contents = JSON.parse(line)
|
||||
callback(contents)
|
||||
}
|
||||
|
||||
@ -59,9 +59,9 @@ export function stream_ajax (path, callback, successCallback, failCallback, data
|
||||
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
|
||||
|
||||
if (data != null) {
|
||||
var form = ''
|
||||
let form = ''
|
||||
|
||||
for (var key in data) {
|
||||
for (const key in data) {
|
||||
if (!data[key]) {
|
||||
continue
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
// See if we need to migrate yuzu to mainline
|
||||
let need_migrate = false
|
||||
for (const package_id in this.$root.metadata.database.packages) {
|
||||
var name = this.$root.metadata.database.packages[package_id].name
|
||||
const name = this.$root.metadata.database.packages[package_id].name
|
||||
if ((name.indexOf('Nightly') !== -1 || name.indexOf('Canary') !== -1)) {
|
||||
console.log('Migration needed (found "' + name + '", move to mainline)')
|
||||
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
|
||||
// Migration step: enable mainline
|
||||
for (const sub_package_id in this.$root.config.packages) {
|
||||
var name = this.$root.config.packages[sub_package_id].name
|
||||
const name = this.$root.config.packages[sub_package_id].name
|
||||
if (name === 'yuzu') {
|
||||
this.$root.config.packages[sub_package_id].default = true
|
||||
break
|
||||
|
5626
ui/yarn.lock
5626
ui/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user