mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-07 12:21:33 +00:00
Fix .eslintrc.json for client-side JS files
I can't remember why I extended the config with "eslint:recommended" instead of "standard" back then. I know I wanted to force an older ecmaversion, but even then it would still work just fine with standard. I've fixed it now to use standard. I've also applied auto-fix to dashboard.js and home.js, which fixed some stray or missing whitespaces, as well as the indenting of case's inside switch statement.
This commit is contained in:
parent
7587bfa408
commit
ed7612bd89
@ -7,33 +7,16 @@
|
|||||||
"browser": true
|
"browser": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended"
|
"standard"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"curly": [
|
"curly": [
|
||||||
"error",
|
"error",
|
||||||
"all"
|
"all"
|
||||||
],
|
],
|
||||||
"no-console": 0,
|
|
||||||
"semi": [
|
|
||||||
"error",
|
|
||||||
"never"
|
|
||||||
],
|
|
||||||
"space-before-function-paren": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"anonymous": "always",
|
|
||||||
"named": "never",
|
|
||||||
"asyncArrow": "always"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"quotes": [
|
"quotes": [
|
||||||
"error",
|
"error",
|
||||||
"single"
|
"single"
|
||||||
],
|
|
||||||
"indent": [
|
|
||||||
"error",
|
|
||||||
2
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1246,7 +1246,6 @@ page.setFileLength = function (fileLength, element) {
|
|||||||
page.changeToken = function () {
|
page.changeToken = function () {
|
||||||
axios.get('api/tokens')
|
axios.get('api/tokens')
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
|
||||||
if (response.data.success === false) {
|
if (response.data.success === false) {
|
||||||
if (response.data.description === 'No token provided') {
|
if (response.data.description === 'No token provided') {
|
||||||
return page.verifyToken(page.token)
|
return page.verifyToken(page.token)
|
||||||
@ -1275,7 +1274,6 @@ page.changeToken = function () {
|
|||||||
' </a>\n' +
|
' </a>\n' +
|
||||||
' </div>\n' +
|
' </div>\n' +
|
||||||
'</div>'
|
'</div>'
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@ -1385,7 +1383,6 @@ page.sendNewPassword = function (pass, element) {
|
|||||||
page.isLoading(element, false)
|
page.isLoading(element, false)
|
||||||
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
page.setActiveMenu = function (activeItem) {
|
page.setActiveMenu = function (activeItem) {
|
||||||
|
@ -25,7 +25,8 @@ var imageExtensions = ['.webp', '.jpg', '.jpeg', '.bmp', '.gif', '.png']
|
|||||||
|
|
||||||
page.checkIfPublic = function () {
|
page.checkIfPublic = function () {
|
||||||
axios.get('api/check')
|
axios.get('api/check')
|
||||||
.then(function (response) { page.private = response.data.private
|
.then(function (response) {
|
||||||
|
page.private = response.data.private
|
||||||
page.enableUserAccounts = response.data.enableUserAccounts
|
page.enableUserAccounts = response.data.enableUserAccounts
|
||||||
page.maxFileSize = response.data.maxFileSize
|
page.maxFileSize = response.data.maxFileSize
|
||||||
page.chunkSize = response.data.chunkSize
|
page.chunkSize = response.data.chunkSize
|
||||||
@ -38,7 +39,6 @@ page.checkIfPublic = function () {
|
|||||||
button.innerText = 'Error occurred. Reload the page?'
|
button.innerText = 'Error occurred. Reload the page?'
|
||||||
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
page.preparePage = function () {
|
page.preparePage = function () {
|
||||||
@ -477,7 +477,6 @@ page.createAlbum = function () {
|
|||||||
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle image paste event
|
// Handle image paste event
|
||||||
|
Loading…
Reference in New Issue
Block a user