- Adjusted formatting in .prettierrc for consistent newline handling. - Enhanced API documentation in BACKEND_PROMPT.md for better readability and structure. - Updated docker-compose.yml to standardize quotes and improve health check commands. - Refactored ESLint configuration for better readability and consistency. - Made minor formatting adjustments in various frontend components for improved user experience and code clarity.
39 lines
1.2 KiB
JavaScript
39 lines
1.2 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';
|
|
import {defineConfig, globalIgnores} from 'eslint/config';
|
|
|
|
// Shared rules for all TypeScript files
|
|
const sharedRules = {
|
|
'padding-line-between-statements': ['error', {blankLine: 'always', prev: '*', next: 'return'}],
|
|
'@typescript-eslint/no-unused-vars': ['error', {argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_'}]
|
|
};
|
|
|
|
export default defineConfig([
|
|
globalIgnores(['**/dist', '**/node_modules']),
|
|
|
|
// Backend API - TypeScript files
|
|
{
|
|
files: ['backend-api/**/*.ts'],
|
|
extends: [js.configs.recommended, tseslint.configs.recommended],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.node
|
|
},
|
|
rules: sharedRules
|
|
},
|
|
|
|
// Frontend Web - TypeScript/React files
|
|
{
|
|
files: ['frontend-web/**/*.{ts,tsx}'],
|
|
extends: [js.configs.recommended, tseslint.configs.recommended, reactHooks.configs.flat.recommended, reactRefresh.configs.vite],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser
|
|
},
|
|
rules: sharedRules
|
|
}
|
|
]);
|