dolphindb 2.0.954 → 2.0.956
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/.eslintrc.json +97 -0
- package/.eslintrc.schema.json +1509 -0
- package/.vscode/extensions.json +10 -0
- package/.vscode/settings.json +13 -0
- package/.vscode/settings.template.json +13 -0
- package/browser.js +3 -3
- package/browser.js.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/language.js +1 -1
- package/language.js.map +1 -1
- package/package.json +10 -5
- package/test.js +17 -0
- package/test.js.map +1 -1
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./.eslintrc.schema.json",
|
|
3
|
+
|
|
4
|
+
"root": true,
|
|
5
|
+
|
|
6
|
+
"ignorePatterns": ["**/*.d.ts"],
|
|
7
|
+
|
|
8
|
+
"parser": "@typescript-eslint/parser",
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": "latest",
|
|
11
|
+
"sourceType": "module",
|
|
12
|
+
"ecmaFeatures": {
|
|
13
|
+
"jsx": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
"plugins": [
|
|
18
|
+
"@typescript-eslint"
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
"settings": {
|
|
22
|
+
"react": {
|
|
23
|
+
"version": "detect"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
"env": {
|
|
28
|
+
"node": true,
|
|
29
|
+
"browser": true
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"rules": {
|
|
33
|
+
"semi": "off",
|
|
34
|
+
"@typescript-eslint/semi": ["error", "never"],
|
|
35
|
+
"@typescript-eslint/no-extra-semi": "error",
|
|
36
|
+
"semi-style": ["error", "first"],
|
|
37
|
+
|
|
38
|
+
// 使用 ===
|
|
39
|
+
"eqeqeq": "error",
|
|
40
|
+
|
|
41
|
+
// 不要 return await promise, 直接 return promise, 除非外面有 try catch
|
|
42
|
+
"no-return-await": "error",
|
|
43
|
+
|
|
44
|
+
// ------------ 括号
|
|
45
|
+
|
|
46
|
+
// a => { } 而不是 (a) => { }
|
|
47
|
+
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": false }],
|
|
48
|
+
|
|
49
|
+
// 不要多余的大括号
|
|
50
|
+
// if (true)
|
|
51
|
+
// console.log()
|
|
52
|
+
"curly": ["error", "multi"],
|
|
53
|
+
|
|
54
|
+
// if 的 body 必须换行
|
|
55
|
+
"nonblock-statement-body-position": ["error", "below"],
|
|
56
|
+
|
|
57
|
+
// ------------ 空格
|
|
58
|
+
|
|
59
|
+
// { a, b } 这样的对象,大括号里面要有空格
|
|
60
|
+
"object-curly-spacing": ["error", "always"],
|
|
61
|
+
|
|
62
|
+
// a => { } 中箭头左右两边空格
|
|
63
|
+
"arrow-spacing": ["error"],
|
|
64
|
+
|
|
65
|
+
// 注释双斜杠后面要有空格
|
|
66
|
+
"spaced-comment": ["error", "always", { "markers": ["/"] }],
|
|
67
|
+
|
|
68
|
+
// 函数声明中,名称后面要有空格
|
|
69
|
+
"@typescript-eslint/space-before-function-paren": "error",
|
|
70
|
+
|
|
71
|
+
// { return true } 这样的 block 大括号里面要有空格
|
|
72
|
+
"block-spacing": ["error", "always"],
|
|
73
|
+
|
|
74
|
+
// aaa: 123
|
|
75
|
+
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
|
|
76
|
+
|
|
77
|
+
// if ()
|
|
78
|
+
"keyword-spacing": ["error", { "before": true, "after": true }],
|
|
79
|
+
|
|
80
|
+
// a + b
|
|
81
|
+
"space-infix-ops": ["error"],
|
|
82
|
+
|
|
83
|
+
// 使用 \n 换行
|
|
84
|
+
"linebreak-style": ["error", "unix"],
|
|
85
|
+
|
|
86
|
+
// ------------ 引号
|
|
87
|
+
|
|
88
|
+
// 用单引号
|
|
89
|
+
"jsx-quotes": ["error", "prefer-single"],
|
|
90
|
+
|
|
91
|
+
// 用单引号
|
|
92
|
+
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
|
|
93
|
+
|
|
94
|
+
// 不要冗余的引号包裹属性
|
|
95
|
+
"quote-props": ["error", "as-needed", { "keywords": false, "unnecessary": true }]
|
|
96
|
+
}
|
|
97
|
+
}
|