mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:11 -04:00
npm-dep: upgrade eslint > 9
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
/build
|
|
||||||
/.svelte-kit
|
|
||||||
/package
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
|
|
||||||
# Ignore files for PNPM, NPM and YARN
|
|
||||||
pnpm-lock.yaml
|
|
||||||
package-lock.json
|
|
||||||
yarn.lock
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:svelte/recommended',
|
|
||||||
'prettier'
|
|
||||||
],
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: ['@typescript-eslint'],
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: 'module',
|
|
||||||
ecmaVersion: 2020,
|
|
||||||
extraFileExtensions: ['.svelte']
|
|
||||||
},
|
|
||||||
env: {
|
|
||||||
browser: true,
|
|
||||||
es2017: true,
|
|
||||||
node: true
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ['*.svelte'],
|
|
||||||
parser: 'svelte-eslint-parser',
|
|
||||||
parserOptions: {
|
|
||||||
parser: '@typescript-eslint/parser'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
41
frontend/eslint.config.js
Normal file
41
frontend/eslint.config.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import js from '@eslint/js';
|
||||||
|
import ts from 'typescript-eslint';
|
||||||
|
import svelte from 'eslint-plugin-svelte';
|
||||||
|
import prettier from 'eslint-config-prettier';
|
||||||
|
import globals from 'globals';
|
||||||
|
import { includeIgnoreFile } from '@eslint/compat';
|
||||||
|
import path from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
const gitignorePath = path.resolve(__dirname, '.gitignore');
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config[]} */
|
||||||
|
export default [
|
||||||
|
includeIgnoreFile(gitignorePath),
|
||||||
|
js.configs.recommended,
|
||||||
|
...ts.configs.recommended,
|
||||||
|
...svelte.configs['flat/recommended'],
|
||||||
|
prettier,
|
||||||
|
...svelte.configs['flat/prettier'],
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.svelte'],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
parser: ts.parser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ignores: ['build/', '.svelte-kit/', 'dist/']
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -9,23 +9,23 @@
|
|||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"lint": "eslint --fix --cache --ignore-path ../.gitignore .",
|
"lint": "eslint --fix --cache .",
|
||||||
"format": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore .",
|
"format": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore .",
|
||||||
"prepare": "cd .. && husky frontend/.husky",
|
"prepare": "cd .. && husky frontend/.husky",
|
||||||
"typesafe-i18n": "typesafe-i18n"
|
"typesafe-i18n": "typesafe-i18n"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/compat": "^1.2.0",
|
||||||
"@eslint/js": "^9.12.0",
|
"@eslint/js": "^9.12.0",
|
||||||
"@sveltejs/adapter-static": "^3.0.5",
|
"@sveltejs/adapter-static": "^3.0.5",
|
||||||
"@sveltejs/kit": "^2.6.4",
|
"@sveltejs/kit": "^2.6.4",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
||||||
"@typescript-eslint/parser": "^7.18.0",
|
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"daisyui": "^4.12.13",
|
"daisyui": "^4.12.13",
|
||||||
"eslint": "^8.57.1",
|
"eslint": "^9.12.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-svelte": "^2.44.1",
|
"eslint-plugin-svelte": "^2.44.1",
|
||||||
|
"globals": "^15.11.0",
|
||||||
"husky": "^9.1.6",
|
"husky": "^9.1.6",
|
||||||
"postcss": "^8.4.47",
|
"postcss": "^8.4.47",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,svelte}": "eslint --fix --cache --ignore-path ../.gitignore .",
|
"*.{js,svelte}": "eslint --fix --cache .",
|
||||||
"*.{js,css,md,svelte,scss}": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore ."
|
"*.{js,css,md,svelte,scss}": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
3112
frontend/pnpm-lock.yaml
generated
3112
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -91,9 +91,17 @@
|
|||||||
|
|
||||||
function handleClick() {
|
function handleClick() {
|
||||||
if (device.status === 'offline') {
|
if (device.status === 'offline') {
|
||||||
device.wake_confirm ? askConfirmation('wake') : wake();
|
if (device.wake_confirm) {
|
||||||
|
askConfirmation('wake');
|
||||||
|
} else {
|
||||||
|
wake();
|
||||||
|
}
|
||||||
} else if (device.status === 'online') {
|
} else if (device.status === 'online') {
|
||||||
device.shutdown_confirm ? askConfirmation('shutdown') : shutdown();
|
if (device.shutdown_confirm) {
|
||||||
|
askConfirmation('shutdown');
|
||||||
|
} else {
|
||||||
|
shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,11 @@
|
|||||||
device.mac = device.mac.replaceAll(' ', '');
|
device.mac = device.mac.replaceAll(' ', '');
|
||||||
device.netmask = device.netmask.replaceAll(' ', '');
|
device.netmask = device.netmask.replaceAll(' ', '');
|
||||||
device.ports = portIds;
|
device.ports = portIds;
|
||||||
device.id ? updateDevice(device) : createDevice(device);
|
if (device.id) {
|
||||||
|
updateDevice(device);
|
||||||
|
} else {
|
||||||
|
createDevice(device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateDevice(device: Device) {
|
async function updateDevice(device: Device) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { initI18nSvelte } from 'typesafe-i18n/svelte';
|
import { initI18nSvelte } from 'typesafe-i18n/svelte';
|
||||||
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types';
|
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { initFormatters } from './formatters';
|
import { initFormatters } from './formatters';
|
||||||
import type { Locales, Translations } from './i18n-types';
|
import type { Locales, Translations } from './i18n-types';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import { initFormatters } from './formatters';
|
import { initFormatters } from './formatters';
|
||||||
import type { Locales, Translations } from './i18n-types';
|
import type { Locales, Translations } from './i18n-types';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
i18n as initI18n,
|
i18n as initI18n,
|
||||||
@@ -25,6 +24,8 @@ export const locales: Locales[] = [
|
|||||||
'fr-FR',
|
'fr-FR',
|
||||||
'it',
|
'it',
|
||||||
'it-IT',
|
'it-IT',
|
||||||
|
'nl',
|
||||||
|
'nl-NL',
|
||||||
'pt',
|
'pt',
|
||||||
'pt-PT',
|
'pt-PT',
|
||||||
'zh',
|
'zh',
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import themes from 'daisyui/src/theming/themes';
|
import themes from 'daisyui/src/theming/themes';
|
||||||
|
import daisyui from 'daisyui';
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/daisyui/**/*.{js,jsx,ts,tsx}'],
|
content: ['./src/**/*.{html,js,svelte,ts}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {}
|
extend: {}
|
||||||
},
|
},
|
||||||
plugins: [require('daisyui')],
|
plugins: [daisyui],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user