@leexi/shared 0.3.0 → 0.3.1
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/eslint/base.eslint.config.d.ts +1341 -0
- package/dist/eslint/base.eslint.config.mjs +123 -0
- package/dist/eslint/vue.eslint.config.d.ts +1375 -0
- package/dist/eslint/vue.eslint.config.mjs +48 -0
- package/dist/module.d.mts +11 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +34 -13
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/useLocalStorage.d.ts +16 -0
- package/dist/runtime/composables/useLocalStorage.js +12 -0
- package/dist/runtime/utils/index.d.ts +3 -0
- package/dist/runtime/utils/index.js +3 -0
- package/dist/runtime/utils/objects/deepDup.d.ts +9 -0
- package/dist/runtime/utils/objects/deepDup.js +17 -0
- package/dist/runtime/utils/objects/index.d.ts +2 -0
- package/dist/runtime/utils/objects/index.js +2 -0
- package/dist/runtime/utils/objects/isSame.d.ts +8 -0
- package/dist/runtime/utils/objects/isSame.js +1 -0
- package/dist/runtime/utils/records/index.d.ts +1 -0
- package/dist/runtime/utils/records/index.js +1 -0
- package/dist/runtime/utils/records/set.d.ts +19 -0
- package/dist/runtime/utils/records/set.js +5 -0
- package/dist/runtime/utils/strings/capitalize.d.ts +7 -0
- package/dist/runtime/utils/strings/capitalize.js +1 -0
- package/dist/runtime/utils/strings/index.d.ts +1 -0
- package/dist/runtime/utils/strings/index.js +1 -0
- package/dist/types.d.mts +4 -10
- package/package.json +6 -4
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import stylisticJS from "@stylistic/eslint-plugin-js";
|
|
3
|
+
import stylisticTS from "@stylistic/eslint-plugin-ts";
|
|
4
|
+
import globals from "globals";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
export default [
|
|
7
|
+
js.configs.recommended,
|
|
8
|
+
...tseslint.configs.recommended,
|
|
9
|
+
// base config
|
|
10
|
+
{
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: {
|
|
13
|
+
...globals.browser,
|
|
14
|
+
...globals.node
|
|
15
|
+
},
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaVersion: "latest",
|
|
18
|
+
sourceType: "module"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
plugins: {
|
|
22
|
+
"@stylistic/js": stylisticJS
|
|
23
|
+
},
|
|
24
|
+
rules: {
|
|
25
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
26
|
+
"eqeqeq": ["error", "smart"],
|
|
27
|
+
"no-console": "error",
|
|
28
|
+
"no-nested-ternary": "error",
|
|
29
|
+
"no-unused-vars": ["error", {
|
|
30
|
+
argsIgnorePattern: "^_",
|
|
31
|
+
destructuredArrayIgnorePattern: "^_",
|
|
32
|
+
ignoreRestSiblings: true
|
|
33
|
+
}],
|
|
34
|
+
"prefer-const": ["error", {
|
|
35
|
+
destructuring: "all"
|
|
36
|
+
}],
|
|
37
|
+
"prefer-template": "error",
|
|
38
|
+
"@stylistic/js/array-bracket-spacing": ["error", "never"],
|
|
39
|
+
"@stylistic/js/arrow-parens": ["error", "as-needed"],
|
|
40
|
+
"@stylistic/js/comma-dangle": ["error", "always-multiline"],
|
|
41
|
+
"@stylistic/js/comma-spacing": "error",
|
|
42
|
+
"@stylistic/js/eol-last": ["error", "always"],
|
|
43
|
+
"@stylistic/js/indent": ["error", 2, {
|
|
44
|
+
SwitchCase: 1
|
|
45
|
+
}],
|
|
46
|
+
"@stylistic/js/key-spacing": "error",
|
|
47
|
+
"@stylistic/js/keyword-spacing": "error",
|
|
48
|
+
"@stylistic/js/multiline-ternary": ["error", "never"],
|
|
49
|
+
"@stylistic/js/no-multi-spaces": "error",
|
|
50
|
+
"@stylistic/js/no-multiple-empty-lines": ["error", {
|
|
51
|
+
max: 1
|
|
52
|
+
}],
|
|
53
|
+
"@stylistic/js/no-trailing-spaces": "error",
|
|
54
|
+
"@stylistic/js/object-curly-spacing": ["error", "always"],
|
|
55
|
+
"@stylistic/js/quote-props": ["error", "consistent-as-needed"],
|
|
56
|
+
"@stylistic/js/quotes": ["error", "single"],
|
|
57
|
+
"@stylistic/js/semi": ["error", "always"],
|
|
58
|
+
"@stylistic/js/semi-spacing": "error",
|
|
59
|
+
"@stylistic/js/space-before-blocks": ["error", "always"],
|
|
60
|
+
"@stylistic/js/space-before-function-paren": ["error", "always"],
|
|
61
|
+
"@stylistic/js/space-in-parens": ["error", "never"],
|
|
62
|
+
"@stylistic/js/space-infix-ops": "error",
|
|
63
|
+
"@stylistic/js/spaced-comment": "error",
|
|
64
|
+
"@stylistic/js/template-curly-spacing": ["error", "never"],
|
|
65
|
+
"@typescript-eslint/no-unused-expressions": "off",
|
|
66
|
+
"@typescript-eslint/no-unused-vars": ["error", {
|
|
67
|
+
argsIgnorePattern: "^_",
|
|
68
|
+
destructuredArrayIgnorePattern: "^_",
|
|
69
|
+
ignoreRestSiblings: true
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
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
|
+
// sort-keys
|
|
109
|
+
{
|
|
110
|
+
files: ["**/*.config.{js,ts}", "**/locales/**/*.js"],
|
|
111
|
+
rules: {
|
|
112
|
+
"sort-keys": ["error", "asc", {
|
|
113
|
+
allowLineSeparatedGroups: true,
|
|
114
|
+
natural: true
|
|
115
|
+
}]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
ignores: [
|
|
120
|
+
"node_modules/"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
];
|