- Deleted eslint.config.js file to streamline project setup. - Removed ESLint and related packages from package.json to simplify development environment.
43 lines
1.1 KiB
JavaScript
43 lines
1.1 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'}]
|
|
};
|
|
|
|
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
|
|
}
|
|
]);
|