@lvce-editor/eslint-config 1.7.0 → 1.9.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/index.d.ts +6 -1
- package/index.js +27 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
declare const config: readonly any[]
|
|
1
|
+
declare const config: readonly any[] & {}
|
|
2
|
+
declare const recommendedNode: readonly any[] & {}
|
|
3
|
+
declare const recommendedFolderStructure: readonly any[] & {}
|
|
4
|
+
|
|
5
|
+
export { recommendedNode }
|
|
6
|
+
export { recommendedFolderStructure }
|
|
2
7
|
|
|
3
8
|
export default config
|
package/index.js
CHANGED
|
@@ -38,13 +38,16 @@ const fileCompositionConfig = createFileComposition({
|
|
|
38
38
|
filesRules: [
|
|
39
39
|
{
|
|
40
40
|
filePattern: '**/*.ts',
|
|
41
|
-
rootSelectorsLimits: [{ selector: ['interface', 'type', 'function', '
|
|
41
|
+
rootSelectorsLimits: [{ selector: ['interface', 'type', 'function', 'arrowFunction', 'class'], limit: 1 }],
|
|
42
42
|
rules: [],
|
|
43
43
|
},
|
|
44
44
|
],
|
|
45
45
|
})
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @type {any}
|
|
49
|
+
*/
|
|
50
|
+
const defaultConfig = tseslint.config(
|
|
48
51
|
eslint.configs.recommended,
|
|
49
52
|
...tseslint.configs.recommendedTypeChecked,
|
|
50
53
|
{
|
|
@@ -55,7 +58,6 @@ export default tseslint.config(
|
|
|
55
58
|
},
|
|
56
59
|
},
|
|
57
60
|
},
|
|
58
|
-
nodePlugin.configs['flat/recommended'],
|
|
59
61
|
{
|
|
60
62
|
ignores: [
|
|
61
63
|
'dist',
|
|
@@ -86,11 +88,6 @@ export default tseslint.config(
|
|
|
86
88
|
'prefer-destructuring': ['error', { object: true, array: false }],
|
|
87
89
|
},
|
|
88
90
|
},
|
|
89
|
-
{
|
|
90
|
-
rules: {
|
|
91
|
-
'n/prefer-node-protocol': 'error',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
91
|
{
|
|
95
92
|
rules: {
|
|
96
93
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
@@ -105,11 +102,6 @@ export default tseslint.config(
|
|
|
105
102
|
'@typescript-eslint/require-await': 'off',
|
|
106
103
|
},
|
|
107
104
|
},
|
|
108
|
-
{
|
|
109
|
-
rules: {
|
|
110
|
-
'n/no-unpublished-import': 'off', // TODO enable this for some node packages, which don't bundle dependencies
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
105
|
{
|
|
114
106
|
plugins: {
|
|
115
107
|
perfectionist,
|
|
@@ -125,6 +117,25 @@ export default tseslint.config(
|
|
|
125
117
|
],
|
|
126
118
|
},
|
|
127
119
|
},
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @type {any}
|
|
124
|
+
*/
|
|
125
|
+
export const recommendedNode = [
|
|
126
|
+
nodePlugin.configs['flat/recommended'],
|
|
127
|
+
{
|
|
128
|
+
rules: {
|
|
129
|
+
'n/prefer-node-protocol': 'error',
|
|
130
|
+
'n/no-unpublished-import': 'off', // TODO enable this for some node packages, which don't bundle dependencies
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @type {any}
|
|
137
|
+
*/
|
|
138
|
+
export const recommendedFolderStructucture = [
|
|
128
139
|
{
|
|
129
140
|
files: ['src/**/*.ts'],
|
|
130
141
|
plugins: {
|
|
@@ -141,4 +152,6 @@ export default tseslint.config(
|
|
|
141
152
|
'project-structure/cache-location': join(root, '.tmp'),
|
|
142
153
|
},
|
|
143
154
|
},
|
|
144
|
-
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
export default defaultConfig
|