Phase 0: добавить ESLint конфигурации (server + client) и плагины

This commit is contained in:
Suslov-MD
2026-08-15 15:14:00 +00:00
parent ce37b1415c
commit fde5dfc78d
6 changed files with 2199 additions and 33 deletions
+34
View File
@@ -0,0 +1,34 @@
// ESLint конфигурация для frontend (React, ES Modules, JSX)
import js from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
export default [
js.configs.recommended,
{
files: ['src/**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2024,
sourceType: 'module',
parserOptions: {
ecmaFeatures: { jsx: true },
},
globals: {
...globals.browser,
},
},
plugins: {
react: { ...react, configs: { recommended: { rules: react.configs.recommended.rules } } },
'react-hooks': reactHooks,
},
rules: {
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
settings: {
react: { version: '18.3' },
},
},
];
+2092 -23
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -12,15 +12,19 @@
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.2.0",
"react-markdown": "^9.0.3",
"remark-gfm": "^4.0.0",
"react-router-dom": "^7.2.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.0",
"socket.io-client": "^4.8.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.17.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^17.11.0",
"sass": "^1.83.4",
"vite": "^6.3.5"
}