@leexi/shared 0.3.5 → 0.3.7
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/README.md +62 -38
- package/dist/eslint/base.eslint.config.d.ts +71 -143
- package/dist/eslint/base.eslint.config.mjs +25 -61
- package/dist/eslint/vue.eslint.config.d.ts +74 -150
- package/dist/eslint/vue.eslint.config.mjs +2 -3
- package/dist/module.json +1 -1
- package/dist/runtime/composables/useLocalStorage.d.ts +15 -9
- package/dist/runtime/utils/objects/deepDup.d.ts +13 -4
- package/dist/runtime/utils/objects/isSame.d.ts +12 -3
- package/dist/runtime/utils/records/omit.d.ts +9 -4
- package/dist/runtime/utils/records/pick.d.ts +9 -4
- package/dist/runtime/utils/records/set.d.ts +10 -9
- package/dist/runtime/utils/strings/camelcase.d.ts +7 -3
- package/dist/runtime/utils/strings/camelcase.js +1 -1
- package/dist/runtime/utils/strings/capitalize.d.ts +7 -3
- package/dist/runtime/utils/strings/capitalize.js +1 -1
- package/dist/runtime/utils/strings/kebabcase.d.ts +7 -3
- package/dist/runtime/utils/strings/kebabcase.js +1 -1
- package/dist/runtime/utils/strings/snakecase.d.ts +7 -3
- package/dist/runtime/utils/strings/snakecase.js +1 -1
- package/package.json +15 -19
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
|
-
import
|
|
3
|
-
import stylisticTS from "@stylistic/eslint-plugin-ts";
|
|
2
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
4
3
|
import globals from "globals";
|
|
5
4
|
import tseslint from "typescript-eslint";
|
|
6
5
|
export default [
|
|
@@ -19,7 +18,7 @@ export default [
|
|
|
19
18
|
}
|
|
20
19
|
},
|
|
21
20
|
plugins: {
|
|
22
|
-
"@stylistic
|
|
21
|
+
"@stylistic": stylistic
|
|
23
22
|
},
|
|
24
23
|
rules: {
|
|
25
24
|
"arrow-body-style": ["error", "as-needed"],
|
|
@@ -35,33 +34,33 @@ export default [
|
|
|
35
34
|
destructuring: "all"
|
|
36
35
|
}],
|
|
37
36
|
"prefer-template": "error",
|
|
38
|
-
"@stylistic/
|
|
39
|
-
"@stylistic/
|
|
40
|
-
"@stylistic/
|
|
41
|
-
"@stylistic/
|
|
42
|
-
"@stylistic/
|
|
43
|
-
"@stylistic/
|
|
37
|
+
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
38
|
+
"@stylistic/arrow-parens": ["error", "as-needed"],
|
|
39
|
+
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
40
|
+
"@stylistic/comma-spacing": "error",
|
|
41
|
+
"@stylistic/eol-last": ["error", "always"],
|
|
42
|
+
"@stylistic/indent": ["error", 2, {
|
|
44
43
|
SwitchCase: 1
|
|
45
44
|
}],
|
|
46
|
-
"@stylistic/
|
|
47
|
-
"@stylistic/
|
|
48
|
-
"@stylistic/
|
|
49
|
-
"@stylistic/
|
|
50
|
-
"@stylistic/
|
|
45
|
+
"@stylistic/key-spacing": "error",
|
|
46
|
+
"@stylistic/keyword-spacing": "error",
|
|
47
|
+
"@stylistic/multiline-ternary": ["error", "never"],
|
|
48
|
+
"@stylistic/no-multi-spaces": "error",
|
|
49
|
+
"@stylistic/no-multiple-empty-lines": ["error", {
|
|
51
50
|
max: 1
|
|
52
51
|
}],
|
|
53
|
-
"@stylistic/
|
|
54
|
-
"@stylistic/
|
|
55
|
-
"@stylistic/
|
|
56
|
-
"@stylistic/
|
|
57
|
-
"@stylistic/
|
|
58
|
-
"@stylistic/
|
|
59
|
-
"@stylistic/
|
|
60
|
-
"@stylistic/
|
|
61
|
-
"@stylistic/
|
|
62
|
-
"@stylistic/
|
|
63
|
-
"@stylistic/
|
|
64
|
-
"@stylistic/
|
|
52
|
+
"@stylistic/no-trailing-spaces": "error",
|
|
53
|
+
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
54
|
+
"@stylistic/quote-props": ["error", "consistent-as-needed"],
|
|
55
|
+
"@stylistic/quotes": ["error", "single"],
|
|
56
|
+
"@stylistic/semi": ["error", "always"],
|
|
57
|
+
"@stylistic/semi-spacing": "error",
|
|
58
|
+
"@stylistic/space-before-blocks": ["error", "always"],
|
|
59
|
+
"@stylistic/space-before-function-paren": ["error", "always"],
|
|
60
|
+
"@stylistic/space-in-parens": ["error", "never"],
|
|
61
|
+
"@stylistic/space-infix-ops": "error",
|
|
62
|
+
"@stylistic/spaced-comment": "error",
|
|
63
|
+
"@stylistic/template-curly-spacing": ["error", "never"],
|
|
65
64
|
"@typescript-eslint/no-unused-expressions": "off",
|
|
66
65
|
"@typescript-eslint/no-unused-vars": ["error", {
|
|
67
66
|
argsIgnorePattern: "^_",
|
|
@@ -70,41 +69,6 @@ export default [
|
|
|
70
69
|
}]
|
|
71
70
|
}
|
|
72
71
|
},
|
|
73
|
-
// typescript
|
|
74
|
-
{
|
|
75
|
-
files: ["**/*.ts", "**/*.vue"],
|
|
76
|
-
plugins: {
|
|
77
|
-
"@stylistic/ts": stylisticTS
|
|
78
|
-
},
|
|
79
|
-
rules: {
|
|
80
|
-
"@stylistic/js/comma-dangle": "off",
|
|
81
|
-
"@stylistic/js/comma-spacing": "off",
|
|
82
|
-
"@stylistic/js/indent": "off",
|
|
83
|
-
"@stylistic/js/key-spacing": "off",
|
|
84
|
-
"@stylistic/js/keyword-spacing": "off",
|
|
85
|
-
"@stylistic/js/object-curly-spacing": "off",
|
|
86
|
-
"@stylistic/js/quote-props": "off",
|
|
87
|
-
"@stylistic/js/quotes": "off",
|
|
88
|
-
"@stylistic/js/semi": "off",
|
|
89
|
-
"@stylistic/js/space-before-blocks": "off",
|
|
90
|
-
"@stylistic/js/space-before-function-paren": "off",
|
|
91
|
-
"@stylistic/js/space-infix-ops": "off",
|
|
92
|
-
"@stylistic/ts/comma-dangle": ["error", "always-multiline"],
|
|
93
|
-
"@stylistic/ts/comma-spacing": "error",
|
|
94
|
-
"@stylistic/ts/indent": ["error", 2, {
|
|
95
|
-
SwitchCase: 1
|
|
96
|
-
}],
|
|
97
|
-
"@stylistic/ts/key-spacing": "error",
|
|
98
|
-
"@stylistic/ts/keyword-spacing": "error",
|
|
99
|
-
"@stylistic/ts/object-curly-spacing": ["error", "always"],
|
|
100
|
-
"@stylistic/ts/quote-props": ["error", "consistent-as-needed"],
|
|
101
|
-
"@stylistic/ts/quotes": ["error", "single"],
|
|
102
|
-
"@stylistic/ts/semi": ["error", "always"],
|
|
103
|
-
"@stylistic/ts/space-before-blocks": ["error", "always"],
|
|
104
|
-
"@stylistic/ts/space-before-function-paren": ["error", "always"],
|
|
105
|
-
"@stylistic/ts/space-infix-ops": "error"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
72
|
// sort-keys
|
|
109
73
|
{
|
|
110
74
|
files: ["**/*.config.{js,ts}", "**/locales/**/*.js"],
|
|
@@ -7,6 +7,7 @@ declare const _default: ({
|
|
|
7
7
|
__filename: false;
|
|
8
8
|
AbortController: false;
|
|
9
9
|
AbortSignal: false;
|
|
10
|
+
AsyncDisposableStack: false;
|
|
10
11
|
atob: false;
|
|
11
12
|
Blob: false;
|
|
12
13
|
BroadcastChannel: false;
|
|
@@ -25,6 +26,7 @@ declare const _default: ({
|
|
|
25
26
|
CryptoKey: false;
|
|
26
27
|
CustomEvent: false;
|
|
27
28
|
DecompressionStream: false;
|
|
29
|
+
DisposableStack: false;
|
|
28
30
|
DOMException: false;
|
|
29
31
|
Event: false;
|
|
30
32
|
EventTarget: false;
|
|
@@ -64,6 +66,7 @@ declare const _default: ({
|
|
|
64
66
|
setTimeout: false;
|
|
65
67
|
structuredClone: false;
|
|
66
68
|
SubtleCrypto: false;
|
|
69
|
+
SuppressedError: false;
|
|
67
70
|
TextDecoder: false;
|
|
68
71
|
TextDecoderStream: false;
|
|
69
72
|
TextEncoder: false;
|
|
@@ -71,6 +74,7 @@ declare const _default: ({
|
|
|
71
74
|
TransformStream: false;
|
|
72
75
|
TransformStreamDefaultController: false;
|
|
73
76
|
URL: false;
|
|
77
|
+
URLPattern: false;
|
|
74
78
|
URLSearchParams: false;
|
|
75
79
|
WebAssembly: false;
|
|
76
80
|
WebSocket: false;
|
|
@@ -83,6 +87,7 @@ declare const _default: ({
|
|
|
83
87
|
addEventListener: false;
|
|
84
88
|
ai: false;
|
|
85
89
|
AI: false;
|
|
90
|
+
AICreateMonitor: false;
|
|
86
91
|
AITextSession: false;
|
|
87
92
|
alert: false;
|
|
88
93
|
AnalyserNode: false;
|
|
@@ -159,6 +164,7 @@ declare const _default: ({
|
|
|
159
164
|
close: false;
|
|
160
165
|
closed: false;
|
|
161
166
|
CloseWatcher: false;
|
|
167
|
+
CommandEvent: false;
|
|
162
168
|
Comment: false;
|
|
163
169
|
CompositionEvent: false;
|
|
164
170
|
confirm: false;
|
|
@@ -176,6 +182,7 @@ declare const _default: ({
|
|
|
176
182
|
CredentialsContainer: false;
|
|
177
183
|
CropTarget: false;
|
|
178
184
|
crossOriginIsolated: false;
|
|
185
|
+
CSPViolationReportBody: false;
|
|
179
186
|
CSS: false;
|
|
180
187
|
CSSAnimation: false;
|
|
181
188
|
CSSConditionRule: false;
|
|
@@ -251,6 +258,7 @@ declare const _default: ({
|
|
|
251
258
|
DeviceMotionEventRotationRate: false;
|
|
252
259
|
DeviceOrientationEvent: false;
|
|
253
260
|
devicePixelRatio: false;
|
|
261
|
+
DevicePosture: false;
|
|
254
262
|
dispatchEvent: false;
|
|
255
263
|
document: false;
|
|
256
264
|
Document: false;
|
|
@@ -305,9 +313,9 @@ declare const _default: ({
|
|
|
305
313
|
FileSystemFileEntry: false;
|
|
306
314
|
FileSystemFileHandle: false;
|
|
307
315
|
FileSystemHandle: false;
|
|
316
|
+
FileSystemObserver: false;
|
|
308
317
|
FileSystemWritableFileStream: false;
|
|
309
318
|
find: false;
|
|
310
|
-
Float16Array: false;
|
|
311
319
|
focus: false;
|
|
312
320
|
FocusEvent: false;
|
|
313
321
|
FontData: false;
|
|
@@ -442,6 +450,7 @@ declare const _default: ({
|
|
|
442
450
|
HTMLProgressElement: false;
|
|
443
451
|
HTMLQuoteElement: false;
|
|
444
452
|
HTMLScriptElement: false;
|
|
453
|
+
HTMLSelectedContentElement: false;
|
|
445
454
|
HTMLSelectElement: false;
|
|
446
455
|
HTMLSlotElement: false;
|
|
447
456
|
HTMLSourceElement: false;
|
|
@@ -500,6 +509,7 @@ declare const _default: ({
|
|
|
500
509
|
KeyboardEvent: false;
|
|
501
510
|
KeyboardLayoutMap: false;
|
|
502
511
|
KeyframeEffect: false;
|
|
512
|
+
LanguageDetector: false;
|
|
503
513
|
LargestContentfulPaint: false;
|
|
504
514
|
LaunchParams: false;
|
|
505
515
|
launchQueue: false;
|
|
@@ -592,6 +602,7 @@ declare const _default: ({
|
|
|
592
602
|
NotifyPaintEvent: false;
|
|
593
603
|
NotRestoredReasonDetails: false;
|
|
594
604
|
NotRestoredReasons: false;
|
|
605
|
+
Observable: false;
|
|
595
606
|
OfflineAudioCompletionEvent: false;
|
|
596
607
|
OfflineAudioContext: false;
|
|
597
608
|
offscreenBuffering: false;
|
|
@@ -619,6 +630,7 @@ declare const _default: ({
|
|
|
619
630
|
onchange: true;
|
|
620
631
|
onclick: true;
|
|
621
632
|
onclose: true;
|
|
633
|
+
oncommand: true;
|
|
622
634
|
oncontentvisibilityautostatechange: true;
|
|
623
635
|
oncontextlost: true;
|
|
624
636
|
oncontextmenu: true;
|
|
@@ -797,6 +809,7 @@ declare const _default: ({
|
|
|
797
809
|
RelativeOrientationSensor: false;
|
|
798
810
|
RemotePlayback: false;
|
|
799
811
|
removeEventListener: false;
|
|
812
|
+
ReportBody: false;
|
|
800
813
|
reportError: false;
|
|
801
814
|
ReportingObserver: false;
|
|
802
815
|
requestAnimationFrame: false;
|
|
@@ -806,6 +819,7 @@ declare const _default: ({
|
|
|
806
819
|
ResizeObserverEntry: false;
|
|
807
820
|
ResizeObserverSize: false;
|
|
808
821
|
resizeTo: false;
|
|
822
|
+
RestrictionTarget: false;
|
|
809
823
|
RTCCertificate: false;
|
|
810
824
|
RTCDataChannel: false;
|
|
811
825
|
RTCDataChannelEvent: false;
|
|
@@ -864,6 +878,11 @@ declare const _default: ({
|
|
|
864
878
|
ShadowRoot: false;
|
|
865
879
|
sharedStorage: false;
|
|
866
880
|
SharedStorage: false;
|
|
881
|
+
SharedStorageAppendMethod: false;
|
|
882
|
+
SharedStorageClearMethod: false;
|
|
883
|
+
SharedStorageDeleteMethod: false;
|
|
884
|
+
SharedStorageModifierMethod: false;
|
|
885
|
+
SharedStorageSetMethod: false;
|
|
867
886
|
SharedStorageWorklet: false;
|
|
868
887
|
SharedWorker: false;
|
|
869
888
|
showDirectoryPicker: false;
|
|
@@ -894,6 +913,7 @@ declare const _default: ({
|
|
|
894
913
|
StyleSheet: false;
|
|
895
914
|
StyleSheetList: false;
|
|
896
915
|
SubmitEvent: false;
|
|
916
|
+
Subscriber: false;
|
|
897
917
|
SVGAElement: false;
|
|
898
918
|
SVGAngle: false;
|
|
899
919
|
SVGAnimatedAngle: false;
|
|
@@ -1025,7 +1045,6 @@ declare const _default: ({
|
|
|
1025
1045
|
TrustedTypePolicyFactory: false;
|
|
1026
1046
|
trustedTypes: false;
|
|
1027
1047
|
UIEvent: false;
|
|
1028
|
-
URLPattern: false;
|
|
1029
1048
|
USB: false;
|
|
1030
1049
|
USBAlternateInterface: false;
|
|
1031
1050
|
USBConfiguration: false;
|
|
@@ -1087,6 +1106,7 @@ declare const _default: ({
|
|
|
1087
1106
|
WebTransportSendStream: false;
|
|
1088
1107
|
WGSLLanguageFeatures: false;
|
|
1089
1108
|
WheelEvent: false;
|
|
1109
|
+
when: false;
|
|
1090
1110
|
window: false;
|
|
1091
1111
|
Window: false;
|
|
1092
1112
|
WindowControlsOverlay: false;
|
|
@@ -1148,15 +1168,10 @@ declare const _default: ({
|
|
|
1148
1168
|
};
|
|
1149
1169
|
};
|
|
1150
1170
|
plugins: {
|
|
1151
|
-
'@stylistic
|
|
1152
|
-
rules: import("@stylistic/eslint-plugin
|
|
1153
|
-
configs:
|
|
1154
|
-
"disable-legacy": import("eslint").Linter.Config;
|
|
1155
|
-
"all": import("eslint").Linter.Config;
|
|
1156
|
-
"all-flat": import("eslint").Linter.Config;
|
|
1157
|
-
};
|
|
1171
|
+
'@stylistic': {
|
|
1172
|
+
rules: import("@stylistic/eslint-plugin").Rules;
|
|
1173
|
+
configs: import("eslint").ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
|
|
1158
1174
|
};
|
|
1159
|
-
'@stylistic/ts'?: undefined;
|
|
1160
1175
|
};
|
|
1161
1176
|
rules: {
|
|
1162
1177
|
'arrow-body-style': string[];
|
|
@@ -1172,117 +1187,42 @@ declare const _default: ({
|
|
|
1172
1187
|
destructuring: string;
|
|
1173
1188
|
})[];
|
|
1174
1189
|
'prefer-template': string;
|
|
1175
|
-
'@stylistic/
|
|
1176
|
-
'@stylistic/
|
|
1177
|
-
'@stylistic/
|
|
1178
|
-
'@stylistic/
|
|
1179
|
-
'@stylistic/
|
|
1180
|
-
'@stylistic/
|
|
1190
|
+
'@stylistic/array-bracket-spacing': string[];
|
|
1191
|
+
'@stylistic/arrow-parens': string[];
|
|
1192
|
+
'@stylistic/comma-dangle': string[];
|
|
1193
|
+
'@stylistic/comma-spacing': string;
|
|
1194
|
+
'@stylistic/eol-last': string[];
|
|
1195
|
+
'@stylistic/indent': (string | number | {
|
|
1181
1196
|
SwitchCase: number;
|
|
1182
1197
|
})[];
|
|
1183
|
-
'@stylistic/
|
|
1184
|
-
'@stylistic/
|
|
1185
|
-
'@stylistic/
|
|
1186
|
-
'@stylistic/
|
|
1187
|
-
'@stylistic/
|
|
1198
|
+
'@stylistic/key-spacing': string;
|
|
1199
|
+
'@stylistic/keyword-spacing': string;
|
|
1200
|
+
'@stylistic/multiline-ternary': string[];
|
|
1201
|
+
'@stylistic/no-multi-spaces': string;
|
|
1202
|
+
'@stylistic/no-multiple-empty-lines': (string | {
|
|
1188
1203
|
max: number;
|
|
1189
1204
|
})[];
|
|
1190
|
-
'@stylistic/
|
|
1191
|
-
'@stylistic/
|
|
1192
|
-
'@stylistic/
|
|
1193
|
-
'@stylistic/
|
|
1194
|
-
'@stylistic/
|
|
1195
|
-
'@stylistic/
|
|
1196
|
-
'@stylistic/
|
|
1197
|
-
'@stylistic/
|
|
1198
|
-
'@stylistic/
|
|
1199
|
-
'@stylistic/
|
|
1200
|
-
'@stylistic/
|
|
1201
|
-
'@stylistic/
|
|
1205
|
+
'@stylistic/no-trailing-spaces': string;
|
|
1206
|
+
'@stylistic/object-curly-spacing': string[];
|
|
1207
|
+
'@stylistic/quote-props': string[];
|
|
1208
|
+
'@stylistic/quotes': string[];
|
|
1209
|
+
'@stylistic/semi': string[];
|
|
1210
|
+
'@stylistic/semi-spacing': string;
|
|
1211
|
+
'@stylistic/space-before-blocks': string[];
|
|
1212
|
+
'@stylistic/space-before-function-paren': string[];
|
|
1213
|
+
'@stylistic/space-in-parens': string[];
|
|
1214
|
+
'@stylistic/space-infix-ops': string;
|
|
1215
|
+
'@stylistic/spaced-comment': string;
|
|
1216
|
+
'@stylistic/template-curly-spacing': string[];
|
|
1202
1217
|
'@typescript-eslint/no-unused-expressions': string;
|
|
1203
1218
|
'@typescript-eslint/no-unused-vars': (string | {
|
|
1204
1219
|
argsIgnorePattern: string;
|
|
1205
1220
|
destructuredArrayIgnorePattern: string;
|
|
1206
1221
|
ignoreRestSiblings: boolean;
|
|
1207
1222
|
})[];
|
|
1208
|
-
'@stylistic/ts/comma-dangle'?: undefined;
|
|
1209
|
-
'@stylistic/ts/comma-spacing'?: undefined;
|
|
1210
|
-
'@stylistic/ts/indent'?: undefined;
|
|
1211
|
-
'@stylistic/ts/key-spacing'?: undefined;
|
|
1212
|
-
'@stylistic/ts/keyword-spacing'?: undefined;
|
|
1213
|
-
'@stylistic/ts/object-curly-spacing'?: undefined;
|
|
1214
|
-
'@stylistic/ts/quote-props'?: undefined;
|
|
1215
|
-
'@stylistic/ts/quotes'?: undefined;
|
|
1216
|
-
'@stylistic/ts/semi'?: undefined;
|
|
1217
|
-
'@stylistic/ts/space-before-blocks'?: undefined;
|
|
1218
|
-
'@stylistic/ts/space-before-function-paren'?: undefined;
|
|
1219
|
-
'@stylistic/ts/space-infix-ops'?: undefined;
|
|
1220
1223
|
'sort-keys'?: undefined;
|
|
1221
1224
|
};
|
|
1222
1225
|
files?: undefined;
|
|
1223
|
-
} | {
|
|
1224
|
-
files: string[];
|
|
1225
|
-
plugins: {
|
|
1226
|
-
'@stylistic/ts': {
|
|
1227
|
-
rules: import("@stylistic/eslint-plugin-ts").Rules;
|
|
1228
|
-
configs: {
|
|
1229
|
-
"disable-legacy": import("eslint").Linter.Config;
|
|
1230
|
-
"all": import("eslint").Linter.Config;
|
|
1231
|
-
"all-flat": import("eslint").Linter.Config;
|
|
1232
|
-
};
|
|
1233
|
-
};
|
|
1234
|
-
'@stylistic/js'?: undefined;
|
|
1235
|
-
};
|
|
1236
|
-
rules: {
|
|
1237
|
-
'@stylistic/js/comma-dangle': string;
|
|
1238
|
-
'@stylistic/js/comma-spacing': string;
|
|
1239
|
-
'@stylistic/js/indent': string;
|
|
1240
|
-
'@stylistic/js/key-spacing': string;
|
|
1241
|
-
'@stylistic/js/keyword-spacing': string;
|
|
1242
|
-
'@stylistic/js/object-curly-spacing': string;
|
|
1243
|
-
'@stylistic/js/quote-props': string;
|
|
1244
|
-
'@stylistic/js/quotes': string;
|
|
1245
|
-
'@stylistic/js/semi': string;
|
|
1246
|
-
'@stylistic/js/space-before-blocks': string;
|
|
1247
|
-
'@stylistic/js/space-before-function-paren': string;
|
|
1248
|
-
'@stylistic/js/space-infix-ops': string;
|
|
1249
|
-
'@stylistic/ts/comma-dangle': string[];
|
|
1250
|
-
'@stylistic/ts/comma-spacing': string;
|
|
1251
|
-
'@stylistic/ts/indent': (string | number | {
|
|
1252
|
-
SwitchCase: number;
|
|
1253
|
-
})[];
|
|
1254
|
-
'@stylistic/ts/key-spacing': string;
|
|
1255
|
-
'@stylistic/ts/keyword-spacing': string;
|
|
1256
|
-
'@stylistic/ts/object-curly-spacing': string[];
|
|
1257
|
-
'@stylistic/ts/quote-props': string[];
|
|
1258
|
-
'@stylistic/ts/quotes': string[];
|
|
1259
|
-
'@stylistic/ts/semi': string[];
|
|
1260
|
-
'@stylistic/ts/space-before-blocks': string[];
|
|
1261
|
-
'@stylistic/ts/space-before-function-paren': string[];
|
|
1262
|
-
'@stylistic/ts/space-infix-ops': string;
|
|
1263
|
-
'arrow-body-style'?: undefined;
|
|
1264
|
-
eqeqeq?: undefined;
|
|
1265
|
-
'no-console'?: undefined;
|
|
1266
|
-
'no-nested-ternary'?: undefined;
|
|
1267
|
-
'no-unused-vars'?: undefined;
|
|
1268
|
-
'prefer-const'?: undefined;
|
|
1269
|
-
'prefer-template'?: undefined;
|
|
1270
|
-
'@stylistic/js/array-bracket-spacing'?: undefined;
|
|
1271
|
-
'@stylistic/js/arrow-parens'?: undefined;
|
|
1272
|
-
'@stylistic/js/eol-last'?: undefined;
|
|
1273
|
-
'@stylistic/js/multiline-ternary'?: undefined;
|
|
1274
|
-
'@stylistic/js/no-multi-spaces'?: undefined;
|
|
1275
|
-
'@stylistic/js/no-multiple-empty-lines'?: undefined;
|
|
1276
|
-
'@stylistic/js/no-trailing-spaces'?: undefined;
|
|
1277
|
-
'@stylistic/js/semi-spacing'?: undefined;
|
|
1278
|
-
'@stylistic/js/space-in-parens'?: undefined;
|
|
1279
|
-
'@stylistic/js/spaced-comment'?: undefined;
|
|
1280
|
-
'@stylistic/js/template-curly-spacing'?: undefined;
|
|
1281
|
-
'@typescript-eslint/no-unused-expressions'?: undefined;
|
|
1282
|
-
'@typescript-eslint/no-unused-vars'?: undefined;
|
|
1283
|
-
'sort-keys'?: undefined;
|
|
1284
|
-
};
|
|
1285
|
-
languageOptions?: undefined;
|
|
1286
1226
|
} | {
|
|
1287
1227
|
files: string[];
|
|
1288
1228
|
rules: {
|
|
@@ -1297,43 +1237,31 @@ declare const _default: ({
|
|
|
1297
1237
|
'no-unused-vars'?: undefined;
|
|
1298
1238
|
'prefer-const'?: undefined;
|
|
1299
1239
|
'prefer-template'?: undefined;
|
|
1300
|
-
'@stylistic/
|
|
1301
|
-
'@stylistic/
|
|
1302
|
-
'@stylistic/
|
|
1303
|
-
'@stylistic/
|
|
1304
|
-
'@stylistic/
|
|
1305
|
-
'@stylistic/
|
|
1306
|
-
'@stylistic/
|
|
1307
|
-
'@stylistic/
|
|
1308
|
-
'@stylistic/
|
|
1309
|
-
'@stylistic/
|
|
1310
|
-
'@stylistic/
|
|
1311
|
-
'@stylistic/
|
|
1312
|
-
'@stylistic/
|
|
1313
|
-
'@stylistic/
|
|
1314
|
-
'@stylistic/
|
|
1315
|
-
'@stylistic/
|
|
1316
|
-
'@stylistic/
|
|
1317
|
-
'@stylistic/
|
|
1318
|
-
'@stylistic/
|
|
1319
|
-
'@stylistic/
|
|
1320
|
-
'@stylistic/
|
|
1321
|
-
'@stylistic/
|
|
1322
|
-
'@stylistic/
|
|
1240
|
+
'@stylistic/array-bracket-spacing'?: undefined;
|
|
1241
|
+
'@stylistic/arrow-parens'?: undefined;
|
|
1242
|
+
'@stylistic/comma-dangle'?: undefined;
|
|
1243
|
+
'@stylistic/comma-spacing'?: undefined;
|
|
1244
|
+
'@stylistic/eol-last'?: undefined;
|
|
1245
|
+
'@stylistic/indent'?: undefined;
|
|
1246
|
+
'@stylistic/key-spacing'?: undefined;
|
|
1247
|
+
'@stylistic/keyword-spacing'?: undefined;
|
|
1248
|
+
'@stylistic/multiline-ternary'?: undefined;
|
|
1249
|
+
'@stylistic/no-multi-spaces'?: undefined;
|
|
1250
|
+
'@stylistic/no-multiple-empty-lines'?: undefined;
|
|
1251
|
+
'@stylistic/no-trailing-spaces'?: undefined;
|
|
1252
|
+
'@stylistic/object-curly-spacing'?: undefined;
|
|
1253
|
+
'@stylistic/quote-props'?: undefined;
|
|
1254
|
+
'@stylistic/quotes'?: undefined;
|
|
1255
|
+
'@stylistic/semi'?: undefined;
|
|
1256
|
+
'@stylistic/semi-spacing'?: undefined;
|
|
1257
|
+
'@stylistic/space-before-blocks'?: undefined;
|
|
1258
|
+
'@stylistic/space-before-function-paren'?: undefined;
|
|
1259
|
+
'@stylistic/space-in-parens'?: undefined;
|
|
1260
|
+
'@stylistic/space-infix-ops'?: undefined;
|
|
1261
|
+
'@stylistic/spaced-comment'?: undefined;
|
|
1262
|
+
'@stylistic/template-curly-spacing'?: undefined;
|
|
1323
1263
|
'@typescript-eslint/no-unused-expressions'?: undefined;
|
|
1324
1264
|
'@typescript-eslint/no-unused-vars'?: undefined;
|
|
1325
|
-
'@stylistic/ts/comma-dangle'?: undefined;
|
|
1326
|
-
'@stylistic/ts/comma-spacing'?: undefined;
|
|
1327
|
-
'@stylistic/ts/indent'?: undefined;
|
|
1328
|
-
'@stylistic/ts/key-spacing'?: undefined;
|
|
1329
|
-
'@stylistic/ts/keyword-spacing'?: undefined;
|
|
1330
|
-
'@stylistic/ts/object-curly-spacing'?: undefined;
|
|
1331
|
-
'@stylistic/ts/quote-props'?: undefined;
|
|
1332
|
-
'@stylistic/ts/quotes'?: undefined;
|
|
1333
|
-
'@stylistic/ts/semi'?: undefined;
|
|
1334
|
-
'@stylistic/ts/space-before-blocks'?: undefined;
|
|
1335
|
-
'@stylistic/ts/space-before-function-paren'?: undefined;
|
|
1336
|
-
'@stylistic/ts/space-infix-ops'?: undefined;
|
|
1337
1265
|
};
|
|
1338
1266
|
languageOptions?: undefined;
|
|
1339
1267
|
plugins?: undefined;
|
|
@@ -1341,16 +1269,12 @@ declare const _default: ({
|
|
|
1341
1269
|
files: string[];
|
|
1342
1270
|
languageOptions: {
|
|
1343
1271
|
parserOptions: {
|
|
1344
|
-
parser:
|
|
1345
|
-
meta?: { [K in keyof import("@typescript-eslint/utils/ts-eslint").Parser.ParserMeta]?: import("@typescript-eslint/utils/ts-eslint").Parser.ParserMeta[K] | undefined; };
|
|
1346
|
-
parseForESLint(text: string, options?: unknown): { [k in keyof import("@typescript-eslint/utils/ts-eslint").Parser.ParseResult]: unknown; };
|
|
1347
|
-
};
|
|
1272
|
+
parser: import("@typescript-eslint/utils/ts-eslint").Parser.LooseParserModule;
|
|
1348
1273
|
};
|
|
1349
1274
|
};
|
|
1350
1275
|
rules: {
|
|
1351
|
-
'@stylistic/
|
|
1352
|
-
'@stylistic/
|
|
1353
|
-
'@stylistic/ts/indent': string;
|
|
1276
|
+
'@stylistic/indent': string;
|
|
1277
|
+
'@stylistic/object-curly-spacing': string;
|
|
1354
1278
|
'tailwindcss/no-custom-classname': string;
|
|
1355
1279
|
'vue/attributes-order': (string | {
|
|
1356
1280
|
alphabetical: boolean;
|
|
@@ -14,9 +14,8 @@ export default [
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
rules: {
|
|
17
|
-
"@stylistic/
|
|
18
|
-
"@stylistic/
|
|
19
|
-
"@stylistic/ts/indent": "off",
|
|
17
|
+
"@stylistic/indent": "off",
|
|
18
|
+
"@stylistic/object-curly-spacing": "off",
|
|
20
19
|
"tailwindcss/no-custom-classname": "error",
|
|
21
20
|
"vue/attributes-order": ["error", {
|
|
22
21
|
alphabetical: true
|
package/dist/module.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A composable that provides a reactive reference to a value stored in localStorage.
|
|
4
|
+
* It handles JSON parsing/stringifying and migration from kebab-case/snake_case keys to camelCase.
|
|
5
5
|
*
|
|
6
|
-
* @param key
|
|
7
|
-
* @param defaultValue
|
|
8
|
-
* @returns
|
|
6
|
+
* @param key The key to use in localStorage. Throws an error if not camelCase.
|
|
7
|
+
* @param defaultValue An optional default value to use if the key is not found in localStorage.
|
|
8
|
+
* @returns A reactive reference (`Ref`) containing the value from localStorage or the default value.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* const
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* const userSetting = useLocalStorage('userSetting', { theme: 'light' });
|
|
12
|
+
* console.log(userSetting.value); // Output: { theme: 'light' }
|
|
13
|
+
* console.log(localStorage.userSetting); // Output: '{"theme":"light"}'
|
|
14
|
+
*
|
|
15
|
+
* const sameUserSetting = useLocalStorage('userSetting');
|
|
16
|
+
* console.log(sameUserSetting.value); // Output: { theme: 'light' }
|
|
17
|
+
*
|
|
18
|
+
* userSetting.value = { theme: 'dark', notifications: true };
|
|
19
|
+
* console.log(sameUserSetting.value); // Output: { theme: 'dark', notifications: true }
|
|
20
|
+
* console.log(localStorage.userSetting); // Output: '{"theme":"dark","notifications":true}'
|
|
15
21
|
*/
|
|
16
22
|
export declare const useLocalStorage: <T>(key: string, defaultValue?: T) => Ref<undefined | T>;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Creates a deep duplicate of an object, array, or Set.
|
|
3
|
+
* It handles nested objects, arrays, and Sets but does not handle functions, Dates, or circular references.
|
|
4
|
+
*
|
|
5
|
+
* @param object The object, array, or Set to duplicate.
|
|
6
|
+
* @returns A deep copy of the input object.
|
|
3
7
|
*
|
|
4
8
|
* @example
|
|
5
|
-
* const
|
|
6
|
-
* const
|
|
7
|
-
*
|
|
9
|
+
* const originalObject = { a: 1, b: { c: 2, d: [3, 4] }, e: new Set([5, 6]) };
|
|
10
|
+
* const duplicatedObject = deepDup(originalObject);
|
|
11
|
+
*
|
|
12
|
+
* console.log(duplicatedObject); // Output: { a: 1, b: { c: 2, d: [3, 4] }, e: Set { 5, 6 } }
|
|
13
|
+
* console.log(originalObject === duplicatedObject); // Output: false
|
|
14
|
+
* console.log(originalObject.b === duplicatedObject.b); // Output: false
|
|
15
|
+
* console.log(originalObject.b.d === duplicatedObject.b.d); // Output: false
|
|
16
|
+
* console.log(originalObject.e === duplicatedObject.e); // Output: false
|
|
8
17
|
*/
|
|
9
18
|
export declare const deepDup: <T extends object>(object: T) => T;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Checks if two objects are the same by comparing their JSON stringified representations.
|
|
3
|
+
* Note: This method has limitations and may not accurately compare objects with different key orders, non-primitive values like functions or Dates, or circular references.
|
|
4
|
+
*
|
|
5
|
+
* @param a The first object to compare.
|
|
6
|
+
* @param b The second object to compare.
|
|
7
|
+
* @returns True if the JSON stringified representations of the objects are identical, false otherwise.
|
|
3
8
|
*
|
|
4
9
|
* @example
|
|
5
|
-
*
|
|
6
|
-
*
|
|
10
|
+
* const obj1 = { a: 1, b: 2 };
|
|
11
|
+
* const obj2 = { a: 1, b: 2 };
|
|
12
|
+
* const obj3 = { b: 2, a: 1 };
|
|
13
|
+
*
|
|
14
|
+
* console.log(isSame(obj1, obj2)); // Output: true
|
|
15
|
+
* console.log(isSame(obj1, obj3)); // Output: false (due to key order difference in JSON stringification)
|
|
7
16
|
*/
|
|
8
17
|
export declare const isSame: (a: object, b: object) => boolean;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Creates a new object by omitting the specified keys from the input record.
|
|
3
|
+
*
|
|
4
|
+
* @param record The input record from which to omit keys.
|
|
5
|
+
* @param keys An array of keys to omit.
|
|
6
|
+
* @returns A new object with the specified keys removed.
|
|
3
7
|
*
|
|
4
8
|
* @example
|
|
5
|
-
* const
|
|
6
|
-
* const
|
|
7
|
-
*
|
|
9
|
+
* const myObject = { a: 1, b: 2, c: 3, d: 4 };
|
|
10
|
+
* const omittedObject = omit(myObject, ['b', 'd']);
|
|
11
|
+
*
|
|
12
|
+
* console.log(omittedObject); // Output: { a: 1, c: 3 }
|
|
8
13
|
*/
|
|
9
14
|
export declare const omit: <T extends Record<string, unknown>, K extends (keyof T)[]>(record: T, keys: K) => Omit<T, K[number]>;
|