Skip to content

Commit

Permalink
refactor(projects): 精简版+动态路由权限初步
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jan 3, 2022
1 parent 7a0648d commit de2057f
Show file tree
Hide file tree
Showing 354 changed files with 2,037 additions and 22,101 deletions.
6 changes: 2 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# 变量需要以VITE开头

VITE_BASE_URL=/
BASE_URL=/

VITE_APP_NAME=SoybeanAdmin

VITE_APP_TITLE=SoybeanAdmin
VITE_APP_TITLE=Soybean管理系统

VITE_APP_DESC=中后台管理系统模版
21 changes: 21 additions & 0 deletions .env-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/** 请求环境配置 */
type ServiceEnv = {
[key in Service.HttpEnv]: {
/** 请求环境 */
env: Service.HttpEnv;
/** 请求地址 */
url: string;
};
};

/** 请求的环境 */
export const serviceEnv: ServiceEnv = {
test: {
env: 'test',
url: 'http://120.76.42.91:18888'
},
prod: {
env: 'prod',
url: 'http://120.76.42.91:18888'
}
};
5 changes: 0 additions & 5 deletions .env.development

This file was deleted.

5 changes: 0 additions & 5 deletions .env.production

This file was deleted.

4 changes: 0 additions & 4 deletions .env.staging

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ lib
.vscode
.local
index.html
!.env-config.ts
123 changes: 114 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,130 @@ module.exports = {
plugins: ['vue', '@typescript-eslint'],
extends: ['plugin:vue/vue3-recommended', 'airbnb-base', '@vue/typescript/recommended', 'plugin:prettier/recommended'],
rules: {
'no-unused-vars': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 0,
'no-shadow': 0,
'import/order': [
'error',
{
'newlines-between': 'never',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'vue',
group: 'external',
position: 'before'
},
{
pattern: 'vue-router',
group: 'external',
position: 'before'
},
{
pattern: 'pinia',
group: 'external',
position: 'before'
},
{
pattern: 'naive-ui',
group: 'external',
position: 'before'
},
{
pattern: '@/config',
group: 'internal',
position: 'before'
},
{
pattern: '@/enum',
group: 'internal',
position: 'before'
},
{
pattern: '@/plugins',
group: 'internal',
position: 'before'
},
{
pattern: '@/layouts',
group: 'internal',
position: 'before'
},
{
pattern: '@/layouts',
group: 'internal',
position: 'before'
},
{
pattern: '@/views',
group: 'internal',
position: 'before'
},
{
pattern: '@/components',
group: 'internal',
position: 'before'
},
{
pattern: '@/router',
group: 'internal',
position: 'before'
},
{
pattern: '@/store',
group: 'internal',
position: 'before'
},
{
pattern: '@/composables',
group: 'internal',
position: 'before'
},
{
pattern: '@/hooks',
group: 'internal',
position: 'before'
},
{
pattern: '@/service',
group: 'internal',
position: 'before'
},
{
pattern: '@/utils',
group: 'internal',
position: 'before'
},
{
pattern: '@/assets',
group: 'internal',
position: 'before'
},
{
pattern: '@/interface',
group: 'internal',
position: 'before'
}
],
pathGroupsExcludedImportTypes: ['vue', 'vue-router', 'pinia', 'naive-ui']
}
],
'import/prefer-default-export': 0,
'max-classes-per-file': 0,
'no-shadow': 0,
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'vue/multi-word-component-names': 0,
'max-classes-per-file': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true }],
'@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: false, typedefs: false }]
'@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: false, typedefs: false }],
'@typescript-eslint/no-var-requires': 'off'
}
};
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.idea
stats.html
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm lint:fix && pnpm vtsc
pnpm lint && pnpm typecheck
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
"workbench.productIconTheme": "fluent-icons",
"vue3snippets.enable-compile-vue-file-on-did-save-code": false,
"editor.formatOnSave": false,
"material-icon-theme.activeIconPack": "angular",
"material-icon-theme.files.associations": {},
"material-icon-theme.folders.associations": {
"enum": "typescript",
"enums": "typescript",
"store": "context",
"stores": "context",
"composable": "hook",
"composables": "hook",
"directive": "tools",
Expand Down
Loading

0 comments on commit de2057f

Please sign in to comment.