add new features and format

This commit is contained in:
Mustafa Soylu
2025-06-11 10:41:32 +02:00
parent c6023a9c2e
commit bb9187e9a0
34 changed files with 3405 additions and 2544 deletions

View File

@@ -1,28 +1,33 @@
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 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 prettier from "eslint-plugin-prettier";
import { readFileSync } from "node:fs";
export default tseslint.config(
{ ignores: ['dist'] },
// Read Prettier configuration from .prettierrc.json
const prettierOptions = JSON.parse(readFileSync("./.prettierrc.json", "utf8"));
export default [
{ ignores: ["dist"] },
js.configs.recommended,
...tseslint.configs.recommended,
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
prettier: prettier,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"prettier/prettier": ["error", prettierOptions],
},
},
)
];