chore(backend): add ESLint and Prettier configuration

This commit is contained in:
SaidSoighiri94
2026-06-16 10:01:19 +02:00
parent 2ac1a3281b
commit d67cf8d65e
6 changed files with 1132 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
dist
node_modules
prisma/migrations
+7
View File
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "all"
}
+26
View File
@@ -0,0 +1,26 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
export default tseslint.config(
{
ignores: ['dist/**', 'node_modules/**', 'prisma/migrations/**'],
},
js.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
languageOptions: {
globals: { ...globals.node },
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'prefer-const': 'error',
'no-console': 'off',
},
},
);
+1076 -1
View File
File diff suppressed because it is too large Load Diff
+12 -2
View File
@@ -11,21 +11,31 @@
"prisma:migrate": "prisma migrate dev",
"prisma:studio": "prisma studio",
"seed": "ts-node prisma/seed.ts",
"fixtures": "ts-node prisma/fixtures.ts"
"fixtures": "ts-node prisma/fixtures.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write \"src/**/*.ts\" \"prisma/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\" \"prisma/**/*.ts\""
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^25.9.1",
"eslint": "^10.5.0",
"eslint-config-prettier": "^10.1.8",
"globals": "^17.6.0",
"nodemon": "^3.1.14",
"prettier": "^3.8.4",
"prisma": "^7.8.0",
"ts-node": "^10.9.2",
"typescript": "^6.0.3"
"typescript": "^6.0.3",
"typescript-eslint": "^8.61.1"
},
"dependencies": {
"@prisma/adapter-mssql": "^7.8.0",