@agilebot/eslint-config 0.8.1 → 0.8.2
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/cli.d.mts +1 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +69 -127
- package/dist/cli.mjs +70 -91
- package/dist/constants-uP0zspUv.js +150 -0
- package/dist/constants-zSSLGYP3.mjs +79 -0
- package/dist/index.d.mts +117 -98
- package/dist/index.d.ts +117 -98
- package/dist/index.js +1082 -1016
- package/dist/index.mjs +1084 -935
- package/package.json +5 -5
- package/dist/chunk-S6JKNAIM.mjs +0 -84
package/dist/index.d.mts
CHANGED
@@ -1,106 +1,125 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
/**
|
2
|
+
* @license @agilebot/eslint-config v0.8.2
|
3
|
+
*
|
4
|
+
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
|
+
*
|
6
|
+
* This source code is licensed under the MIT license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
4
9
|
|
10
|
+
import { Options } from "@cspell/eslint-plugin";
|
11
|
+
import { Linter } from "eslint";
|
12
|
+
import { Options as Options$1 } from "prettier";
|
13
|
+
|
14
|
+
//#region src/types.d.ts
|
5
15
|
interface FlatConfigItem extends Linter.Config {
|
6
|
-
|
7
|
-
|
8
|
-
|
16
|
+
name: string;
|
17
|
+
files: (string | string[])[];
|
18
|
+
plugins?: Record<string, any>;
|
9
19
|
}
|
10
|
-
|
11
|
-
|
12
|
-
|
20
|
+
//#endregion
|
21
|
+
//#region src/configs/cspell.d.ts
|
22
|
+
type Options$2 = Options['cspell'];
|
23
|
+
//#endregion
|
24
|
+
//#region src/configs/imports.d.ts
|
13
25
|
interface ImportsOptions {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
26
|
+
/**
|
27
|
+
* 额外的devDependencies
|
28
|
+
* @default undefined
|
29
|
+
*/
|
30
|
+
devDependencies?: string[];
|
31
|
+
/**
|
32
|
+
* monorepo前缀
|
33
|
+
* @default undefined
|
34
|
+
*/
|
35
|
+
monorepoScope?: string;
|
36
|
+
/**
|
37
|
+
* 核心模块
|
38
|
+
* @default undefiend
|
39
|
+
*/
|
40
|
+
coreModules?: string[];
|
41
|
+
/**
|
42
|
+
* 解析器
|
43
|
+
* @default 'typescript'
|
44
|
+
*/
|
45
|
+
resolver?: 'typescript' | 'oxc';
|
46
|
+
/**
|
47
|
+
* 是否允许相对路径
|
48
|
+
* @default false
|
49
|
+
*/
|
50
|
+
allowRelativePaths?: boolean;
|
51
|
+
/**
|
52
|
+
* 是否允许幽灵依赖
|
53
|
+
* @default false
|
54
|
+
*/
|
55
|
+
allowExtraneousDependencies?: boolean;
|
44
56
|
}
|
45
|
-
|
57
|
+
/**
|
58
|
+
* eslint-plugin-import 规则
|
59
|
+
* @param packageDir 子包路径
|
60
|
+
* @param opts 参数
|
61
|
+
*/
|
62
|
+
//#endregion
|
63
|
+
//#region src/factory/options.d.ts
|
46
64
|
interface FactoryOptions {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
65
|
+
/**
|
66
|
+
* Custom ESLint configuration to override or extend defaults
|
67
|
+
* @default undefined
|
68
|
+
*/
|
69
|
+
config?: Omit<FlatConfigItem, 'name' | 'files'>;
|
70
|
+
/**
|
71
|
+
* List of files to ignore
|
72
|
+
* @default undefined
|
73
|
+
*/
|
74
|
+
ignores?: string[];
|
75
|
+
/**
|
76
|
+
* Enable React-specific linting rules
|
77
|
+
* @default undefined
|
78
|
+
*/
|
79
|
+
react?: boolean | string;
|
80
|
+
/**
|
81
|
+
* Specify the Vue.js version for linting
|
82
|
+
* @default undefined
|
83
|
+
*/
|
84
|
+
vue?: number;
|
85
|
+
/**
|
86
|
+
* Enable ES module linting rules
|
87
|
+
* @default undefined
|
88
|
+
*/
|
89
|
+
module?: boolean;
|
90
|
+
/**
|
91
|
+
* Enable GoDaddy-specific linting configurations
|
92
|
+
* @default undefined
|
93
|
+
*/
|
94
|
+
godaddy?: boolean | 'typescript';
|
95
|
+
/**
|
96
|
+
* Enable or disable JSDoc linting rules
|
97
|
+
* @default true
|
98
|
+
*/
|
99
|
+
jsdoc?: boolean;
|
100
|
+
/**
|
101
|
+
* Enable Prettier for code formatting
|
102
|
+
* @default true
|
103
|
+
*/
|
104
|
+
prettier?: boolean | Options$1;
|
105
|
+
/**
|
106
|
+
* Enable Lodash-specific linting rules
|
107
|
+
* @default true
|
108
|
+
*/
|
109
|
+
lodash?: boolean;
|
110
|
+
/**
|
111
|
+
* Custom spelling configurations for CSpell
|
112
|
+
* @default {}
|
113
|
+
*/
|
114
|
+
cspell?: Options$2 | false;
|
115
|
+
/**
|
116
|
+
* Enable or disable import linting rules
|
117
|
+
* @default true
|
118
|
+
*/
|
119
|
+
import?: ImportsOptions | boolean;
|
102
120
|
}
|
103
|
-
|
121
|
+
//#endregion
|
122
|
+
//#region src/factory/index.d.ts
|
104
123
|
declare function factory(root: string | ImportMeta, options?: FactoryOptions): FlatConfigItem[];
|
105
|
-
|
106
|
-
export { factory as agilebot };
|
124
|
+
//#endregion
|
125
|
+
export { factory as agilebot };
|
package/dist/index.d.ts
CHANGED
@@ -1,106 +1,125 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
/**
|
2
|
+
* @license @agilebot/eslint-config v0.8.2
|
3
|
+
*
|
4
|
+
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
|
+
*
|
6
|
+
* This source code is licensed under the MIT license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
4
9
|
|
10
|
+
import { Linter } from "eslint";
|
11
|
+
import { Options } from "prettier";
|
12
|
+
import { Options as Options$1 } from "@cspell/eslint-plugin";
|
13
|
+
|
14
|
+
//#region src/types.d.ts
|
5
15
|
interface FlatConfigItem extends Linter.Config {
|
6
|
-
|
7
|
-
|
8
|
-
|
16
|
+
name: string;
|
17
|
+
files: (string | string[])[];
|
18
|
+
plugins?: Record<string, any>;
|
9
19
|
}
|
10
|
-
|
11
|
-
|
12
|
-
|
20
|
+
//#endregion
|
21
|
+
//#region src/configs/cspell.d.ts
|
22
|
+
type Options$2 = Options$1['cspell'];
|
23
|
+
//#endregion
|
24
|
+
//#region src/configs/imports.d.ts
|
13
25
|
interface ImportsOptions {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
26
|
+
/**
|
27
|
+
* 额外的devDependencies
|
28
|
+
* @default undefined
|
29
|
+
*/
|
30
|
+
devDependencies?: string[];
|
31
|
+
/**
|
32
|
+
* monorepo前缀
|
33
|
+
* @default undefined
|
34
|
+
*/
|
35
|
+
monorepoScope?: string;
|
36
|
+
/**
|
37
|
+
* 核心模块
|
38
|
+
* @default undefiend
|
39
|
+
*/
|
40
|
+
coreModules?: string[];
|
41
|
+
/**
|
42
|
+
* 解析器
|
43
|
+
* @default 'typescript'
|
44
|
+
*/
|
45
|
+
resolver?: 'typescript' | 'oxc';
|
46
|
+
/**
|
47
|
+
* 是否允许相对路径
|
48
|
+
* @default false
|
49
|
+
*/
|
50
|
+
allowRelativePaths?: boolean;
|
51
|
+
/**
|
52
|
+
* 是否允许幽灵依赖
|
53
|
+
* @default false
|
54
|
+
*/
|
55
|
+
allowExtraneousDependencies?: boolean;
|
44
56
|
}
|
45
|
-
|
57
|
+
/**
|
58
|
+
* eslint-plugin-import 规则
|
59
|
+
* @param packageDir 子包路径
|
60
|
+
* @param opts 参数
|
61
|
+
*/
|
62
|
+
//#endregion
|
63
|
+
//#region src/factory/options.d.ts
|
46
64
|
interface FactoryOptions {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
65
|
+
/**
|
66
|
+
* Custom ESLint configuration to override or extend defaults
|
67
|
+
* @default undefined
|
68
|
+
*/
|
69
|
+
config?: Omit<FlatConfigItem, 'name' | 'files'>;
|
70
|
+
/**
|
71
|
+
* List of files to ignore
|
72
|
+
* @default undefined
|
73
|
+
*/
|
74
|
+
ignores?: string[];
|
75
|
+
/**
|
76
|
+
* Enable React-specific linting rules
|
77
|
+
* @default undefined
|
78
|
+
*/
|
79
|
+
react?: boolean | string;
|
80
|
+
/**
|
81
|
+
* Specify the Vue.js version for linting
|
82
|
+
* @default undefined
|
83
|
+
*/
|
84
|
+
vue?: number;
|
85
|
+
/**
|
86
|
+
* Enable ES module linting rules
|
87
|
+
* @default undefined
|
88
|
+
*/
|
89
|
+
module?: boolean;
|
90
|
+
/**
|
91
|
+
* Enable GoDaddy-specific linting configurations
|
92
|
+
* @default undefined
|
93
|
+
*/
|
94
|
+
godaddy?: boolean | 'typescript';
|
95
|
+
/**
|
96
|
+
* Enable or disable JSDoc linting rules
|
97
|
+
* @default true
|
98
|
+
*/
|
99
|
+
jsdoc?: boolean;
|
100
|
+
/**
|
101
|
+
* Enable Prettier for code formatting
|
102
|
+
* @default true
|
103
|
+
*/
|
104
|
+
prettier?: boolean | Options;
|
105
|
+
/**
|
106
|
+
* Enable Lodash-specific linting rules
|
107
|
+
* @default true
|
108
|
+
*/
|
109
|
+
lodash?: boolean;
|
110
|
+
/**
|
111
|
+
* Custom spelling configurations for CSpell
|
112
|
+
* @default {}
|
113
|
+
*/
|
114
|
+
cspell?: Options$2 | false;
|
115
|
+
/**
|
116
|
+
* Enable or disable import linting rules
|
117
|
+
* @default true
|
118
|
+
*/
|
119
|
+
import?: ImportsOptions | boolean;
|
102
120
|
}
|
103
|
-
|
121
|
+
//#endregion
|
122
|
+
//#region src/factory/index.d.ts
|
104
123
|
declare function factory(root: string | ImportMeta, options?: FactoryOptions): FlatConfigItem[];
|
105
|
-
|
106
|
-
export { factory as agilebot };
|
124
|
+
//#endregion
|
125
|
+
export { factory as agilebot };
|