Add ESLint config and update code style
Introduced a new eslint.config.js using neostandard and added related devDependencies. Updated codebase for consistent formatting, spacing, and function declarations. Minor refactoring and cleanup across multiple files to improve readability and maintain code style compliance.
This commit is contained in:
1 parent
1990761ad6
commit
fa80441e36
42 files changed
+628
-580
No files matched your search
@@ -1,2 +0,0 @@
|
||||
import eslintConfig from '../eslint.config.mjs';
|
||||
export default eslintConfig;
|
||||
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
@@ -23,6 +23,6 @@ declare module 'react-color' {
|
||||
export const CirclePicker: any;
|
||||
|
||||
export default {
|
||||
SketchPicker: SketchPicker,
|
||||
SketchPicker,
|
||||
} as any;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { heroui } from '@heroui/theme'
|
||||
import { heroui } from '@heroui/theme';
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
@@ -7,16 +7,16 @@ export default {
|
||||
'./src/layouts/**/*.{js,ts,jsx,tsx,mdx}',
|
||||
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
|
||||
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
|
||||
'./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'
|
||||
'./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}',
|
||||
],
|
||||
safelist: [
|
||||
{
|
||||
pattern:
|
||||
/bg-(primary|secondary|success|danger|warning|default)-(50|100|200|300|400|500|600|700|800|900)/
|
||||
}
|
||||
/bg-(primary|secondary|success|danger|warning|default)-(50|100|200|300|400|500|600|700|800|900)/,
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
extend: {}
|
||||
extend: {},
|
||||
},
|
||||
darkMode: 'class',
|
||||
plugins: [
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
600: '#c20e4d',
|
||||
700: '#920b3a',
|
||||
800: '#610726',
|
||||
900: '#310413'
|
||||
900: '#310413',
|
||||
},
|
||||
danger: {
|
||||
DEFAULT: '#DB3694',
|
||||
@@ -50,9 +50,9 @@ export default {
|
||||
600: '#BC278B',
|
||||
700: '#9D1B7F',
|
||||
800: '#7F1170',
|
||||
900: '#690A66'
|
||||
}
|
||||
}
|
||||
900: '#690A66',
|
||||
},
|
||||
},
|
||||
},
|
||||
dark: {
|
||||
colors: {
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
600: '#f871a0',
|
||||
700: '#faa0bf',
|
||||
800: '#fdd0df',
|
||||
900: '#fee7ef'
|
||||
900: '#fee7ef',
|
||||
},
|
||||
danger: {
|
||||
DEFAULT: '#DB3694',
|
||||
@@ -82,11 +82,11 @@ export default {
|
||||
600: '#F485AE',
|
||||
700: '#FBAFC4',
|
||||
800: '#FDD7DD',
|
||||
900: '#FEEAF6'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
900: '#FEEAF6',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
@@ -1,18 +1,18 @@
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'node:path'
|
||||
import { defineConfig, loadEnv, normalizePath } from 'vite'
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
||||
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'node:path';
|
||||
import { defineConfig, loadEnv, normalizePath } from 'vite';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
const monacoEditorPath = normalizePath(
|
||||
path.resolve(__dirname, 'node_modules/monaco-editor/min/vs')
|
||||
)
|
||||
);
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
const backendDebugUrl = env.VITE_DEBUG_BACKEND_URL
|
||||
console.log('backendDebugUrl', backendDebugUrl)
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const backendDebugUrl = env.VITE_DEBUG_BACKEND_URL;
|
||||
console.log('backendDebugUrl', backendDebugUrl);
|
||||
return {
|
||||
plugins: [
|
||||
react(),
|
||||
@@ -21,10 +21,10 @@ export default defineConfig(({ mode }) => {
|
||||
targets: [
|
||||
{
|
||||
src: monacoEditorPath,
|
||||
dest: 'monaco-editor/min'
|
||||
}
|
||||
]
|
||||
})
|
||||
dest: 'monaco-editor/min',
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
base: '/webui/',
|
||||
server: {
|
||||
@@ -32,11 +32,11 @@ export default defineConfig(({ mode }) => {
|
||||
'/api/ws/terminal': {
|
||||
target: backendDebugUrl,
|
||||
ws: true,
|
||||
changeOrigin: true
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': backendDebugUrl,
|
||||
'/files': backendDebugUrl
|
||||
}
|
||||
'/files': backendDebugUrl,
|
||||
},
|
||||
},
|
||||
build: {
|
||||
assetsInlineLimit: 0,
|
||||
@@ -49,10 +49,10 @@ export default defineConfig(({ mode }) => {
|
||||
'react-hook-form': ['react-hook-form'],
|
||||
'react-icons': ['react-icons'],
|
||||
'react-hot-toast': ['react-hot-toast'],
|
||||
qface: ['qface']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
qface: ['qface'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user