@longzai-intelligence/eslint-preset-library 0.0.1 → 0.0.3
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/README.md +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -7
- package/dist/index.d.mts +5 -7
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @longzai-intelligence/eslint-preset-library
|
|
2
2
|
|
|
3
|
-
ESLint
|
|
3
|
+
ESLint 库项目配置包,提供库项目的 ESLint 配置。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ bun add @longzai-intelligence/eslint-preset-library
|
|
|
10
10
|
|
|
11
11
|
## 功能
|
|
12
12
|
|
|
13
|
-
- 继承 Base
|
|
13
|
+
- 继承 Base 配置的所有功能
|
|
14
14
|
- 库项目特定的规则配置
|
|
15
15
|
|
|
16
16
|
## 使用
|
|
@@ -18,24 +18,24 @@ bun add @longzai-intelligence/eslint-preset-library
|
|
|
18
18
|
### 基本使用
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import {
|
|
21
|
+
import { defineConfig } from '@longzai-intelligence/eslint-preset-library';
|
|
22
22
|
|
|
23
|
-
export default
|
|
23
|
+
export default defineConfig();
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### 自定义配置
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
|
-
import {
|
|
29
|
+
import { defineConfig } from '@longzai-intelligence/eslint-preset-library';
|
|
30
30
|
|
|
31
|
-
export default
|
|
31
|
+
export default defineConfig({
|
|
32
32
|
tsconfigRootDir: '/path/to/project',
|
|
33
33
|
});
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## 依赖
|
|
37
37
|
|
|
38
|
-
- `@longzai-intelligence/eslint-preset-base` -
|
|
38
|
+
- `@longzai-intelligence/eslint-preset-base` - 基础配置
|
|
39
39
|
- `@longzai-intelligence/eslint-plugin-architecture` - 架构约束规则
|
|
40
40
|
|
|
41
41
|
## 许可证
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@longzai-intelligence/eslint-preset-base`);function t(t={}){return[...(0,e.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@longzai-intelligence/eslint-preset-base`);function t(t={}){return[...(0,e.createBaseConfig)(t)]}function n(e={}){return t(e)}const r=t();exports.createLibraryConfig=t,exports.defineConfig=n,exports.libraryConfig=r;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Linter } from "eslint";
|
|
2
|
-
import {
|
|
2
|
+
import { BaseConfigOptions as LibraryConfigOptions } from "@longzai-intelligence/eslint-preset-base";
|
|
3
3
|
|
|
4
|
-
//#region src/library.types.d.ts
|
|
5
|
-
type LibraryPresetOptions = BasePresetOptions;
|
|
6
|
-
//#endregion
|
|
7
4
|
//#region src/library.preset.d.ts
|
|
8
|
-
declare function
|
|
9
|
-
declare
|
|
5
|
+
declare function createLibraryConfig(options?: LibraryConfigOptions): Linter.Config[];
|
|
6
|
+
declare function defineConfig(options?: LibraryConfigOptions): Linter.Config[];
|
|
7
|
+
declare const libraryConfig: Linter.Config[];
|
|
10
8
|
//#endregion
|
|
11
|
-
export { type
|
|
9
|
+
export { type LibraryConfigOptions, createLibraryConfig, defineConfig, libraryConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseConfigOptions as LibraryConfigOptions } from "@longzai-intelligence/eslint-preset-base";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
3
|
|
|
4
|
-
//#region src/library.types.d.ts
|
|
5
|
-
type LibraryPresetOptions = BasePresetOptions;
|
|
6
|
-
//#endregion
|
|
7
4
|
//#region src/library.preset.d.ts
|
|
8
|
-
declare function
|
|
9
|
-
declare
|
|
5
|
+
declare function createLibraryConfig(options?: LibraryConfigOptions): Linter.Config[];
|
|
6
|
+
declare function defineConfig(options?: LibraryConfigOptions): Linter.Config[];
|
|
7
|
+
declare const libraryConfig: Linter.Config[];
|
|
10
8
|
//#endregion
|
|
11
|
-
export { type
|
|
9
|
+
export { type LibraryConfigOptions, createLibraryConfig, defineConfig, libraryConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createBaseConfig as e}from"@longzai-intelligence/eslint-preset-base";function t(t={}){return[...e(t)]}function n(e={}){return t(e)}const r=t();export{t as createLibraryConfig,n as defineConfig,r as libraryConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence/eslint-preset-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"typescript": "^5.9.3"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@longzai-intelligence/eslint-preset-base": "0.0.
|
|
42
|
-
"@longzai-intelligence/eslint-plugin-architecture": "0.0.
|
|
41
|
+
"@longzai-intelligence/eslint-preset-base": "0.0.2",
|
|
42
|
+
"@longzai-intelligence/eslint-plugin-architecture": "0.0.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@longzai-intelligence/tsdown-config": "0.0.1",
|