@longzai-intelligence/eslint-preset-library 0.0.1

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 ADDED
@@ -0,0 +1,43 @@
1
+ # @longzai-intelligence/eslint-preset-library
2
+
3
+ ESLint 库项目预设包,提供库项目的 ESLint 配置。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ bun add @longzai-intelligence/eslint-preset-library
9
+ ```
10
+
11
+ ## 功能
12
+
13
+ - 继承 Base 预设的所有功能
14
+ - 库项目特定的规则配置
15
+
16
+ ## 使用
17
+
18
+ ### 基本使用
19
+
20
+ ```typescript
21
+ import { createLibraryPreset } from '@longzai-intelligence/eslint-preset-library';
22
+
23
+ export default createLibraryPreset();
24
+ ```
25
+
26
+ ### 自定义配置
27
+
28
+ ```typescript
29
+ import { createLibraryPreset } from '@longzai-intelligence/eslint-preset-library';
30
+
31
+ export default createLibraryPreset({
32
+ tsconfigRootDir: '/path/to/project',
33
+ });
34
+ ```
35
+
36
+ ## 依赖
37
+
38
+ - `@longzai-intelligence/eslint-preset-base` - 基础预设
39
+ - `@longzai-intelligence/eslint-plugin-architecture` - 架构约束规则
40
+
41
+ ## 许可证
42
+
43
+ UNLICENSED
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@longzai-intelligence/eslint-preset-base`);function t(t={}){return[...(0,e.createBasePreset)(t)]}const n=t();exports.createLibraryPreset=t,exports.libraryPreset=n;
@@ -0,0 +1,11 @@
1
+ import { Linter } from "eslint";
2
+ import { BasePresetOptions } from "@longzai-intelligence/eslint-preset-base";
3
+
4
+ //#region src/library.types.d.ts
5
+ type LibraryPresetOptions = BasePresetOptions;
6
+ //#endregion
7
+ //#region src/library.preset.d.ts
8
+ declare function createLibraryPreset(options?: LibraryPresetOptions): Linter.Config[];
9
+ declare const libraryPreset: Linter.Config[];
10
+ //#endregion
11
+ export { type LibraryPresetOptions, createLibraryPreset, libraryPreset };
@@ -0,0 +1,11 @@
1
+ import { BasePresetOptions } from "@longzai-intelligence/eslint-preset-base";
2
+ import { Linter } from "eslint";
3
+
4
+ //#region src/library.types.d.ts
5
+ type LibraryPresetOptions = BasePresetOptions;
6
+ //#endregion
7
+ //#region src/library.preset.d.ts
8
+ declare function createLibraryPreset(options?: LibraryPresetOptions): Linter.Config[];
9
+ declare const libraryPreset: Linter.Config[];
10
+ //#endregion
11
+ export { type LibraryPresetOptions, createLibraryPreset, libraryPreset };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{createBasePreset as e}from"@longzai-intelligence/eslint-preset-base";function t(t={}){return[...e(t)]}const n=t();export{t as createLibraryPreset,n as libraryPreset};
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@longzai-intelligence/eslint-preset-library",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "types": "./dist/index.d.mts",
7
+ "exports": {
8
+ ".": {
9
+ "types": {
10
+ "import": "./dist/index.d.mts",
11
+ "require": "./dist/index.d.cts"
12
+ },
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.cjs"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsdown",
22
+ "build:prod": "NODE_ENV=production tsdown",
23
+ "prepublishOnly": "bun run build:prod",
24
+ "dev": "tsdown --watch",
25
+ "clean": "rimraf dist tsconfig/.cache",
26
+ "test": "vitest run",
27
+ "test:watch": "vitest",
28
+ "test:coverage": "vitest run --coverage",
29
+ "lint": "eslint .",
30
+ "lint:fix": "eslint . --fix",
31
+ "typecheck": "bun run typecheck:app && bun run typecheck:node && bun run typecheck:test",
32
+ "typecheck:app": "tsc --noEmit -p tsconfig/app.json",
33
+ "typecheck:node": "tsc --noEmit -p tsconfig/node.json",
34
+ "typecheck:test": "tsc --noEmit -p tsconfig/test.json"
35
+ },
36
+ "peerDependencies": {
37
+ "eslint": "^10.0.0",
38
+ "typescript": "^5.9.3"
39
+ },
40
+ "dependencies": {
41
+ "@longzai-intelligence/eslint-preset-base": "0.0.1",
42
+ "@longzai-intelligence/eslint-plugin-architecture": "0.0.2"
43
+ },
44
+ "devDependencies": {
45
+ "@longzai-intelligence/tsdown-config": "0.0.1",
46
+ "@longzai-intelligence/typescript-config": "0.0.2",
47
+ "@longzai-intelligence/vitest-config": "0.0.3",
48
+ "@types/node": "^25.5.2",
49
+ "eslint": "^10.2.0",
50
+ "rimraf": "^6.1.3",
51
+ "tsdown": "^0.21.7",
52
+ "typescript": "^6.0.2",
53
+ "vitest": "^4.1.2"
54
+ },
55
+ "keywords": [
56
+ "eslint",
57
+ "preset",
58
+ "library"
59
+ ],
60
+ "license": "UNLICENSED",
61
+ "module": "./dist/index.mjs"
62
+ }