huge refactor on web-api and web-app

This commit is contained in:
Boki 2025-06-18 10:20:05 -04:00
parent 1d299e52d4
commit 265e10a658
23 changed files with 1545 additions and 1233 deletions

View file

@ -1,6 +1,7 @@
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
@ -13,11 +14,20 @@ export default [
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
globals: {
...globals.browser,
React: 'readonly',
},
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'@typescript-eslint': tseslint,
'react': react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
@ -26,6 +36,23 @@ export default [
...tseslint.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
// React configuration
'react/react-in-jsx-scope': 'off', // Not needed with React 17+
'react/jsx-uses-react': 'off', // Not needed with React 17+
// TypeScript specific
'@typescript-eslint/no-explicit-any': 'warn', // Allow any but warn
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
// General ESLint rules
'no-undef': 'off', // TypeScript handles this
'no-console': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
},
];