@rikalabs/repo-lint 0.4.2 → 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 +21 -0
- package/README.md +106 -0
- package/dist/index.js +33868 -0
- package/package.json +43 -67
- package/bin/repo-lint.js +0 -36
- package/directory/index.d.ts +0 -1
- package/directory/index.js +0 -1
- package/file/index.d.ts +0 -1
- package/file/index.js +0 -1
- package/index.js +0 -48
- package/install.js +0 -134
- package/optional/index.d.ts +0 -1
- package/optional/index.js +0 -1
- package/presets/index.js +0 -11
- package/presets/nextjs.js +0 -97
- package/required/index.d.ts +0 -1
- package/required/index.js +0 -1
- package/types/index.d.ts +0 -166
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rika Labs
|
|
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,106 @@
|
|
|
1
|
+
# Repo Lint
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@rikalabs/repo-lint)
|
|
4
|
+
[](https://github.com/Rika-Labs/repo-lint/actions/workflows/ci.yml)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
A high-performance filesystem layout linter with YAML config.
|
|
8
|
+
|
|
9
|
+
Enforce directory structure, naming conventions, and architectural rules — right from your terminal.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bun add -D @rikalabs/repo-lint
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
Create `repo-lint.config.yaml`:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
mode: strict
|
|
23
|
+
|
|
24
|
+
ignore:
|
|
25
|
+
- node_modules
|
|
26
|
+
- dist
|
|
27
|
+
|
|
28
|
+
layout:
|
|
29
|
+
type: dir
|
|
30
|
+
children:
|
|
31
|
+
src:
|
|
32
|
+
type: dir
|
|
33
|
+
children:
|
|
34
|
+
"$modules":
|
|
35
|
+
type: many
|
|
36
|
+
case: kebab
|
|
37
|
+
child:
|
|
38
|
+
type: file
|
|
39
|
+
pattern: "*.ts"
|
|
40
|
+
package.json: {}
|
|
41
|
+
|
|
42
|
+
rules:
|
|
43
|
+
forbidNames:
|
|
44
|
+
- temp
|
|
45
|
+
- tmp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Check
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
repo-lint check
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
With specific scope:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
repo-lint check --scope apps/web
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Inspect
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
repo-lint inspect layout
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
View a specific rule:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
repo-lint inspect rule forbidPaths
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Output Formats
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Console (default)
|
|
76
|
+
repo-lint check
|
|
77
|
+
|
|
78
|
+
# JSON output
|
|
79
|
+
repo-lint check --json
|
|
80
|
+
|
|
81
|
+
# SARIF (GitHub Code Scanning)
|
|
82
|
+
repo-lint check --sarif
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Options
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
--scope PATH Check specific directory
|
|
89
|
+
--json JSON output
|
|
90
|
+
--sarif SARIF output for GitHub
|
|
91
|
+
--config PATH Custom config path
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Run `repo-lint --help` for full documentation.
|
|
95
|
+
|
|
96
|
+
## Claude Code
|
|
97
|
+
|
|
98
|
+
Add filesystem linting to Claude Code:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
mkdir -p ~/.claude/skills/repo-lint && curl -so ~/.claude/skills/repo-lint/SKILL.md https://raw.githubusercontent.com/Rika-Labs/repo-lint/main/SKILL.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
[Contributing](CONTRIBUTING.md) · [MIT License](LICENSE)
|