Skip to content

Commit ebfcfd3

Browse files
Merge pull request #6 from Amir-Zouerami/refactor-phase-1
Refactor for V2.0
2 parents bc78168 + 0ff2c23 commit ebfcfd3

File tree

234 files changed

+23979
-9117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+23979
-9117
lines changed

.env

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
VITE_TOAST_LIMIT=2
44
VITE_TOAST_REMOVE_DELAY=5000
55

6+
7+
68
# ------------ OPEN API CONFIGURATION ------------
79

810
VITE_SCHEMA_MAX_RECURSION_DEPTH=7
911

12+
13+
1014
# ------------ BRANDING ------------
1115

12-
VITE_BRAND_NAME=Schematica
16+
VITE_BRAND_NAME=Schematica
17+
18+
19+
20+
# ------------ WEB SOCKETS ------------
21+
22+
VITE_WEBSOCKET_URL=http://localhost:3000

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"tabWidth": 4,
5+
"useTabs": true,
6+
"printWidth": 100
7+
}

biome.jsonc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3+
4+
"linter": {
5+
"rules": {
6+
"a11y": "on",
7+
"complexity": {
8+
"noExcessiveLinesPerFunction": {
9+
"options": { "skipBlankLines": true, "maxLines": 80 },
10+
},
11+
},
12+
"correctness": {
13+
"useImportExtensions": "off",
14+
"noUnusedFunctionParameters": {
15+
"options": {
16+
"ignoreRestSiblings": true,
17+
},
18+
},
19+
},
20+
"nursery": {
21+
"recommended": true,
22+
},
23+
"performance": {
24+
"useSolidForComponent": "off",
25+
},
26+
"security": "on",
27+
"style": {
28+
"noParameterProperties": "off",
29+
"useImportType": "off",
30+
},
31+
"suspicious": {
32+
"noReactSpecificProps": "off",
33+
},
34+
},
35+
},
36+
37+
"javascript": {
38+
"parser": {
39+
"unsafeParameterDecoratorsEnabled": true,
40+
},
41+
},
42+
43+
"css": {
44+
"parser": {
45+
"tailwindDirectives": true,
46+
},
47+
},
48+
49+
"assist": {
50+
"actions": {
51+
"source": {
52+
"recommended": true,
53+
"organizeImports": "off",
54+
},
55+
},
56+
},
57+
}

components.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "tailwind.config.ts",
8-
"css": "src/index.css",
9-
"baseColor": "slate",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
19-
}
20-
}
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "src/app/styles/index.css",
9+
"baseColor": "slate",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/shared",
15+
"utils": "@/shared/lib/utils",
16+
"ui": "@/shared/ui",
17+
"lib": "@/shared/lib",
18+
"hooks": "@/shared/hooks"
19+
}
20+
}

eslint.config.js

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,53 @@
1+
// @ts-check
2+
13
import js from '@eslint/js';
2-
import globals from 'globals';
3-
import tseslint from 'typescript-eslint';
44
import stylistic from '@stylistic/eslint-plugin';
5+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
56
import reactHooks from 'eslint-plugin-react-hooks';
67
import reactRefresh from 'eslint-plugin-react-refresh';
8+
import { defineConfig } from 'eslint/config';
9+
import globals from 'globals';
10+
import tseslint from 'typescript-eslint';
711

8-
export default tseslint.config(
9-
{ ignores: ['dist', 'src/components/ui/**'] },
12+
export default defineConfig([
13+
{
14+
ignores: ['dist', 'src/shared/ui/**'],
15+
},
1016
{
11-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
1217
files: ['**/*.{ts,tsx}'],
1318
languageOptions: {
14-
ecmaVersion: 2020,
19+
parser: tseslint.parser,
20+
parserOptions: {
21+
ecmaVersion: 2020,
22+
sourceType: 'module',
23+
ecmaFeatures: { jsx: true },
24+
},
1525
globals: globals.browser,
1626
},
27+
extends: [
28+
js.configs.recommended,
29+
...tseslint.configs.recommended,
30+
reactHooks.configs.recommended,
31+
eslintPluginPrettierRecommended,
32+
],
1733
plugins: {
1834
'@stylistic': stylistic,
19-
'react-hooks': reactHooks,
2035
'react-refresh': reactRefresh,
2136
},
2237
rules: {
23-
...reactHooks.configs.recommended.rules,
2438
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
25-
'@typescript-eslint/no-unused-vars': 'off',
2639
'@typescript-eslint/no-explicit-any': 'off',
2740
'@stylistic/brace-style': ['error', 'stroustrup', { allowSingleLine: false }],
28-
'@stylistic/indent': ['error', 'tab', { SwitchCase: 1, MemberExpression: 0 }],
41+
'@stylistic/indent': 'off',
42+
'prettier/prettier': ['error', { endOfLine: 'auto' }],
43+
'@typescript-eslint/no-unused-vars': [
44+
'error',
45+
{
46+
argsIgnorePattern: '^_',
47+
varsIgnorePattern: '^_',
48+
caughtErrorsIgnorePattern: '^_',
49+
},
50+
],
2951
},
3052
},
31-
);
53+
]);

0 commit comments

Comments
 (0)