Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint and test backend

on:
push:
branches: [main, pre-chroma]
pull_request:

jobs:
backend:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Lint and format frontend code

on:
pull_request:
push:
branches: [main, pre-chroma]

jobs:
frontend:
Expand All @@ -19,7 +19,7 @@ jobs:
node-version: '18'

- name: Install frontend deps
run: npm install --force
run: npm ci

- name: Run ESLint
run: npm run lint
Expand Down
14 changes: 5 additions & 9 deletions frontend-37/.dependency-cruiser.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ module.exports = {
},
],
options: {
tsConfig: {
fileName: "tsconfig.json",
},

/* Which modules not to follow further when encountered */
doNotFollow: {
/* path: an array of regular expressions in strings to match against */
Expand All @@ -193,7 +189,7 @@ module.exports = {
/* Which modules to exclude */
exclude: {
/* path: an array of regular expressions in strings to match against */
path: "vite-env.d.ts",
path: "src/vite-env.d.ts",
},

/* Which modules to exclusively include (array of regular expressions in strings)
Expand Down Expand Up @@ -259,9 +255,9 @@ module.exports = {
dependency-cruiser's current working directory). When not provided
defaults to './tsconfig.json'.
*/
// tsConfig: {
// fileName: 'tsconfig.json'
// },
tsConfig: {
fileName: "tsconfig.json",
},

/* Webpack configuration to use to get resolve options from.

Expand Down Expand Up @@ -379,4 +375,4 @@ module.exports = {
},
},
};
// generated: dependency-cruiser@16.10.4 on 2025-07-06T18:02:14.069Z
// generated: dependency-cruiser@16.10.4 on 2025-07-10T13:54:08.073Z
15 changes: 14 additions & 1 deletion frontend-37/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
"trailingComma": "es5",
"useTabs": false,
"importOrder": [
"<THIRD_PARTY_MODULES>",
"^@assets/(.*)$",
"^(.*).css$",
"^@config/(.*)$",
"^@lib/(.*)$",
"^@types/(.*)$",
"^@shared/store/(.*)$",
"^@features/(.*)$",
"^[./]"
],
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
54 changes: 17 additions & 37 deletions frontend-37/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
import globals from "globals";
import js from "@eslint/js";
import reactPlugin from "eslint-plugin-react";

export default [
// Базовые правила ESLint
js.configs.recommended,
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";

// Настройки для React
export default defineConfig([
{
files: ["**/*.{js,jsx}"],
plugins: {
react: reactPlugin, // Правильный формат плагинов в Flat Config
},
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
plugins: { js, react },
extends: ["js/recommended"],
languageOptions: {
globals: {
...globals.browser,
React: "readonly", // Глобальный React не требуется импортировать
},
globals: globals.browser,
parserOptions: {
ecmaFeatures: {
jsx: true, // Включаем поддержку JSX
jsx: true,
},
},
},
rules: {
"no-unused-vars": "off",
// React-специфичные правила
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "error",
"react/prop-types": "off", // Отключаем проверку prop-types

// Дополнительные правила по желанию
"react/jsx-key": "error", // Проверка key в массивах
},
settings: {
react: {
version: "detect", // Автоматически определяет версию React
},
},
},

// Игнорируемые файлы (замена .eslintignore)
{
ignores: ["**/node_modules/**", "**/dist/**", "**/*.config.js"],
},
];
tseslint.configs.recommended,
reactHooks.configs["recommended-latest"],
reactRefresh.configs.vite,
globalIgnores([".dependency-cruiser.cjs"]),
]);
Loading