refactor(frontend): lint, one session guard, one request helper, one user context

This commit is contained in:
lobo committed 2026-09-29 15:40:55 +02:00
1 parent 111ab1e200
commit d0ea9e900d
78 files changed
+2138 -624

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
export default [
{ignores: ['dist']},
js.configs.recommended,
{
files: ['**/*.{js,jsx}'],
languageOptions: {
parserOptions: {ecmaFeatures: {jsx: true}},
globals: {
...globals.browser,
// set by `define` in vite.config.js
__TRANSLATIONS_VERSION__: 'readonly',
__BUILD_COMMIT__: 'readonly',
__BUILD_TIME__: 'readonly',
},
},
plugins: {'react-hooks': reactHooks},
// Only the two classic rules: the React Compiler rules of the plugin's recommended set are a later step.
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
},
},
{files: ['*.config.js'], languageOptions: {globals: globals.node}},
];