@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/index.d.mts CHANGED
@@ -1,106 +1,125 @@
1
- import { Linter } from 'eslint';
2
- import { Options as Options$2 } from 'prettier';
3
- import { Options as Options$1 } from '@cspell/eslint-plugin';
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
- name: string;
7
- files: (string | string[])[];
8
- plugins?: Record<string, any>;
16
+ name: string;
17
+ files: (string | string[])[];
18
+ plugins?: Record<string, any>;
9
19
  }
10
-
11
- type Options = Options$1['cspell'];
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
- * 额外的devDependencies
16
- * @default undefined
17
- */
18
- devDependencies?: string[];
19
- /**
20
- * monorepo前缀
21
- * @default undefined
22
- */
23
- monorepoScope?: string;
24
- /**
25
- * 核心模块
26
- * @default undefiend
27
- */
28
- coreModules?: string[];
29
- /**
30
- * 解析器
31
- * @default 'typescript'
32
- */
33
- resolver?: 'typescript' | 'oxc';
34
- /**
35
- * 是否允许相对路径
36
- * @default false
37
- */
38
- allowRelativePaths?: boolean;
39
- /**
40
- * 是否允许幽灵依赖
41
- * @default false
42
- */
43
- allowExtraneousDependencies?: boolean;
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
- * Custom ESLint configuration to override or extend defaults
49
- * @default undefined
50
- */
51
- config?: Omit<FlatConfigItem, 'name' | 'files'>;
52
- /**
53
- * List of files to ignore
54
- * @default undefined
55
- */
56
- ignores?: string[];
57
- /**
58
- * Enable React-specific linting rules
59
- * @default undefined
60
- */
61
- react?: boolean | string;
62
- /**
63
- * Specify the Vue.js version for linting
64
- * @default undefined
65
- */
66
- vue?: number;
67
- /**
68
- * Enable ES module linting rules
69
- * @default undefined
70
- */
71
- module?: boolean;
72
- /**
73
- * Enable GoDaddy-specific linting configurations
74
- * @default undefined
75
- */
76
- godaddy?: boolean | 'typescript';
77
- /**
78
- * Enable or disable JSDoc linting rules
79
- * @default true
80
- */
81
- jsdoc?: boolean;
82
- /**
83
- * Enable Prettier for code formatting
84
- * @default true
85
- */
86
- prettier?: boolean | Options$2;
87
- /**
88
- * Enable Lodash-specific linting rules
89
- * @default true
90
- */
91
- lodash?: boolean;
92
- /**
93
- * Custom spelling configurations for CSpell
94
- * @default {}
95
- */
96
- cspell?: Options | false;
97
- /**
98
- * Enable or disable import linting rules
99
- * @default true
100
- */
101
- import?: ImportsOptions | boolean;
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
- import { Linter } from 'eslint';
2
- import { Options as Options$2 } from 'prettier';
3
- import { Options as Options$1 } from '@cspell/eslint-plugin';
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
- name: string;
7
- files: (string | string[])[];
8
- plugins?: Record<string, any>;
16
+ name: string;
17
+ files: (string | string[])[];
18
+ plugins?: Record<string, any>;
9
19
  }
10
-
11
- type Options = Options$1['cspell'];
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
- * 额外的devDependencies
16
- * @default undefined
17
- */
18
- devDependencies?: string[];
19
- /**
20
- * monorepo前缀
21
- * @default undefined
22
- */
23
- monorepoScope?: string;
24
- /**
25
- * 核心模块
26
- * @default undefiend
27
- */
28
- coreModules?: string[];
29
- /**
30
- * 解析器
31
- * @default 'typescript'
32
- */
33
- resolver?: 'typescript' | 'oxc';
34
- /**
35
- * 是否允许相对路径
36
- * @default false
37
- */
38
- allowRelativePaths?: boolean;
39
- /**
40
- * 是否允许幽灵依赖
41
- * @default false
42
- */
43
- allowExtraneousDependencies?: boolean;
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
- * Custom ESLint configuration to override or extend defaults
49
- * @default undefined
50
- */
51
- config?: Omit<FlatConfigItem, 'name' | 'files'>;
52
- /**
53
- * List of files to ignore
54
- * @default undefined
55
- */
56
- ignores?: string[];
57
- /**
58
- * Enable React-specific linting rules
59
- * @default undefined
60
- */
61
- react?: boolean | string;
62
- /**
63
- * Specify the Vue.js version for linting
64
- * @default undefined
65
- */
66
- vue?: number;
67
- /**
68
- * Enable ES module linting rules
69
- * @default undefined
70
- */
71
- module?: boolean;
72
- /**
73
- * Enable GoDaddy-specific linting configurations
74
- * @default undefined
75
- */
76
- godaddy?: boolean | 'typescript';
77
- /**
78
- * Enable or disable JSDoc linting rules
79
- * @default true
80
- */
81
- jsdoc?: boolean;
82
- /**
83
- * Enable Prettier for code formatting
84
- * @default true
85
- */
86
- prettier?: boolean | Options$2;
87
- /**
88
- * Enable Lodash-specific linting rules
89
- * @default true
90
- */
91
- lodash?: boolean;
92
- /**
93
- * Custom spelling configurations for CSpell
94
- * @default {}
95
- */
96
- cspell?: Options | false;
97
- /**
98
- * Enable or disable import linting rules
99
- * @default true
100
- */
101
- import?: ImportsOptions | boolean;
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 };