Private
Public Access
1
0

ci: Add comprehensive CI quality gates
Some checks failed
CI Quality Gates / Rust Format Check (push) Failing after 0s
CI Quality Gates / Rust Unit Tests (push) Failing after 0s
CI Quality Gates / Security Audit (push) Failing after 0s
CI Quality Gates / Frontend Lint & Type Check (push) Failing after 0s
CI Quality Gates / Clippy Lints (push) Failing after 43s

- New ci.yml workflow: rust-format, clippy, rust-test, security-audit, frontend-lint
- rustfmt.toml: strict formatting rules (edition 2021, max_width 100, grouped imports)
- clippy.toml: lint configuration with complexity thresholds
- eslint.config.js: ESLint 9 flat config for TypeScript/React
- build.yml: now only triggers on v* tags (ci.yml handles master/PR)
- package.json: updated lint script for ESLint 9 flat config

Quality gates run on every push to master and every PR:
1. Rust Format Check (cargo fmt --check --all)
2. Clippy Lints (pedantic + deny warnings)
3. Rust Unit Tests (cargo test --workspace --all-features)
4. Security Audit (cargo audit)
5. Frontend Lint (ESLint + TypeScript type check)
This commit is contained in:
2026-04-24 14:55:01 +00:00
parent 475bcde7ed
commit f49ec1ac51
6 changed files with 275 additions and 4 deletions

59
frontend/eslint.config.js Normal file
View File

@ -0,0 +1,59 @@
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
export default [
{
files: ['src/**/*.{ts,tsx}'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: { jsx: true },
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// Error rules
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
// Security rules
'no-eval': 'error',
'no-implied-eval': 'error',
'no-new-func': 'error',
'no-unsafe-optional-chaining': 'error',
// Code quality
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-debugger': 'error',
'no-duplicate-imports': 'error',
'no-unreachable': 'error',
'no-constant-condition': 'warn',
'prefer-const': 'error',
'no-var': 'error',
'eqeqeq': ['error', 'always'],
'curly': ['error', 'multi-line'],
// React-specific
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-undef': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-unused-state': 'warn',
},
},
{
files: ['**/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
];

View File

@ -7,7 +7,7 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx --max-warnings 0",
"type-check": "tsc --noEmit"
},
"dependencies": {