forked from Github/frigate
Fix linter and fix lint issues (#10141)
This commit is contained in:
@@ -1,45 +1,45 @@
|
||||
/// <reference types="vitest" />
|
||||
import path from "path"
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react-swc'
|
||||
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import monacoEditorPlugin from "vite-plugin-monaco-editor";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
define: {
|
||||
'import.meta.vitest': 'undefined',
|
||||
"import.meta.vitest": "undefined",
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:5000',
|
||||
"/api": {
|
||||
target: "http://localhost:5000",
|
||||
ws: true,
|
||||
},
|
||||
'/vod': {
|
||||
target: 'http://localhost:5000'
|
||||
"/vod": {
|
||||
target: "http://localhost:5000",
|
||||
},
|
||||
'/clips': {
|
||||
target: 'http://localhost:5000'
|
||||
"/clips": {
|
||||
target: "http://localhost:5000",
|
||||
},
|
||||
'/exports': {
|
||||
target: 'http://localhost:5000'
|
||||
"/exports": {
|
||||
target: "http://localhost:5000",
|
||||
},
|
||||
'/ws': {
|
||||
target: 'ws://localhost:5000',
|
||||
"/ws": {
|
||||
target: "ws://localhost:5000",
|
||||
ws: true,
|
||||
},
|
||||
'/live': {
|
||||
target: 'ws://localhost:5000',
|
||||
"/live": {
|
||||
target: "ws://localhost:5000",
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
monacoEditorPlugin.default({
|
||||
customWorkers: [{ label: 'yaml', entry: 'monaco-yaml/yaml.worker' }],
|
||||
languageWorkers: ['editorWorkerService'], // we don't use any of the default languages
|
||||
customWorkers: [{ label: "yaml", entry: "monaco-yaml/yaml.worker" }],
|
||||
languageWorkers: ["editorWorkerService"], // we don't use any of the default languages
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
@@ -48,17 +48,20 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
environment: "jsdom",
|
||||
alias: {
|
||||
'testing-library': path.resolve(__dirname, './__test__/testing-library.js'),
|
||||
"testing-library": path.resolve(
|
||||
__dirname,
|
||||
"./__test__/testing-library.js",
|
||||
),
|
||||
},
|
||||
setupFiles: ['./__test__/test-setup.ts'],
|
||||
includeSource: ['src/**/*.{js,jsx,ts,tsx}'],
|
||||
setupFiles: ["./__test__/test-setup.ts"],
|
||||
includeSource: ["src/**/*.{js,jsx,ts,tsx}"],
|
||||
coverage: {
|
||||
reporter: ['text-summary', 'text'],
|
||||
reporter: ["text-summary", "text"],
|
||||
},
|
||||
mockReset: true,
|
||||
restoreMocks: true,
|
||||
globals: true,
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user