@bhsd/common 0.14.1 → 0.14.2
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/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/stylelint.d.ts +3 -3
- package/eslintrc.browser.cjs +10 -0
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -177,8 +177,9 @@ const refreshStdout = (str) => {
|
|
|
177
177
|
process.stdout.write(`\x1B[K\x1B[?7l${str}\x1B[?7h\r`);
|
|
178
178
|
};
|
|
179
179
|
function getRegex(f) {
|
|
180
|
+
const map = /* @__PURE__ */ new Map(), weakMap = /* @__PURE__ */ new WeakMap();
|
|
180
181
|
return (s) => {
|
|
181
|
-
const regexp =
|
|
182
|
+
const regexp = typeof s === "string" ? map : weakMap;
|
|
182
183
|
if (regexp.has(s)) {
|
|
183
184
|
const re2 = regexp.get(s);
|
|
184
185
|
re2.lastIndex = 0;
|
package/dist/index.mjs
CHANGED
|
@@ -138,8 +138,9 @@ const refreshStdout = (str) => {
|
|
|
138
138
|
process.stdout.write(`\x1B[K\x1B[?7l${str}\x1B[?7h\r`);
|
|
139
139
|
};
|
|
140
140
|
function getRegex(f) {
|
|
141
|
+
const map = /* @__PURE__ */ new Map(), weakMap = /* @__PURE__ */ new WeakMap();
|
|
141
142
|
return (s) => {
|
|
142
|
-
const regexp =
|
|
143
|
+
const regexp = typeof s === "string" ? map : weakMap;
|
|
143
144
|
if (regexp.has(s)) {
|
|
144
145
|
const re2 = regexp.get(s);
|
|
145
146
|
re2.lastIndex = 0;
|
package/dist/stylelint.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { PublicApi, Warning, Config } from 'stylelint';
|
|
|
3
3
|
* 使用Stylelint检查CSS代码
|
|
4
4
|
* @param stylelint Stylelint实例
|
|
5
5
|
* @param code CSS代码
|
|
6
|
-
* @param
|
|
6
|
+
* @param additionalConfig 额外的规则
|
|
7
7
|
* @param fix 是否修正
|
|
8
8
|
*/
|
|
9
|
-
export declare function styleLint(stylelint: PublicApi, code: string,
|
|
10
|
-
export declare function styleLint(stylelint: PublicApi, code: string,
|
|
9
|
+
export declare function styleLint(stylelint: PublicApi, code: string, additionalConfig?: Config | Config['rules'] | null, fix: true): Promise<string>;
|
|
10
|
+
export declare function styleLint(stylelint: PublicApi, code: string, additionalConfig?: Config | Config['rules'] | null): Promise<Warning[]>;
|
package/eslintrc.browser.cjs
CHANGED
|
@@ -23,13 +23,23 @@ module.exports = {
|
|
|
23
23
|
'es-x/no-array-prototype-with': 2,
|
|
24
24
|
'es-x/no-error-cause': 2,
|
|
25
25
|
'es-x/no-map-groupby': 2,
|
|
26
|
+
'es-x/no-math-f16round': 2,
|
|
26
27
|
'es-x/no-object-groupby': 2,
|
|
27
28
|
'es-x/no-object-hasown': 2,
|
|
28
29
|
'es-x/no-promise-any': 2,
|
|
30
|
+
'es-x/no-promise-try': 2,
|
|
29
31
|
'es-x/no-promise-withresolvers': 2,
|
|
30
32
|
'es-x/no-regexp-d-flag': 2,
|
|
33
|
+
'es-x/no-regexp-escape': 2,
|
|
31
34
|
'es-x/no-regexp-lookbehind-assertions': 2,
|
|
32
35
|
'es-x/no-regexp-v-flag': 2,
|
|
36
|
+
'es-x/no-set-prototype-difference': 2,
|
|
37
|
+
'es-x/no-set-prototype-intersection': 2,
|
|
38
|
+
'es-x/no-set-prototype-isdisjointfrom': 2,
|
|
39
|
+
'es-x/no-set-prototype-issubsetof': 2,
|
|
40
|
+
'es-x/no-set-prototype-issupersetof': 2,
|
|
41
|
+
'es-x/no-set-prototype-symmetricdifference': 2,
|
|
42
|
+
'es-x/no-set-prototype-union': 2,
|
|
33
43
|
'es-x/no-string-prototype-at': 2,
|
|
34
44
|
'es-x/no-string-prototype-iswellformed': 2,
|
|
35
45
|
'es-x/no-string-prototype-replaceall': 2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bhsd/common",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Bhsd",
|
|
6
6
|
"files": [
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
"@stylistic/eslint-plugin": "^3.1.0",
|
|
48
48
|
"@stylistic/stylelint-plugin": "^3.1.2",
|
|
49
49
|
"@types/mocha": "^10.0.10",
|
|
50
|
-
"@types/node": "^24.0.
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
52
|
-
"@typescript-eslint/parser": "^8.
|
|
53
|
-
"esbuild": "^0.25.
|
|
50
|
+
"@types/node": "^24.0.10",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
|
52
|
+
"@typescript-eslint/parser": "^8.35.1",
|
|
53
|
+
"esbuild": "^0.25.5",
|
|
54
54
|
"eslint": "^8.57.1",
|
|
55
|
-
"eslint-plugin-es-x": "^8.
|
|
55
|
+
"eslint-plugin-es-x": "^8.7.0",
|
|
56
56
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
57
|
-
"eslint-plugin-jsdoc": "^51.3.
|
|
57
|
+
"eslint-plugin-jsdoc": "^51.3.3",
|
|
58
58
|
"eslint-plugin-json-es": "^1.6.0",
|
|
59
|
-
"eslint-plugin-n": "^17.
|
|
59
|
+
"eslint-plugin-n": "^17.20.0",
|
|
60
60
|
"eslint-plugin-promise": "^7.2.1",
|
|
61
|
-
"eslint-plugin-regexp": "^2.
|
|
61
|
+
"eslint-plugin-regexp": "^2.9.0",
|
|
62
62
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
63
|
-
"stylelint": "^16.21.
|
|
63
|
+
"stylelint": "^16.21.1",
|
|
64
64
|
"typescript": "^5.8.2",
|
|
65
65
|
"wikiparser-node": "^1.21.2"
|
|
66
66
|
}
|