chore(backend): add ESLint and Prettier configuration
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
dist
|
||||
node_modules
|
||||
prisma/migrations
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"semi": true,
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
);
|
||||
Generated
+1076
-1
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user