mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
feat: add Prettier and ESLint configuration files, update scripts, and enhance permissions
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
"Bash(git log:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(xargs git rm:*)",
|
||||
"Bash(bun add:*)"
|
||||
"Bash(bun add:*)",
|
||||
"Bash(bun install:*)",
|
||||
"Bash(test -f:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
8
frontends/nextjs/.prettierignore
Normal file
8
frontends/nextjs/.prettierignore
Normal file
@@ -0,0 +1,8 @@
|
||||
node_modules
|
||||
.next
|
||||
dist
|
||||
build
|
||||
coverage
|
||||
*.min.js
|
||||
*.d.ts
|
||||
**/DbalIntegrationUtils.ts
|
||||
10
frontends/nextjs/.prettierrc.json
Normal file
10
frontends/nextjs/.prettierrc.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 100,
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
15
frontends/nextjs/.vscode/settings.json
vendored
Normal file
15
frontends/nextjs/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"globals": "^16.5.0",
|
||||
"jsdom": "^27.3.0",
|
||||
"prettier": "^3.7.4",
|
||||
"prettier": "^3.4.2",
|
||||
"prisma": "^7.2.0",
|
||||
"sass": "^1.97.1",
|
||||
"typescript": "~5.9.3",
|
||||
|
||||
@@ -2,6 +2,7 @@ import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import atomicDesignRules from './eslint-plugins/atomic-design-rules.js'
|
||||
|
||||
@@ -22,6 +23,7 @@ export default tseslint.config(
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
'atomic-design': atomicDesignRules,
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
@@ -44,6 +46,9 @@ export default tseslint.config(
|
||||
'no-var': 'error',
|
||||
// Atomic design rules
|
||||
'atomic-design/no-upward-imports': 'error',
|
||||
// Import sorting
|
||||
'simple-import-sort/imports': 'warn',
|
||||
'simple-import-sort/exports': 'warn',
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
"start": "next start",
|
||||
"kill": "fuser -k 3000/tcp",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"typecheck:strict": "tsc --noEmit --strict",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
||||
"preview": "next start",
|
||||
"dev:vite": "vite",
|
||||
"build:vite": "tsc -b --noCheck && vite build",
|
||||
@@ -119,8 +122,10 @@
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.26",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"globals": "^16.5.0",
|
||||
"jsdom": "^27.3.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prisma": "^7.2.0",
|
||||
"sass": "^1.97.1",
|
||||
"typescript": "~5.9.3",
|
||||
|
||||
Reference in New Issue
Block a user