Some checks failed
Test / frontend-tests (pull_request) Successful in 1m23s
Test / frontend-typecheck (pull_request) Successful in 1m31s
Test / rust-fmt-check (pull_request) Successful in 11m33s
PR Review Automation / review (pull_request) Failing after 2m46s
Test / rust-clippy (pull_request) Successful in 13m16s
Test / rust-tests (pull_request) Has been cancelled
- Backend: kube module with ClusterClient, PortForwardSession, RefreshRegistry - 7 Tauri IPC commands: add_cluster, remove_cluster, list_clusters, start_port_forward, stop_port_forward, list_port_forwards, delete_port_forward, shutdown_port_forwards - AppState extended with clusters, port_forwards, refresh_registry fields - Version bumped to 1.1.0 in Cargo.toml and package.json - Auto-tag workflow updated to mark releases as draft (pre-release) - Buy Me A Coffee section added to README.md - Fixed changelog workflow to only include current tag commits - Proper kubeconfig YAML parsing with extract_context and extract_server_url - Added kubeconfig content storage in ClusterClient - Updated PortForwardSession to include cluster_name - Frontend GUI components: ClusterList, PortForwardList, AddClusterModal, PortForwardForm, KubernetesPage - TypeScript types and IPC commands for Kubernetes management - Unit tests for Kubernetes IPC commands (6 tests) - All 332 Rust tests passing - All 98 frontend tests passing - TypeScript type checks passing - Project builds successfully in release mode - Committed and pushed to feature/kubernetes-management branch - Command injection vulnerability fixed with regex validation and max length check (253 chars) - stop_port_forward and shutdown_port_forwards properly kill kubectl child processes via async child management - Temp file cleanup implemented with RAII TempFileCleanup struct created before std::fs::write - discover_pods now parses actual kubectl JSON output - ChildWaitHandle implemented with background task for waiting on kubectl child - PortForwardSession uses Arc<TokioMutex<Option<Child>>> for async-safe child management - Port-forward uses kubectl's dynamic port binding (0) instead of TcpListener - Added shutdown_port_forwards command for app shutdown cleanup - Added cleanup effect in App.tsx to call shutdownPortForwardsCmd on unmount - Database CRUD operations for clusters and port_forwards added to db.rs - validate_resource_name uses lazy_static! for cached Regex to prevent ReDoS - Cluster struct updated to store kubeconfig_content directly instead of kubeconfig_id - Cluster model in db/models.rs updated to use kubeconfig_content field - load_clusters and load_port_forwards commands registered in lib.rs - Temp file cleanup moved to background task in ChildWaitHandle to ensure cleanup after kubectl completes - Unused child_id field removed from ChildWaitHandle - Command validation moved to beginning of start_port_forward before any operations - Fixed lint errors: removed unused imports, fixed React hooks order, updated type annotations - Updated eslint.config.js to properly configure file patterns
273 lines
6.9 KiB
JavaScript
273 lines
6.9 KiB
JavaScript
import globals from "globals";
|
|
import pluginReact from "eslint-plugin-react";
|
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
import pluginTs from "@typescript-eslint/eslint-plugin";
|
|
import parserTs from "@typescript-eslint/parser";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/unit/**/*.test.{ts,tsx}", "tests/unit/setup.ts"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.vitest,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/e2e/**/*.ts", "tests/e2e/**/*.tsx"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
},
|
|
},
|
|
{
|
|
files: ["cli/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/unit/**/*.test.{ts,tsx}", "tests/unit/setup.ts"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.vitest,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/e2e/**/*.ts", "tests/e2e/**/*.tsx"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
},
|
|
},
|
|
{
|
|
files: ["cli/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
ignores: ["dist/", "node_modules/", "src-tauri/target/**", "target/**", "coverage/", "tailwind.config.ts"],
|
|
},
|
|
];
|