easy-soft-develop 2.1.120 → 2.1.126
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/package.json +1 -1
- package/src/templates/babel.config.template.js +22 -1
- package/src/templates/eslint.template.js +22 -1
- package/src/tools/initial.environment.js +3 -3
- package/src/tools/package.tools.js +5 -2
- package/src/tools/package.update.js +3 -3
- package/types/templates/babel.config.template.d.ts +1 -1
- package/types/templates/eslint.template.d.ts +131 -131
- package/types/tools/package.tools.d.ts +10 -2
package/package.json
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
+
const { isArray } = require('../tools/meta');
|
|
2
|
+
const {
|
|
3
|
+
getDevelopSubPathVersionNcuConfig,
|
|
4
|
+
} = require('../config/develop.subPath.version.ncu');
|
|
1
5
|
const { fileGlobalHeader } = require('./template.config');
|
|
2
6
|
|
|
3
7
|
const folderPath = '.';
|
|
4
8
|
|
|
9
|
+
const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
|
|
10
|
+
|
|
11
|
+
const { paths = [] } = {
|
|
12
|
+
paths: [],
|
|
13
|
+
...developSubPathVersionNcuConfig,
|
|
14
|
+
};
|
|
15
|
+
|
|
5
16
|
const contentFileContent = `${fileGlobalHeader}
|
|
6
17
|
function buildConfig(api) {
|
|
7
18
|
api.cache(true);
|
|
8
19
|
|
|
9
20
|
return {
|
|
10
|
-
babelrcRoots: ['.'
|
|
21
|
+
babelrcRoots: ['.'${
|
|
22
|
+
!isArray(paths)
|
|
23
|
+
? ''
|
|
24
|
+
: paths.length === 0
|
|
25
|
+
? ''
|
|
26
|
+
: `, ${paths
|
|
27
|
+
.map((o) => {
|
|
28
|
+
return `${o}/*`;
|
|
29
|
+
})
|
|
30
|
+
.join(',')}`
|
|
31
|
+
}],
|
|
11
32
|
};
|
|
12
33
|
}
|
|
13
34
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
getDevelopSubPathVersionNcuConfig,
|
|
3
|
+
} = require('../config/develop.subPath.version.ncu');
|
|
1
4
|
const { fileGlobalHeader } = require('./template.config');
|
|
5
|
+
const { isArray } = require('../tools/meta');
|
|
2
6
|
|
|
3
7
|
const folderPath = './develop/config/eslint';
|
|
4
8
|
|
|
@@ -270,6 +274,13 @@ const ruleFile = {
|
|
|
270
274
|
fileContent: ruleFileContent,
|
|
271
275
|
};
|
|
272
276
|
|
|
277
|
+
const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
|
|
278
|
+
|
|
279
|
+
const { paths = [] } = {
|
|
280
|
+
paths: [],
|
|
281
|
+
...developSubPathVersionNcuConfig,
|
|
282
|
+
};
|
|
283
|
+
|
|
273
284
|
const settingEmbedFileContent = `${fileGlobalHeader}
|
|
274
285
|
const items = {
|
|
275
286
|
'import/parsers': {
|
|
@@ -285,7 +296,17 @@ const items = {
|
|
|
285
296
|
alwaysTryTypes: true,
|
|
286
297
|
|
|
287
298
|
// use an array of glob patterns
|
|
288
|
-
directory: ['./tsconfig.json'
|
|
299
|
+
directory: ['./tsconfig.json'${
|
|
300
|
+
!isArray(paths)
|
|
301
|
+
? ''
|
|
302
|
+
: paths.length === 0
|
|
303
|
+
? ''
|
|
304
|
+
: `, ${paths
|
|
305
|
+
.map((o) => {
|
|
306
|
+
return `./${o}/*/tsconfig.json`;
|
|
307
|
+
})
|
|
308
|
+
.join(',')}`
|
|
309
|
+
}],
|
|
289
310
|
},
|
|
290
311
|
},
|
|
291
312
|
};
|
|
@@ -103,15 +103,15 @@ function adjustMainPackageJsonScript({ scripts }) {
|
|
|
103
103
|
const testScript = {};
|
|
104
104
|
const testAllProjects = [];
|
|
105
105
|
|
|
106
|
-
loopPackage(({ name }) => {
|
|
106
|
+
loopPackage(({ name, path }) => {
|
|
107
107
|
publishPackageNameList.push(name);
|
|
108
108
|
|
|
109
109
|
autoAdjustFileScript[`z:auto:adjust:file:${name}`] =
|
|
110
|
-
`cd
|
|
110
|
+
`cd ${path}/${name} && npm run z:auto:adjust:file`;
|
|
111
111
|
|
|
112
112
|
autoAdjustFileAllProjects.push(`npm run z:auto:adjust:file:${name}`);
|
|
113
113
|
|
|
114
|
-
testScript[`test:${name}`] = `cd
|
|
114
|
+
testScript[`test:${name}`] = `cd ${path}/${name} && npm run z:test`;
|
|
115
115
|
|
|
116
116
|
testAllProjects.push(`npm run test:${name}`);
|
|
117
117
|
});
|
|
@@ -8,8 +8,10 @@ const {
|
|
|
8
8
|
/**
|
|
9
9
|
* loop all package
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
function loopPackage(
|
|
12
|
+
// eslint-disable-next-line no-unused-vars
|
|
13
|
+
callback = ({ name, path, absolutePath, relativePath }) => {},
|
|
14
|
+
) {
|
|
13
15
|
const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
|
|
14
16
|
|
|
15
17
|
const { paths = [] } = {
|
|
@@ -42,6 +44,7 @@ function loopPackage(callback = ({ name, absolutePath, relativePath }) => {}) {
|
|
|
42
44
|
if (file && fs.lstatSync(itemPath).isDirectory()) {
|
|
43
45
|
callback({
|
|
44
46
|
name: file,
|
|
47
|
+
path: pathItem,
|
|
45
48
|
absolutePath: itemPath,
|
|
46
49
|
relativePath: `./${pathItem}/${file}`,
|
|
47
50
|
});
|
|
@@ -8,12 +8,12 @@ function adjustMainPackageJsonByCommand(cmd) {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function adjustChildrenPackageJsonByCommand(cmd) {
|
|
11
|
-
loopPackage(({ name }) => {
|
|
12
|
-
const commandString = `cd
|
|
11
|
+
loopPackage(({ name, path }) => {
|
|
12
|
+
const commandString = `cd ./${path}/${name} && ${cmd}`;
|
|
13
13
|
|
|
14
14
|
promptInfo(`update child command: ${commandString}`);
|
|
15
15
|
|
|
16
|
-
exec(`cd
|
|
16
|
+
exec(`cd ./${path}/${name} && ${cmd}`);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -4,5 +4,5 @@ export namespace contentFile {
|
|
|
4
4
|
export let coverFile: boolean;
|
|
5
5
|
export { contentFileContent as fileContent };
|
|
6
6
|
}
|
|
7
|
-
declare const contentFileContent:
|
|
7
|
+
declare const contentFileContent: string;
|
|
8
8
|
export {};
|
|
@@ -1,178 +1,178 @@
|
|
|
1
1
|
export namespace ignoreFile {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export let folderPath: string;
|
|
3
|
+
export let fileName: string;
|
|
4
|
+
export let coverFile: boolean;
|
|
5
|
+
export { ignoreFileContent as fileContent };
|
|
6
6
|
}
|
|
7
7
|
export namespace contentFile {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
let folderPath_1: string;
|
|
9
|
+
export { folderPath_1 as folderPath };
|
|
10
|
+
let fileName_1: string;
|
|
11
|
+
export { fileName_1 as fileName };
|
|
12
|
+
let coverFile_1: boolean;
|
|
13
|
+
export { coverFile_1 as coverFile };
|
|
14
|
+
export { contentFileContent as fileContent };
|
|
15
15
|
}
|
|
16
16
|
export namespace ruleEmbedFile {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
let folderPath_2: string;
|
|
18
|
+
export { folderPath_2 as folderPath };
|
|
19
|
+
let fileName_2: string;
|
|
20
|
+
export { fileName_2 as fileName };
|
|
21
|
+
let coverFile_2: boolean;
|
|
22
|
+
export { coverFile_2 as coverFile };
|
|
23
|
+
export { ruleEmbedFileContent as fileContent };
|
|
24
24
|
}
|
|
25
25
|
export namespace ruleCustomFile {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
let folderPath_3: string;
|
|
27
|
+
export { folderPath_3 as folderPath };
|
|
28
|
+
let fileName_3: string;
|
|
29
|
+
export { fileName_3 as fileName };
|
|
30
|
+
let coverFile_3: boolean;
|
|
31
|
+
export { coverFile_3 as coverFile };
|
|
32
|
+
export { ruleCustomFileContent as fileContent };
|
|
33
33
|
}
|
|
34
34
|
export namespace ruleFile {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
let folderPath_4: string;
|
|
36
|
+
export { folderPath_4 as folderPath };
|
|
37
|
+
let fileName_4: string;
|
|
38
|
+
export { fileName_4 as fileName };
|
|
39
|
+
let coverFile_4: boolean;
|
|
40
|
+
export { coverFile_4 as coverFile };
|
|
41
|
+
export { ruleFileContent as fileContent };
|
|
42
42
|
}
|
|
43
43
|
export namespace configFile {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
let folderPath_5: string;
|
|
45
|
+
export { folderPath_5 as folderPath };
|
|
46
|
+
let fileName_5: string;
|
|
47
|
+
export { fileName_5 as fileName };
|
|
48
|
+
let coverFile_5: boolean;
|
|
49
|
+
export { coverFile_5 as coverFile };
|
|
50
|
+
export { configFileContent as fileContent };
|
|
51
51
|
}
|
|
52
52
|
export namespace extendEmbedFile {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
let folderPath_6: string;
|
|
54
|
+
export { folderPath_6 as folderPath };
|
|
55
|
+
let fileName_6: string;
|
|
56
|
+
export { fileName_6 as fileName };
|
|
57
|
+
let coverFile_6: boolean;
|
|
58
|
+
export { coverFile_6 as coverFile };
|
|
59
|
+
export { extendEmbedFileContent as fileContent };
|
|
60
60
|
}
|
|
61
61
|
export namespace extendCustomFile {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
let folderPath_7: string;
|
|
63
|
+
export { folderPath_7 as folderPath };
|
|
64
|
+
let fileName_7: string;
|
|
65
|
+
export { fileName_7 as fileName };
|
|
66
|
+
let coverFile_7: boolean;
|
|
67
|
+
export { coverFile_7 as coverFile };
|
|
68
|
+
export { extendCustomFileContent as fileContent };
|
|
69
69
|
}
|
|
70
70
|
export namespace extendFile {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
let folderPath_8: string;
|
|
72
|
+
export { folderPath_8 as folderPath };
|
|
73
|
+
let fileName_8: string;
|
|
74
|
+
export { fileName_8 as fileName };
|
|
75
|
+
let coverFile_8: boolean;
|
|
76
|
+
export { coverFile_8 as coverFile };
|
|
77
|
+
export { extendFileContent as fileContent };
|
|
78
78
|
}
|
|
79
79
|
export namespace pluginEmbedFile {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
let folderPath_9: string;
|
|
81
|
+
export { folderPath_9 as folderPath };
|
|
82
|
+
let fileName_9: string;
|
|
83
|
+
export { fileName_9 as fileName };
|
|
84
|
+
let coverFile_9: boolean;
|
|
85
|
+
export { coverFile_9 as coverFile };
|
|
86
|
+
export { pluginEmbedFileContent as fileContent };
|
|
87
87
|
}
|
|
88
88
|
export namespace pluginCustomFile {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
let folderPath_10: string;
|
|
90
|
+
export { folderPath_10 as folderPath };
|
|
91
|
+
let fileName_10: string;
|
|
92
|
+
export { fileName_10 as fileName };
|
|
93
|
+
let coverFile_10: boolean;
|
|
94
|
+
export { coverFile_10 as coverFile };
|
|
95
|
+
export { pluginCustomFileContent as fileContent };
|
|
96
96
|
}
|
|
97
97
|
export namespace pluginFile {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
let folderPath_11: string;
|
|
99
|
+
export { folderPath_11 as folderPath };
|
|
100
|
+
let fileName_11: string;
|
|
101
|
+
export { fileName_11 as fileName };
|
|
102
|
+
let coverFile_11: boolean;
|
|
103
|
+
export { coverFile_11 as coverFile };
|
|
104
|
+
export { pluginFileContent as fileContent };
|
|
105
105
|
}
|
|
106
106
|
export namespace parserEmbedFile {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
let folderPath_12: string;
|
|
108
|
+
export { folderPath_12 as folderPath };
|
|
109
|
+
let fileName_12: string;
|
|
110
|
+
export { fileName_12 as fileName };
|
|
111
|
+
let coverFile_12: boolean;
|
|
112
|
+
export { coverFile_12 as coverFile };
|
|
113
|
+
export { parserEmbedFileContent as fileContent };
|
|
114
114
|
}
|
|
115
115
|
export namespace parserCustomFile {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
let folderPath_13: string;
|
|
117
|
+
export { folderPath_13 as folderPath };
|
|
118
|
+
let fileName_13: string;
|
|
119
|
+
export { fileName_13 as fileName };
|
|
120
|
+
let coverFile_13: boolean;
|
|
121
|
+
export { coverFile_13 as coverFile };
|
|
122
|
+
export { parserCustomFileContent as fileContent };
|
|
123
123
|
}
|
|
124
124
|
export namespace parserFile {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
let folderPath_14: string;
|
|
126
|
+
export { folderPath_14 as folderPath };
|
|
127
|
+
let fileName_14: string;
|
|
128
|
+
export { fileName_14 as fileName };
|
|
129
|
+
let coverFile_14: boolean;
|
|
130
|
+
export { coverFile_14 as coverFile };
|
|
131
|
+
export { parserFileContent as fileContent };
|
|
132
132
|
}
|
|
133
133
|
export namespace settingEmbedFile {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
let folderPath_15: string;
|
|
135
|
+
export { folderPath_15 as folderPath };
|
|
136
|
+
let fileName_15: string;
|
|
137
|
+
export { fileName_15 as fileName };
|
|
138
|
+
let coverFile_15: boolean;
|
|
139
|
+
export { coverFile_15 as coverFile };
|
|
140
|
+
export { settingEmbedFileContent as fileContent };
|
|
141
141
|
}
|
|
142
142
|
export namespace settingCustomFile {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
let folderPath_16: string;
|
|
144
|
+
export { folderPath_16 as folderPath };
|
|
145
|
+
let fileName_16: string;
|
|
146
|
+
export { fileName_16 as fileName };
|
|
147
|
+
let coverFile_16: boolean;
|
|
148
|
+
export { coverFile_16 as coverFile };
|
|
149
|
+
export { settingCustomFileContent as fileContent };
|
|
150
150
|
}
|
|
151
151
|
export namespace settingFile {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
declare const ignoreFileContent:
|
|
152
|
+
let folderPath_17: string;
|
|
153
|
+
export { folderPath_17 as folderPath };
|
|
154
|
+
let fileName_17: string;
|
|
155
|
+
export { fileName_17 as fileName };
|
|
156
|
+
let coverFile_17: boolean;
|
|
157
|
+
export { coverFile_17 as coverFile };
|
|
158
|
+
export { settingFileContent as fileContent };
|
|
159
|
+
}
|
|
160
|
+
declare const ignoreFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst content = `#\n**/public\n**/lib\n**/es\n**/docs\n**/coverage\n**/.history\n**/.vs\n**/.swc\n**/docs\n\n*.d.ts\n*.log\n*.zip\n*.txt\n*.7z\n*.min.js\nrollup.config-*.cjs\n\n.eslintrc.js\n.prettierrc.js\n.stylelintrc.js\n.lintstagedrc\n`;\n\nmodule.exports = {\n content,\n};\n';
|
|
161
161
|
declare const contentFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst mainContent = `/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { generalConfig } = require('./develop/config/eslint/config');\n\nmodule.exports = generalConfig;\n`;\n\nconst packageContent = `/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { generalConfig } = require('../../develop/config/eslint/config');\n\nmodule.exports = generalConfig;\n`;\n\nmodule.exports = {\n mainContent,\n packageContent,\n};";
|
|
162
162
|
declare const ruleEmbedFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst coreRules = {\n camelias: 0,\n 'no-bitwise': 0,\n 'linebreak-style': 0,\n 'generator-star-spacing': 0,\n 'operator-linebreak': 0,\n 'object-curly-newline': 0,\n 'no-use-before-define': 0,\n 'no-nested-ternary': 0,\n 'no-spaced-func': 2,\n 'no-this-before-super': 0,\n 'no-var': 1,\n 'sort-imports': 0,\n 'jsx-quotes': ['error', 'prefer-double'],\n};\n\nconst reactRules = {\n 'react/sort-comp': 0,\n 'react/jsx-uses-react': 2,\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],\n 'react/jsx-wrap-multilines': 0,\n 'react/prop-types': 0,\n 'react/forbid-prop-types': 0,\n 'react/jsx-one-expression-per-line': 0,\n 'react/jsx-props-no-spreading': 0,\n};\n\nconst jsxRules = {\n 'jsx-a11y/no-noninteractive-element-interactions': 0,\n 'jsx-a11y/click-events-have-key-events': 0,\n 'jsx-a11y/no-static-element-interactions': 0,\n 'jsx-a11y/anchor-is-valid': 0,\n};\n\nconst typescriptRules = {\n '@typescript-eslint/no-this-alias': ['off'],\n '@typescript-eslint/no-unused-vars': 0,\n '@typescript-eslint/no-invalid-this': 0,\n};\n\nconst unicornRules = {\n 'unicorn/filename-case': [\n 'error',\n {\n cases: {\n kebabCase: true,\n camelCase: true,\n pascalCase: true,\n snakeCase: true,\n },\n },\n ],\n 'unicorn/no-null': 0,\n 'unicorn/no-this-assignment': 0,\n};\n\nconst compatRules = {\n 'compat/compat': 0,\n};\n\nconst importRules = {\n 'import/export': 'error',\n 'import/first': 'error',\n 'import/named': 'error',\n 'import/newline-after-import': 'error',\n 'import/no-absolute-path': 'error',\n // 开启将会极大增加检测执行时间\n 'import/no-cycle': 0,\n 'import/no-deprecated': 'error',\n 'import/no-duplicates': 'error',\n 'import/no-unresolved': 'error',\n 'import/no-useless-path-segments': 'error',\n 'import/no-unused-modules': 'error',\n 'import/order': 0,\n};\n\nconst simpleImportSortRules = {\n 'simple-import-sort/imports': [\n 'error',\n {\n groups: [\n [\n '^(?!taro-fast-)(?!antd-management-fast-)(?!easy-soft-)[a-zA-Z0-9]',\n '^@(?!/)',\n ],\n ['^(?!@/)(?!easy-soft-)(?!.)'],\n ['^easy-soft-'],\n ['^(?!@/)(?!antd-management-fast-)(?!.)'],\n ['^antd-management-fast-'],\n ['^(?!@/)(?!taro-fast-)(?!.)'],\n ['^taro-fast-'],\n ['^((@/).*|$)'],\n ['^\\\\u0000'],\n ['^\\\\.\\\\.(?!/?$)', '^\\\\.\\\\./?$'],\n ['^\\\\./(?=.*/)(?!/?$)', '^\\\\.(?!/?$)', '^\\\\./?$'],\n ['^.+\\\\.s?less$', '^.+\\\\.s?scss$', '^.+\\\\.s?css$'],\n ],\n },\n ],\n 'simple-import-sort/exports': 'error',\n};\n\nmodule.exports = {\n rules: {\n ...coreRules,\n ...reactRules,\n ...jsxRules,\n ...typescriptRules,\n ...unicornRules,\n ...compatRules,\n ...importRules,\n ...simpleImportSortRules,\n },\n};\n";
|
|
163
|
-
declare const ruleCustomFileContent:
|
|
163
|
+
declare const ruleCustomFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst customRules = {};\n\nmodule.exports = {\n rules: {\n ...customRules,\n },\n};\n';
|
|
164
164
|
declare const ruleFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { rules: embedRules } = require('./embed');\nconst { rules: customRules } = require('./custom');\n\nmodule.exports = {\n rules: {\n ...embedRules,\n ...customRules,\n },\n};\n";
|
|
165
165
|
declare const configFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { rules } = require('./items/rules');\nconst { parserJsOptions, parserTsOptions } = require('./items/parser');\nconst { pluginCollection } = require('./items/plugins');\nconst { extendCollection } = require('./items/extends');\nconst { settings } = require('./items/settings');\n\nmodule.exports = {\n generalConfig: {\n extends: [\n ...extendCollection,\n ],\n env: {\n es6: true,\n browser: true,\n commonjs: true,\n jest: true,\n worker: true,\n shelljs: true,\n node: true,\n },\n plugins: [...pluginCollection],\n parser: '@babel/eslint-parser',\n parserOptions: parserJsOptions,\n overrides: [\n {\n files: ['*.ts', '*.tsx'],\n parser: '@typescript-eslint/parser',\n parserOptions: parserTsOptions,\n },\n ],\n rules: rules,\n settings: settings,\n },\n};\n";
|
|
166
166
|
declare const extendEmbedFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst extendCollection = [\n 'eslint:recommended',\n 'plugin:react/recommended',\n 'plugin:unicorn/recommended',\n 'plugin:promise/recommended',\n 'prettier',\n];\n\nmodule.exports = {\n extendCollection: [...extendCollection],\n};\n";
|
|
167
|
-
declare const extendCustomFileContent:
|
|
167
|
+
declare const extendCustomFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst extendCollection = [];\n\nmodule.exports = {\n extendCollection: [...extendCollection],\n};\n';
|
|
168
168
|
declare const extendFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { extendCollection: extendEmbedPlugins } = require('./embed');\nconst { extendCollection: extendCustomPlugins } = require('./custom');\n\nmodule.exports = {\n extendCollection: [...extendEmbedPlugins, ...extendCustomPlugins],\n};\n";
|
|
169
169
|
declare const pluginEmbedFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst plugins = [\n 'unicorn',\n 'simple-import-sort',\n 'import',\n 'prettier',\n];\n\nmodule.exports = {\n pluginCollection: [...plugins],\n};\n";
|
|
170
|
-
declare const pluginCustomFileContent:
|
|
170
|
+
declare const pluginCustomFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst plugins = [];\n\nmodule.exports = {\n pluginCollection: [...plugins],\n};\n';
|
|
171
171
|
declare const pluginFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { pluginCollection: embedPlugins } = require('./embed');\nconst { pluginCollection: customPlugins } = require('./custom');\n\nmodule.exports = {\n pluginCollection: [...embedPlugins, ...customPlugins],\n};\n";
|
|
172
172
|
declare const parserEmbedFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst parserJsOptions = {\n requireConfigFile: false,\n babelOptions: {\n presets: [\n [\n '@babel/preset-react',\n {\n runtime: 'automatic',\n },\n ],\n '@babel/preset-env',\n ],\n plugins: [\n ['@babel/plugin-proposal-decorators', { legacy: true }],\n ['@babel/plugin-transform-class-properties', { loose: true }],\n ],\n },\n};\n\nconst parserTsOptions = {\n ecmaFeatures: {\n jsx: true,\n },\n};\n\nmodule.exports = {\n parserJsOptions: { ...parserJsOptions },\n parserTsOptions: { ...parserTsOptions },\n};\n";
|
|
173
|
-
declare const parserCustomFileContent:
|
|
173
|
+
declare const parserCustomFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst parserJsOptions = {};\n\nconst parserTsOptions = {};\n\nmodule.exports = {\n parserJsOptions: { ...parserJsOptions },\n parserTsOptions: { ...parserTsOptions },\n};\n';
|
|
174
174
|
declare const parserFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst {\n parserJsOptions: embedParserJsOptions,\n parserTsOptions: embedParserTsOptions,\n} = require('./embed');\nconst {\n parserJsOptions: customParserJsOptions,\n parserTsOptions: customParserTsOptions,\n} = require('./custom');\n\nmodule.exports = {\n parserJsOptions: { ...embedParserJsOptions, ...customParserJsOptions },\n parserTsOptions: { ...embedParserTsOptions, ...customParserTsOptions },\n};\n";
|
|
175
|
-
declare const settingEmbedFileContent:
|
|
176
|
-
declare const settingCustomFileContent:
|
|
175
|
+
declare const settingEmbedFileContent: string;
|
|
176
|
+
declare const settingCustomFileContent: '/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst items = {};\n\nmodule.exports = {\n settings: {\n ...items,\n },\n};\n';
|
|
177
177
|
declare const settingFileContent: "/* eslint-disable no-undef */\n/* eslint-disable import/no-commonjs */\n/* eslint-disable unicorn/prefer-module */\n/* eslint-disable no-useless-escape */\n\nconst { settings: embedSettings } = require('./embed');\nconst { settings: customSettings } = require('./custom');\n\nmodule.exports = {\n settings: {\n ...embedSettings,\n ...customSettings,\n },\n};\n";
|
|
178
178
|
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* loop all package
|
|
3
3
|
*/
|
|
4
|
-
export function loopPackage(
|
|
4
|
+
export function loopPackage(
|
|
5
|
+
callback?: ({
|
|
6
|
+
name,
|
|
7
|
+
path,
|
|
8
|
+
absolutePath,
|
|
9
|
+
relativePath,
|
|
10
|
+
}: {
|
|
5
11
|
name: any;
|
|
12
|
+
path: any;
|
|
6
13
|
absolutePath: any;
|
|
7
14
|
relativePath: any;
|
|
8
|
-
}) => void
|
|
15
|
+
}) => void,
|
|
16
|
+
): void;
|