@zpcscc/configs 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,12 @@ module.exports = {
48
48
  node: true
49
49
  }
50
50
  },
51
+ globals: {
52
+ Any: true,
53
+ AnyArray: true,
54
+ AnyObject: true,
55
+ AnyFunction: true
56
+ },
51
57
  rules: {
52
58
  // 数组类型。这里不限制写法
53
59
  '@typescript-eslint/array-type': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zpcscc/configs",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "项目通用配置",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -46,14 +46,14 @@
46
46
  "@babel/core": "7.24.9",
47
47
  "@babel/plugin-syntax-flow": "7.24.7",
48
48
  "@babel/plugin-transform-react-jsx": "7.24.7",
49
- "@babel/runtime": "7.24.8",
49
+ "@babel/runtime": "7.25.0",
50
50
  "@commitlint/cz-commitlint": "19.2.0",
51
- "@rushstack/eslint-patch": "1.10.3",
52
- "@types/node": "20.14.10",
51
+ "@rushstack/eslint-patch": "1.10.4",
52
+ "@types/node": "20.14.12",
53
53
  "@types/react": "18.3.3",
54
54
  "@types/react-dom": "18.3.0",
55
- "@typescript-eslint/eslint-plugin": "7.16.1",
56
- "@typescript-eslint/parser": "7.16.1",
55
+ "@typescript-eslint/eslint-plugin": "7.17.0",
56
+ "@typescript-eslint/parser": "7.17.0",
57
57
  "@vue/eslint-config-prettier": "9.0.0",
58
58
  "@vue/eslint-config-typescript": "13.0.0",
59
59
  "commitizen": "4.3.0",
@@ -65,32 +65,32 @@
65
65
  "eslint-plugin-eslint-comments": "3.2.0",
66
66
  "eslint-plugin-import": "2.29.1",
67
67
  "eslint-plugin-jsx-a11y": "6.9.0",
68
- "eslint-plugin-n": "16",
69
- "eslint-plugin-prettier": "5.1.3",
70
- "eslint-plugin-promise": "6.4.0",
71
- "eslint-plugin-react": "7.34.4",
68
+ "eslint-plugin-n": "16.6.2",
69
+ "eslint-plugin-prettier": "5.2.1",
70
+ "eslint-plugin-promise": "6.6.0",
71
+ "eslint-plugin-react": "7.35.0",
72
72
  "eslint-plugin-react-hooks": "4.6.2",
73
- "eslint-plugin-unicorn": "54.0.0",
73
+ "eslint-plugin-unicorn": "55.0.0",
74
74
  "eslint-plugin-vue": "9.27.0",
75
75
  "inquirer": "9.3.5",
76
- "postcss": "8.4.39",
76
+ "postcss": "8.4.40",
77
77
  "prettier": "3.3.3",
78
78
  "prettier-plugin-organize-imports": "4.0.0",
79
79
  "prettier-plugin-packagejson": "2.5.1",
80
80
  "stylelint": "14.16.1",
81
81
  "stylelint-config-idiomatic-order": "10.0.0",
82
82
  "stylelint-declaration-block-no-ignored-properties": "2.8.0",
83
- "typescript": "5.5.3",
83
+ "typescript": "5.5.4",
84
84
  "vue-eslint-parser": "9.4.3"
85
85
  },
86
86
  "devDependencies": {
87
- "dumi": "2.4.6",
87
+ "dumi": "2.4.7",
88
88
  "father": "4.4.5",
89
89
  "gh-pages": "6.1.1",
90
90
  "react": "18.3.1",
91
91
  "react-dom": "18.3.1",
92
92
  "react-is": "18.3.1",
93
- "styled-components": "6.1.11",
93
+ "styled-components": "6.1.12",
94
94
  "tslib": "2.6.3",
95
95
  "webpack": "5.93.0"
96
96
  },
package/types/any.d.ts CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  // 任意值
4
4
  type Any = any;
5
+ // 任意数组类型
6
+ type AnyArray = any[];
5
7
  // 任意对象类型
6
8
  type AnyObject = Record<string, any>;
7
9
  // 任意函数类型
package/types/index.d.ts CHANGED
@@ -2,4 +2,5 @@
2
2
  /* eslint-disable multiline-comment-style */
3
3
  /// <reference types="node" />
4
4
  /// <reference types="./files" />
5
+ // * 这里自定义的一些全局 type 类型。记得在 eslint 的 globals 中添加。避免全局使用时类型报错未定义;
5
6
  /// <reference types="./any" />