Some checks failed
CI Pipeline / Rust Format Check (push) Successful in 5s
CI Pipeline / Clippy Lints (push) Successful in 45s
CI Pipeline / Rust Unit Tests (push) Successful in 1m0s
CI Pipeline / Security Audit (push) Successful in 5s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 8s
CI Pipeline / Build .deb & Release (push) Has been skipped
56 lines
1.6 KiB
JavaScript
56 lines
1.6 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'],
|
|
|
|
// Code quality
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
},
|
|
{
|
|
files: ['**/*.js'],
|
|
rules: {
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
},
|
|
},
|
|
];
|