642d0f720e
- стек по §5.2: React 19, React Router, TanStack Query, Zustand, Tailwind CSS 4, i18next (ru/en), Vitest + Testing Library - дизайн-токены §3 docs/client-web.md (тёмная тема по умолчанию, светлая, accent) - типизированный API-клиент §8.1: единый формат ошибок, ApiError с кодом - App: экран состояния фундамента с readz/meta, локализация ошибок по code - тесты: клиент API, форматирование, рендер App (успех/ошибка кода/сеть) - eslint + prettier + tsc strict; initial JS 97.6 KB gzip
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['dist', 'coverage', 'node_modules'] },
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommendedTypeChecked],
|
|
languageOptions: {
|
|
ecmaVersion: 2023,
|
|
globals: { ...globals.browser, ...globals.es2023 },
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
'react-refresh': reactRefresh,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
},
|
|
},
|
|
{
|
|
files: ['tests/**/*.{ts,tsx}'],
|
|
languageOptions: { globals: { ...globals.node } },
|
|
},
|
|
{
|
|
files: ['eslint.config.js'],
|
|
extends: [tseslint.configs.disableTypeChecked],
|
|
},
|
|
);
|