rhine-lint 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 HRan2004
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # Rhine Lint
2
+
3
+ 内置 EsLint 与 Prettier 的代码风格包。可零配置直接使用 rl 命令。
4
+
5
+ 不建议在你的项目中,重复安装 eslint, prettier, typescript-eslint, 及各种插件包。
6
+
7
+ ## Performance
8
+
9
+ ```text
10
+ 执行 rl 即执行 eslint . 和 prettier .
11
+
12
+ 执行 rl <filename> 即执行 eslint <filename> 和 prettier <filename> .
13
+
14
+ 执行 rl --fix 即执行 eslint . --fix 和 prettier . --write
15
+ ```
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ bun add -D rhine-lint
21
+ ```
22
+
23
+ ## Arguments
24
+
25
+ ```text
26
+ --config 指定配置文件路径
27
+
28
+ --fix 是否修复
29
+
30
+ --level 指定项目种类 (js | ts | frontend | nextjs). 默认 frontend.
31
+ ```
32
+
33
+ ## Config
34
+ 会自动检测以下文件作为配置:
35
+ ```text
36
+ rhine-lint.config.js
37
+ rhine-lint.config.ts
38
+ rhine-lint.config.cjs
39
+ rhine-lint.config.mjs
40
+ rhine-lint.config.json
41
+ config/rhine-lint.config.js
42
+ config/rhine-lint.config.ts
43
+ config/rhine-lint.config.cjs
44
+ config/rhine-lint.config.mjs
45
+ config/rhine-lint.config.json
46
+ ```
47
+
48
+ 配置文件格式:
49
+ ```ts
50
+ export type Config = {
51
+ level?: 'none' | 'js' | 'ts' | 'frontend' | 'nextjs',
52
+ fix?: boolean,
53
+ tsconfig?: string,
54
+ eslint?: {
55
+ scope?: {
56
+ script?: boolean,
57
+ typeChecked?: boolean,
58
+ projectBaseTypeChecked?: boolean,
59
+ frontend?: boolean,
60
+ nextjs?: boolean,
61
+ markdown?: boolean,
62
+ json?: boolean,
63
+ stylesheet?: boolean,
64
+ ignorePrettier?: boolean,
65
+ },
66
+ config?: [
67
+ // EsLint Flatten Config
68
+ ],
69
+ // Default false for Merge Mode, true for Overlay Mode
70
+ overlay?: boolean,
71
+ },
72
+ prettier?: {
73
+ config?: {
74
+ // Prettier Config
75
+ },
76
+ // Default false for Merge Mode, true for Overlay Mode
77
+ overlay?: boolean,
78
+ }
79
+ }
80
+ ```
81
+