mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
add linting to server folder
This commit is contained in:
3
src/server/.gitignore
vendored
Normal file
3
src/server/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# ignore node_modules folder for eslint
|
||||
node_modules
|
||||
webapp
|
||||
@@ -31,7 +31,7 @@ class POSTHandler {
|
||||
db.writeJSONDataSimple( 'seatplan', data.location, dat ).then( resp => {
|
||||
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
||||
let s = dat;
|
||||
s[ 'totalSeats' ] = data.data.seatInfo.count
|
||||
s[ 'totalSeats' ] = data.data.seatInfo.count;
|
||||
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
||||
resolve( resp );
|
||||
} );
|
||||
@@ -44,7 +44,7 @@ class POSTHandler {
|
||||
db.writeJSONDataSimple( 'seatplan', data.location, { 'draft': {}, 'save': data.data } ).then( resp => {
|
||||
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
||||
let s = dat;
|
||||
s[ 'totalSeats' ] = data.data.seatInfo.count
|
||||
s[ 'totalSeats' ] = data.data.seatInfo.count;
|
||||
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
||||
resolve( resp );
|
||||
} );
|
||||
|
||||
@@ -12,7 +12,7 @@ const fs = require( 'fs' );
|
||||
// const ph = require( './paymentHandler.js' );
|
||||
// const paymentHandler = new ph();
|
||||
|
||||
module.exports = ( app, settings ) => {
|
||||
module.exports = ( app ) => {
|
||||
app.get( '/payments/canceled', ( req, res ) => {
|
||||
res.sendFile( path.join( __dirname + '/../../ui/en/payments/canceled.html' ) );
|
||||
} );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-undef */
|
||||
const { createApp } = Vue;
|
||||
|
||||
createApp( {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-undef */
|
||||
const { createApp } = Vue;
|
||||
|
||||
createApp( {
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "test.js"
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var theme = localStorage.getItem( 'theme' ) ?? '';
|
||||
let theme = localStorage.getItem( 'theme' ) ?? '';
|
||||
if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme === '☼' ) {
|
||||
document.documentElement.classList.add( 'dark' );
|
||||
document.getElementById( 'themeSelector' ).innerHTML = '☼';
|
||||
@@ -9,6 +9,7 @@ if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme === '&
|
||||
theme = '☽';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function changeTheme () {
|
||||
if ( theme === '☼' ) {
|
||||
document.documentElement.classList.remove( 'dark' );
|
||||
|
||||
Reference in New Issue
Block a user