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)
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
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',
|
|
},
|
|
},
|
|
];
|