mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-03-21 17:24:28 -05:00
style: update eslint-config and lint
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
This commit is contained in:
parent
746870c9e0
commit
743f99a9c6
14
package-lock.json
generated
14
package-lock.json
generated
|
|
@ -34,7 +34,7 @@
|
|||
"stripe": "^9.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pretendonetwork/eslint-config": "^0.0.3",
|
||||
"@pretendonetwork/eslint-config": "^0.0.6",
|
||||
"eslint": "^9.18.0",
|
||||
"globals": "^15.14.0"
|
||||
}
|
||||
|
|
@ -1601,9 +1601,9 @@
|
|||
"integrity": "sha512-Kfj/WeaKLTQ8TJAGeTnMZVmGq3W6Ypzy383DITsVxVpViJY6e2fdtmXRoPhL5a/7UIR0HUJKGwPALEdLeNicAw=="
|
||||
},
|
||||
"node_modules/@pretendonetwork/eslint-config": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@pretendonetwork/eslint-config/-/eslint-config-0.0.3.tgz",
|
||||
"integrity": "sha512-aV+TY4Bi4YaOc68x3Eq6y3zeDudQDfyQzLloRby011rMeTtKQWeK1YTVcBU72c6CvnSm5cAIHjFf1bZ7D3rGXw==",
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@pretendonetwork/eslint-config/-/eslint-config-0.0.6.tgz",
|
||||
"integrity": "sha512-05mveVecjyadnKrY4dBDtdt3UE3j+1HMEHuFbLfwmb/g3749VL4Bnop1HiuNkUY9p1AhYXHmVJQsicFhWzGP1g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
||||
|
|
@ -9613,9 +9613,9 @@
|
|||
"integrity": "sha512-Kfj/WeaKLTQ8TJAGeTnMZVmGq3W6Ypzy383DITsVxVpViJY6e2fdtmXRoPhL5a/7UIR0HUJKGwPALEdLeNicAw=="
|
||||
},
|
||||
"@pretendonetwork/eslint-config": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@pretendonetwork/eslint-config/-/eslint-config-0.0.3.tgz",
|
||||
"integrity": "sha512-aV+TY4Bi4YaOc68x3Eq6y3zeDudQDfyQzLloRby011rMeTtKQWeK1YTVcBU72c6CvnSm5cAIHjFf1bZ7D3rGXw==",
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@pretendonetwork/eslint-config/-/eslint-config-0.0.6.tgz",
|
||||
"integrity": "sha512-05mveVecjyadnKrY4dBDtdt3UE3j+1HMEHuFbLfwmb/g3749VL4Bnop1HiuNkUY9p1AhYXHmVJQsicFhWzGP1g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@
|
|||
"stripe": "^9.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pretendonetwork/eslint-config": "^0.0.3",
|
||||
"@pretendonetwork/eslint-config": "^0.0.6",
|
||||
"eslint": "^9.18.0",
|
||||
"globals": "^15.14.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,9 @@ document.addEventListener('click', (e) => {
|
|||
localeOptionsContainer.classList.remove('active');
|
||||
}
|
||||
|
||||
if (found) return;
|
||||
if (found) {
|
||||
return;
|
||||
}
|
||||
|
||||
// click outside of dropdowns
|
||||
userWidget?.classList.remove('active');
|
||||
|
|
|
|||
|
|
@ -86,8 +86,9 @@ document.querySelector('script#encodedUserMiiData').remove();
|
|||
const validMiiData = initializeMiiData(encodedUserMiiData);
|
||||
if (!validMiiData) {
|
||||
const shouldContinue = window.confirm('Found corrupted mii data, want to continue with a new Mii?');
|
||||
if (!shouldContinue)
|
||||
if (!shouldContinue) {
|
||||
window.location.assign('/account');
|
||||
}
|
||||
initializeMiiData(newMiiData);
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +237,9 @@ function handleCalendar(e) {
|
|||
}
|
||||
|
||||
function preventEmpty(e) {
|
||||
if (e.target.value !== '') return;
|
||||
if (e.target.value !== '') {
|
||||
return;
|
||||
}
|
||||
|
||||
e.target.value = e.target.defaultValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
const config = require('../config');
|
||||
|
||||
function isValidRedirect(redirect) {
|
||||
if (!redirect) return false;
|
||||
if (redirect.startsWith('/')) return true;
|
||||
if (!redirect) {
|
||||
return false;
|
||||
}
|
||||
if (redirect.startsWith('/')) {
|
||||
return true;
|
||||
}
|
||||
if (redirect.startsWith('http://') || redirect.startsWith('https://')) {
|
||||
try {
|
||||
const url = new URL(redirect);
|
||||
|
|
|
|||
|
|
@ -161,8 +161,12 @@ app.engine('handlebars', handlebars({
|
|||
return string.toLowerCase().replaceAll(/ /g, '-');
|
||||
},
|
||||
section(name, options) {
|
||||
if (!this._sections) this._sections = {};
|
||||
if (!this._sections[name]) this._sections[name] = [];
|
||||
if (!this._sections) {
|
||||
this._sections = {};
|
||||
}
|
||||
if (!this._sections[name]) {
|
||||
this._sections[name] = [];
|
||||
}
|
||||
this._sections[name].push(options.fn(this));
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user