@leexi/shared 0.1.1 → 0.2.0
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/composables/index.d.ts +1 -0
- package/dist/composables/index.js +1 -0
- package/dist/composables/useLocalStorage.d.ts +15 -0
- package/dist/composables/useLocalStorage.js +27 -0
- package/dist/eslint/base.d.ts +1279 -0
- package/dist/eslint/base.js +110 -0
- package/dist/eslint/vue.d.ts +1306 -0
- package/dist/eslint/vue.js +43 -0
- package/dist/module.d.ts +8 -0
- package/dist/module.js +36 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/objects/deepDup.d.ts +12 -0
- package/dist/utils/objects/deepDup.js +28 -0
- package/dist/utils/objects/index.js +2 -0
- package/dist/utils/objects/isSame.d.ts +12 -0
- package/{src → dist}/utils/objects/isSame.js +3 -3
- package/package.json +26 -8
- package/src/composables/index.js +0 -1
- package/src/composables/useLocalStorage.js +0 -30
- package/src/eslint/base.js +0 -117
- package/src/eslint/vue.js +0 -49
- package/src/module.js +0 -33
- package/src/utils/objects/deepDup.js +0 -31
- /package/{src/utils/index.js → dist/utils/index.d.ts} +0 -0
- /package/{src/utils/objects/index.js → dist/utils/objects/index.d.ts} +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
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-unused-vars': ['error', {
|
|
29
|
+
argsIgnorePattern: '^_',
|
|
30
|
+
destructuredArrayIgnorePattern: '^_',
|
|
31
|
+
ignoreRestSiblings: true,
|
|
32
|
+
}],
|
|
33
|
+
'prefer-const': ['error', {
|
|
34
|
+
destructuring: 'all',
|
|
35
|
+
}],
|
|
36
|
+
'prefer-template': 'error',
|
|
37
|
+
'@stylistic/js/array-bracket-spacing': ['error', 'never'],
|
|
38
|
+
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
|
|
39
|
+
'@stylistic/js/comma-spacing': 'error',
|
|
40
|
+
'@stylistic/js/eol-last': ['error', 'always'],
|
|
41
|
+
'@stylistic/js/indent': ['error', 2, {
|
|
42
|
+
SwitchCase: 1,
|
|
43
|
+
}],
|
|
44
|
+
'@stylistic/js/key-spacing': 'error',
|
|
45
|
+
'@stylistic/js/keyword-spacing': 'error',
|
|
46
|
+
'@stylistic/js/no-multi-spaces': 'error',
|
|
47
|
+
'@stylistic/js/no-multiple-empty-lines': ['error', {
|
|
48
|
+
max: 1,
|
|
49
|
+
}],
|
|
50
|
+
'@stylistic/js/no-trailing-spaces': 'error',
|
|
51
|
+
'@stylistic/js/object-curly-spacing': ['error', 'always'],
|
|
52
|
+
'@stylistic/js/quotes': ['error', 'single'],
|
|
53
|
+
'@stylistic/js/quote-props': ['error', 'consistent-as-needed'],
|
|
54
|
+
'@stylistic/js/semi': ['error', 'always'],
|
|
55
|
+
'@stylistic/js/semi-spacing': 'error',
|
|
56
|
+
'@stylistic/js/space-before-blocks': ['error', 'always'],
|
|
57
|
+
'@stylistic/js/space-before-function-paren': ['error', 'always'],
|
|
58
|
+
'@stylistic/js/space-in-parens': ['error', 'never'],
|
|
59
|
+
'@stylistic/js/space-infix-ops': 'error',
|
|
60
|
+
'@stylistic/js/spaced-comment': 'error',
|
|
61
|
+
'@stylistic/js/template-curly-spacing': ['error', 'never'],
|
|
62
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
63
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
64
|
+
argsIgnorePattern: '^_',
|
|
65
|
+
destructuredArrayIgnorePattern: '^_',
|
|
66
|
+
ignoreRestSiblings: true,
|
|
67
|
+
}],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
// typescript
|
|
71
|
+
{
|
|
72
|
+
files: ['**/*.ts'],
|
|
73
|
+
plugins: {
|
|
74
|
+
'@stylistic/ts': stylisticTS,
|
|
75
|
+
},
|
|
76
|
+
rules: {
|
|
77
|
+
'@stylistic/js/comma-dangle': 'off',
|
|
78
|
+
'@stylistic/js/comma-spacing': 'off',
|
|
79
|
+
'@stylistic/js/indent': 'off',
|
|
80
|
+
'@stylistic/js/key-spacing': 'off',
|
|
81
|
+
'@stylistic/js/keyword-spacing': 'off',
|
|
82
|
+
'@stylistic/js/object-curly-spacing': 'off',
|
|
83
|
+
'@stylistic/js/quotes': 'off',
|
|
84
|
+
'@stylistic/js/quote-props': 'off',
|
|
85
|
+
'@stylistic/js/semi': 'off',
|
|
86
|
+
'@stylistic/js/space-before-blocks': 'off',
|
|
87
|
+
'@stylistic/js/space-before-function-paren': 'off',
|
|
88
|
+
'@stylistic/js/space-infix-ops': 'off',
|
|
89
|
+
'@stylistic/ts/comma-dangle': ['error', 'always-multiline'],
|
|
90
|
+
'@stylistic/ts/comma-spacing': 'error',
|
|
91
|
+
'@stylistic/ts/indent': ['error', 2, {
|
|
92
|
+
SwitchCase: 1,
|
|
93
|
+
}],
|
|
94
|
+
'@stylistic/ts/key-spacing': 'error',
|
|
95
|
+
'@stylistic/ts/keyword-spacing': 'error',
|
|
96
|
+
'@stylistic/ts/object-curly-spacing': ['error', 'always'],
|
|
97
|
+
'@stylistic/ts/quotes': ['error', 'single'],
|
|
98
|
+
'@stylistic/ts/quote-props': ['error', 'consistent-as-needed'],
|
|
99
|
+
'@stylistic/ts/semi': ['error', 'always'],
|
|
100
|
+
'@stylistic/ts/space-before-blocks': ['error', 'always'],
|
|
101
|
+
'@stylistic/ts/space-before-function-paren': ['error', 'always'],
|
|
102
|
+
'@stylistic/ts/space-infix-ops': 'error',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
ignores: [
|
|
107
|
+
'node_modules/',
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
];
|