xshell 1.0.81 → 1.0.82

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.81",
3
+ "version": "1.0.82",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -111,18 +111,13 @@
111
111
  "@types/koa-compress": "^4.0.6",
112
112
  "@types/lodash": "^4.14.202",
113
113
  "@types/mime-types": "^2.1.4",
114
- "@types/node": "^20.10.8",
114
+ "@types/node": "^20.11.0",
115
115
  "@types/react": "^18.2.47",
116
116
  "@types/through2": "^2.0.41",
117
117
  "@types/tough-cookie": "^4.0.5",
118
118
  "@types/ua-parser-js": "^0.7.39",
119
119
  "@types/vinyl-fs": "^3.0.5",
120
- "@types/vscode": "^1.85.0",
121
- "@typescript-eslint/eslint-plugin": "^6.18.1",
122
- "@typescript-eslint/parser": "^6.18.1",
123
- "eslint": "^8.56.0",
124
- "eslint-plugin-react": "^7.33.2",
125
- "eslint-plugin-xlint": "^1.0.11"
120
+ "@types/vscode": "^1.85.0"
126
121
  },
127
122
  "pnpm": {
128
123
  "patchedDependencies": {
@@ -56,7 +56,7 @@ export declare function encode(str: string): Uint8Array;
56
56
  在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
57
57
  export declare function decode(buffer: Uint8Array): string;
58
58
  /** 字符串字典序比较 */
59
- export declare function strcmp(l: string, r: string): 0 | 1 | -1;
59
+ export declare function strcmp(l: string, r: string): 1 | 0 | -1;
60
60
  /** 比较 1.10.02 这种版本号 */
61
61
  export declare function vercmp(l: string, r: string): number;
62
62
  export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
package/utils.d.ts CHANGED
@@ -32,7 +32,7 @@ export declare function map_values<TValue, TNewValue>(obj: {
32
32
  /** 映射对象中的 keys, 返回新对象 */
33
33
  export declare function filter_keys<TObj>(obj: TObj, filter: (key: string) => any): TObj;
34
34
  /** 字符串字典序比较 */
35
- export declare function strcmp(l: string, r: string): 0 | 1 | -1;
35
+ export declare function strcmp(l: string, r: string): 1 | 0 | -1;
36
36
  /** 比较 1.10.02 这种版本号 */
37
37
  export declare function vercmp(l: string, r: string): number;
38
38
  export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
package/.eslintrc.json DELETED
@@ -1,186 +0,0 @@
1
- {
2
- "$schema": "./.eslintrc.schema.json",
3
-
4
- "root": true,
5
-
6
- "ignorePatterns": [
7
- "**/*.d.ts"
8
- ],
9
-
10
- "parser": "@typescript-eslint/parser",
11
- "parserOptions": {
12
- "ecmaVersion": "latest",
13
- "sourceType": "module",
14
- "project": "./tsconfig.json",
15
- "ecmaFeatures": {
16
- "jsx": true
17
- }
18
- },
19
-
20
- "plugins": [
21
- "@typescript-eslint",
22
- "react",
23
- "xlint"
24
- ],
25
-
26
- "settings": {
27
- "react": {
28
- "version": "detect"
29
- }
30
- },
31
-
32
- "env": {
33
- "node": true,
34
- "browser": true
35
- },
36
-
37
- "rules": {
38
- "xlint/fold-jsdoc-comments": "error",
39
-
40
- // 取代 nonblock-statement-body-position
41
- "xlint/nonblock-statement-body-position-with-indentation": "error",
42
-
43
- "xlint/empty-bracket-spacing": "error",
44
-
45
- // a + b**c
46
- "xlint/space-infix-ops-except-exponentiation": "error",
47
-
48
- "xlint/space-in-for-statement": "error",
49
-
50
- "xlint/jsx-no-redundant-parenthesis-in-return": "error",
51
-
52
- "xlint/keep-indent": "error",
53
-
54
- // 函数使用 function 来声明而不是 const foo = () => { }
55
- "xlint/func-style": "error",
56
-
57
-
58
- "@typescript-eslint/semi": ["error", "never"],
59
- "@typescript-eslint/no-extra-semi": "error",
60
- "semi-style": ["error", "first"],
61
-
62
- // 使用 ===
63
- "eqeqeq": "error",
64
-
65
- // 父类尽量返回 this 类型
66
- "@typescript-eslint/prefer-return-this-type": "error",
67
-
68
- // 尽量使用 . 访问属性而不是 []
69
- "@typescript-eslint/dot-notation": "error",
70
-
71
- // 必须 throw Error
72
- "@typescript-eslint/no-throw-literal": "error",
73
-
74
- // ------------ async
75
- // 返回 Promise 的函数一定要标记为 async 函数
76
- "@typescript-eslint/promise-function-async": "error",
77
-
78
- // 不要 return await promise, 直接 return promise, 除非外面有 try catch
79
- "@typescript-eslint/return-await": "error",
80
-
81
- // ------------ 括号
82
-
83
- // a => { } 而不是 (a) => { }
84
- "arrow-parens": ["error", "as-needed", { "requireForBlockBody": false }],
85
-
86
- // 不要多余的大括号
87
- // if (true)
88
- // console.log()
89
- "curly": ["error", "multi"],
90
-
91
- // 简单属性不要冗余的大括号 <Component prop='simple-value' />
92
- "react/jsx-curly-brace-presence": ["error", "never"],
93
-
94
- // ------------ 空格
95
-
96
- // { a, b } 这样的对象,大括号里面要有空格
97
- "@typescript-eslint/object-curly-spacing": ["error", "always"],
98
-
99
- // [a, b, c]
100
- "@typescript-eslint/comma-spacing": "error",
101
-
102
- // foo()
103
- "@typescript-eslint/func-call-spacing": "error",
104
-
105
- // a => { } 中箭头左右两边空格
106
- "arrow-spacing": ["error"],
107
-
108
- // 注释双斜杠后面要有空格
109
- "spaced-comment": ["error", "always", { "markers": ["/"] }],
110
-
111
- // 函数声明中,名称后面要有空格
112
- "@typescript-eslint/space-before-function-paren": "error",
113
-
114
- // { return true } 这样的 block 大括号里面要有空格
115
- "block-spacing": ["error", "always"],
116
-
117
- // aaa: 123
118
- "@typescript-eslint/key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
119
-
120
- // aaa: string
121
- "@typescript-eslint/type-annotation-spacing": "error",
122
-
123
- // if ()
124
- "@typescript-eslint/keyword-spacing": ["error", { "before": true, "after": true }],
125
-
126
- // if (1) { }
127
- "@typescript-eslint/space-before-blocks": "error",
128
-
129
- // case 1: ...
130
- "switch-colon-spacing": "error",
131
-
132
- // <Hello name={firstname} />
133
- "react/jsx-equals-spacing": ["error", "never"],
134
-
135
- // 不允许使用 tab
136
- "no-tabs": "error",
137
-
138
- // 使用 \n 换行
139
- "linebreak-style": ["error", "unix"],
140
-
141
- // 文件以 \n 结尾
142
- "eol-last": ["error", "always"],
143
-
144
- // ------------ 引号
145
-
146
- // 用单引号
147
- "jsx-quotes": ["error", "prefer-single"],
148
-
149
- // 用单引号
150
- "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
151
-
152
- // 不要冗余的引号包裹属性
153
- "quote-props": ["error", "as-needed", { "keywords": false, "unnecessary": true }],
154
-
155
- // ------------ 其它
156
- // boolean 属性不要冗余的 ={true} <Component boolprop />
157
- "react/jsx-boolean-value": ["error", "never"],
158
-
159
- // 没有 children 的 Component 写成闭合标签 <Component />
160
- "react/self-closing-comp": "error",
161
-
162
- // 单行类型声明用 `,` 分割,多行类型声明结尾不要加分号
163
- "@typescript-eslint/member-delimiter-style": ["error", {
164
- "multiline": {
165
- "delimiter": "none",
166
- "requireLast": false
167
- },
168
- "singleline": {
169
- "delimiter": "comma",
170
- "requireLast": false
171
- }
172
- }],
173
-
174
- "@typescript-eslint/prefer-includes": "error",
175
-
176
- "@typescript-eslint/prefer-regexp-exec": "error",
177
-
178
- // 禁止使用 export default
179
- "no-restricted-exports": ["error", { "restrictDefaultExports": { "direct": true, "named": true, "defaultFrom": true, "namedFrom": true, "namespaceFrom": true } }],
180
-
181
- "@typescript-eslint/consistent-type-imports": ["error", { "fixStyle": "inline-type-imports", "disallowTypeAnnotations": false }],
182
-
183
- // () => { 返回 void 的表达式 }
184
- "@typescript-eslint/no-confusing-void-expression": "error"
185
- }
186
- }