⚙️ Add Prettier and ESLint config with pre-commit (#640)
This commit is contained in:
1
new-frontend/.eslintignore
Normal file
1
new-frontend/.eslintignore
Normal file
@@ -0,0 +1 @@
|
||||
new-frontend/src/client/**
|
@@ -1,18 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['react-refresh'],
|
||||
rules: {
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
}
|
13
new-frontend/.eslintrc.json
Normal file
13
new-frontend/.eslintrc.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": ["standard-with-typescript", "plugin:react/recommended"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["react"],
|
||||
"rules": {}
|
||||
}
|
1
new-frontend/.prettierignore
Normal file
1
new-frontend/.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
new-frontend/src/client/**
|
10
new-frontend/.prettierrc
Normal file
10
new-frontend/.prettierrc
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"semi": true,
|
||||
"trailingComma": "all",
|
||||
"singleQuote": true,
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true
|
||||
}
|
3687
new-frontend/package-lock.json
generated
3687
new-frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -32,14 +32,20 @@
|
||||
"@types/node": "20.10.5",
|
||||
"@types/react": "^18.2.37",
|
||||
"@types/react-dom": "^18.2.15",
|
||||
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "^6.10.0",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"eslint": "^8.53.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-standard-with-typescript": "43.0.1",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-n": "16.6.2",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-react": "7.34.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.4",
|
||||
"openapi-typescript-codegen": "0.25.0",
|
||||
"typescript": "^5.2.2",
|
||||
"prettier": "3.2.5",
|
||||
"typescript": "5.4.2",
|
||||
"vite": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user