@longzai-intelligence/eslint-preset-library 0.1.1 → 0.1.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/README.md +26 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ bun add @longzai-intelligence/eslint-preset-library
|
|
|
11
11
|
## 功能
|
|
12
12
|
|
|
13
13
|
- 继承 Base 配置的所有功能
|
|
14
|
+
- Architecture Library 插件规则(7 条)
|
|
14
15
|
- 库项目特定的规则配置
|
|
15
16
|
|
|
16
17
|
## 使用
|
|
@@ -33,6 +34,31 @@ export default defineConfig({
|
|
|
33
34
|
});
|
|
34
35
|
```
|
|
35
36
|
|
|
37
|
+
## 包含的插件
|
|
38
|
+
|
|
39
|
+
### Architecture Library 插件(@longzai-intelligence/architecture-library)
|
|
40
|
+
|
|
41
|
+
提供库项目特定的架构约束规则(7 条):
|
|
42
|
+
|
|
43
|
+
- `test-file-placement` - 测试文件放置位置检查
|
|
44
|
+
- `no-non-test-files-in-tests-directory` - 禁止在 tests 目录中放置非测试文件
|
|
45
|
+
- `test-file-matches-source` - 测试文件与源文件匹配检查
|
|
46
|
+
- `require-tsup-config-import` - tsup 配置导入检查
|
|
47
|
+
- `require-tsdown-config-import` - tsdown 配置导入检查
|
|
48
|
+
- `require-vitest-config-import` - vitest 配置导入检查
|
|
49
|
+
- `require-eslint-config-import` - eslint 配置导入检查
|
|
50
|
+
|
|
51
|
+
### 继承自 Base 配置
|
|
52
|
+
|
|
53
|
+
- ESLint 推荐规则
|
|
54
|
+
- TypeScript 推荐规则
|
|
55
|
+
- Prettier 集成
|
|
56
|
+
- TSDoc 规范检查(19 条规则)
|
|
57
|
+
- 代码风格检查(Code-Style)
|
|
58
|
+
- package.json 规范检查
|
|
59
|
+
- Import 排序(Perfectionist)
|
|
60
|
+
- 核心架构约束规则
|
|
61
|
+
|
|
36
62
|
## 依赖
|
|
37
63
|
|
|
38
64
|
- `@longzai-intelligence/eslint-preset-base` - 基础配置
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@longzai-intelligence/eslint-preset-base`);function
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@longzai-intelligence/eslint-plugin-architecture`),t=require(`@longzai-intelligence/eslint-preset-base`);const n=`@longzai-intelligence/architecture-library`;function r(r={}){return[...(0,t.createBaseConfig)(r),{plugins:{[n]:e.architectureLibraryPlugin},rules:{[`${n}/test-file-placement`]:`error`,[`${n}/no-non-test-files-in-tests-directory`]:`error`,[`${n}/test-file-matches-source`]:`error`,[`${n}/require-tsup-config-import`]:`error`,[`${n}/require-tsdown-config-import`]:`error`,[`${n}/require-vitest-config-import`]:`error`,[`${n}/require-eslint-config-import`]:`error`}}]}function i(e={}){return r(e)}const a=r();exports.createLibraryConfig=r,exports.defineConfig=i,exports.libraryConfig=a;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{architectureLibraryPlugin as e}from"@longzai-intelligence/eslint-plugin-architecture";import{createBaseConfig as t}from"@longzai-intelligence/eslint-preset-base";const n=`@longzai-intelligence/architecture-library`;function r(r={}){return[...t(r),{plugins:{[n]:e},rules:{[`${n}/test-file-placement`]:`error`,[`${n}/no-non-test-files-in-tests-directory`]:`error`,[`${n}/test-file-matches-source`]:`error`,[`${n}/require-tsup-config-import`]:`error`,[`${n}/require-tsdown-config-import`]:`error`,[`${n}/require-vitest-config-import`]:`error`,[`${n}/require-eslint-config-import`]:`error`}}]}function i(e={}){return r(e)}const a=r();export{r as createLibraryConfig,i as defineConfig,a as libraryConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence/eslint-preset-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"typescript": "^6.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@longzai-intelligence/eslint-preset-base": "0.1.
|
|
43
|
-
"@longzai-intelligence/eslint-plugin-architecture": "0.1.
|
|
42
|
+
"@longzai-intelligence/eslint-preset-base": "0.1.2",
|
|
43
|
+
"@longzai-intelligence/eslint-plugin-architecture": "0.1.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@longzai-intelligence/tsdown-config": "0.0.1",
|