添加了一些eslint的rule。
This commit is contained in:
		@@ -2,8 +2,8 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2022-12-14 15:12:46
 | 
					 * @Date: 2022-12-14 15:12:46
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2022-12-14 15:20:20
 | 
					 * @LastEditTime: 2023-02-06 00:36:26
 | 
				
			||||||
 * @FilePath: \admin_system\.eslintrc.js
 | 
					 * @FilePath: /IT工具综合平台/.eslintrc.js
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
@@ -11,17 +11,34 @@
 | 
				
			|||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
  root: true,
 | 
					  root: true,
 | 
				
			||||||
  env: {
 | 
					  env: {
 | 
				
			||||||
    node: true
 | 
					    node: true,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  'extends': [
 | 
					  'extends': [
 | 
				
			||||||
    'plugin:vue/vue3-essential',
 | 
					    'plugin:vue/vue3-essential',
 | 
				
			||||||
    'eslint:recommended'
 | 
					    'eslint:recommended',
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  parserOptions: {
 | 
					  parserOptions: {
 | 
				
			||||||
    parser: '@babel/eslint-parser'
 | 
					    parser: '@babel/eslint-parser',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  rules: {
 | 
					  rules: {
 | 
				
			||||||
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
 | 
					    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
 | 
				
			||||||
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
 | 
					    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
 | 
				
			||||||
  }
 | 
					    "no-unused-vars": "off",
 | 
				
			||||||
}
 | 
					    "semi": ["error", "always",],//控制行尾部分号
 | 
				
			||||||
 | 
					    "comma-dangle": ["error", {
 | 
				
			||||||
 | 
					      "arrays": "always",
 | 
				
			||||||
 | 
					      "objects": "always",
 | 
				
			||||||
 | 
					      "imports": "never",
 | 
				
			||||||
 | 
					      "exports": "never",
 | 
				
			||||||
 | 
					      "functions": "never",
 | 
				
			||||||
 | 
					    },],//数组和对象键值对最后一个逗号
 | 
				
			||||||
 | 
					    "comma-style": ["error", "last",], //逗号在行位
 | 
				
			||||||
 | 
					    "array-bracket-spacing": ["error", "never",],
 | 
				
			||||||
 | 
					    "no-undef-init": "error",
 | 
				
			||||||
 | 
					    "no-invalid-this": "error",
 | 
				
			||||||
 | 
					    "no-use-before-define": "error",
 | 
				
			||||||
 | 
					    "no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
 | 
				
			||||||
 | 
					    // "comma-spacing": ["error", { "before": false, "after": true, },],
 | 
				
			||||||
 | 
					    "brace-style": ["error", "allman", { "allowSingleLine": true, },],
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-01-04 11:30:33
 | 
					 * @Date: 2023-01-04 11:30:33
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2023-02-05 23:38:54
 | 
					 * @LastEditTime: 2023-02-06 00:25:26
 | 
				
			||||||
 * @FilePath: /IT工具综合平台/src/layout/components/Aside.vue
 | 
					 * @FilePath: /IT工具综合平台/src/layout/components/Aside.vue
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
@@ -54,8 +54,8 @@ export default {
 | 
				
			|||||||
    name: "LayoutAside",
 | 
					    name: "LayoutAside",
 | 
				
			||||||
    setup()
 | 
					    setup()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const router = useRouter();
 | 
					        const router = useRouter();//路由
 | 
				
			||||||
        const routes = router.getRoutes();
 | 
					        const routes = router.getRoutes();//路由数组
 | 
				
			||||||
        const store = useStore();
 | 
					        const store = useStore();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //用于判断一个路由是否只有一项子路由
 | 
					        //用于判断一个路由是否只有一项子路由
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-02-04 15:48:00
 | 
					 * @Date: 2023-02-04 15:48:00
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2023-02-05 11:47:17
 | 
					 * @LastEditTime: 2023-02-06 00:28:23
 | 
				
			||||||
 * @FilePath: /IT工具综合平台/src/utils/api/requirement/requirement.js
 | 
					 * @FilePath: /IT工具综合平台/src/utils/api/requirement/requirement.js
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
@@ -42,8 +42,8 @@ function query_requirement_ui(requirement_store, error_page_name)
 | 
				
			|||||||
                {
 | 
					                {
 | 
				
			||||||
                    name: error_page_name,
 | 
					                    name: error_page_name,
 | 
				
			||||||
                    query: {
 | 
					                    query: {
 | 
				
			||||||
                        error
 | 
					                        error,
 | 
				
			||||||
                    }
 | 
					                    },
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-01-25 23:16:29
 | 
					 * @Date: 2023-01-25 23:16:29
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2023-02-04 15:46:29
 | 
					 * @LastEditTime: 2023-02-06 00:37:38
 | 
				
			||||||
 * @FilePath: /IT工具综合平台/src/views/requirement/RequirementEditing.vue
 | 
					 * @FilePath: /IT工具综合平台/src/views/requirement/RequirementEditing.vue
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-02-02 22:19:12
 | 
					 * @Date: 2023-02-02 22:19:12
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2023-02-05 23:05:12
 | 
					 * @LastEditTime: 2023-02-06 00:19:05
 | 
				
			||||||
 * @FilePath: /IT工具综合平台/src/views/requirement/RequirementManager.vue
 | 
					 * @FilePath: /IT工具综合平台/src/views/requirement/RequirementManager.vue
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
@@ -299,7 +299,7 @@ export default {
 | 
				
			|||||||
                name: "RequirementEditing",
 | 
					                name: "RequirementEditing",
 | 
				
			||||||
                query: {
 | 
					                query: {
 | 
				
			||||||
                    serial: "new",
 | 
					                    serial: "new",
 | 
				
			||||||
                }
 | 
					                },
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -311,7 +311,7 @@ export default {
 | 
				
			|||||||
                name: "RequirementEditing",
 | 
					                name: "RequirementEditing",
 | 
				
			||||||
                query: {
 | 
					                query: {
 | 
				
			||||||
                    serial: requirement_serial,
 | 
					                    serial: requirement_serial,
 | 
				
			||||||
                }
 | 
					                },
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user