@r_masseater/fu4 0.2.0 → 0.3.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 +38 -5
- package/dist/app-DR_5JsmN.mjs +204 -0
- package/dist/app-DR_5JsmN.mjs.map +1 -0
- package/dist/cli-Cv5v6zny.mjs +21 -0
- package/dist/cli-Cv5v6zny.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{index-BBTwA_Cz.d.mts → index-DM3Q3-YV.d.mts} +7 -3
- package/dist/index.d.mts +8 -5
- package/dist/index.mjs +3 -1
- package/dist/presets.d.mts +662 -0
- package/dist/presets.mjs +42752 -0
- package/dist/presets.mjs.map +1 -0
- package/dist/source-BRZXj75b.mjs +2583 -0
- package/dist/source-BRZXj75b.mjs.map +1 -0
- package/dist/vite.d.mts +1 -1
- package/package.json +38 -20
- package/skills/apply-fu4-presets/SKILL.md +61 -0
- package/skills/lint-workflows/SKILL.md +3 -5
- package/dist/app-DheTFmZd.mjs +0 -635
- package/dist/app-DheTFmZd.mjs.map +0 -1
- package/dist/cli-Dc3I8PTz.mjs +0 -15
- package/dist/cli-Dc3I8PTz.mjs.map +0 -1
package/dist/vite.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r_masseater/fu4",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The engine of a GitHub Actions linter: Rust parses workflows and TypeScript rules from
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "The engine of a GitHub Actions linter: Rust parses workflows and TypeScript rules from its presets subpath check them, configured from vite.config.ts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"actionlint",
|
|
7
7
|
"github-actions",
|
|
8
8
|
"lint",
|
|
9
|
+
"shellcheck",
|
|
9
10
|
"tanstack-intent",
|
|
10
|
-
"vite-plus"
|
|
11
|
+
"vite-plus",
|
|
12
|
+
"zizmor"
|
|
11
13
|
],
|
|
12
|
-
"homepage": "https://github.com/masseater/
|
|
14
|
+
"homepage": "https://github.com/masseater/ecosystems/tree/main/libs/fu4#readme",
|
|
13
15
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/masseater/
|
|
16
|
+
"url": "https://github.com/masseater/ecosystems/issues"
|
|
15
17
|
},
|
|
16
18
|
"license": "MIT",
|
|
17
19
|
"repository": {
|
|
18
20
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/masseater/
|
|
21
|
+
"url": "git+https://github.com/masseater/ecosystems.git",
|
|
20
22
|
"directory": "libs/fu4"
|
|
21
23
|
},
|
|
22
24
|
"bin": {
|
|
@@ -26,9 +28,11 @@
|
|
|
26
28
|
"LICENSE",
|
|
27
29
|
"dist",
|
|
28
30
|
"logo.svg",
|
|
31
|
+
"skills/apply-fu4-presets",
|
|
29
32
|
"skills/lint-workflows"
|
|
30
33
|
],
|
|
31
34
|
"type": "module",
|
|
35
|
+
"sideEffects": false,
|
|
32
36
|
"imports": {
|
|
33
37
|
"#/*": "./src/*"
|
|
34
38
|
},
|
|
@@ -37,6 +41,10 @@
|
|
|
37
41
|
"types": "./dist/index.d.mts",
|
|
38
42
|
"default": "./dist/index.mjs"
|
|
39
43
|
},
|
|
44
|
+
"./presets": {
|
|
45
|
+
"types": "./dist/presets.d.mts",
|
|
46
|
+
"default": "./dist/presets.mjs"
|
|
47
|
+
},
|
|
40
48
|
"./vite": {
|
|
41
49
|
"types": "./dist/vite.d.mts",
|
|
42
50
|
"default": "./dist/vite.mjs"
|
|
@@ -48,25 +56,36 @@
|
|
|
48
56
|
"provenance": true
|
|
49
57
|
},
|
|
50
58
|
"dependencies": {
|
|
51
|
-
"@effect/platform-node": "^4.1.
|
|
52
|
-
"minimatch": "^11.0.9"
|
|
59
|
+
"@effect/platform-node": "^4.1.5"
|
|
53
60
|
},
|
|
54
61
|
"devDependencies": {
|
|
55
62
|
"@masseater.dev/lint-host": "0.0.0",
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
63
|
+
"@masseater.dev/path-kit": "0.0.0",
|
|
64
|
+
"@r_masseater/vitest-otlp": "0.2.2",
|
|
65
|
+
"@types/hast": "3.0.5",
|
|
66
|
+
"@types/mdast": "4.0.4",
|
|
67
|
+
"@types/node": "26.6.10",
|
|
68
|
+
"effect": "4.1.5",
|
|
69
|
+
"hast-util-from-html": "2.1.0",
|
|
70
|
+
"hast-util-select": "6.0.5",
|
|
71
|
+
"liquidjs": "10.30.1",
|
|
72
|
+
"mdast-util-to-string": "4.0.0",
|
|
73
|
+
"minimatch": "11.0.9",
|
|
74
|
+
"remark-gfm": "4.0.1",
|
|
75
|
+
"remark-parse": "11.0.0",
|
|
76
|
+
"unified": "11.0.5",
|
|
77
|
+
"unist-util-visit": "5.2.0",
|
|
78
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
|
|
79
|
+
"vite-plus": "1.8.0",
|
|
61
80
|
"yaml": "2.9.1"
|
|
62
81
|
},
|
|
63
82
|
"peerDependencies": {
|
|
64
|
-
"effect": "^4.1.
|
|
83
|
+
"effect": "^4.1.0",
|
|
65
84
|
"vite": "*",
|
|
66
|
-
"vite-plus": ">=1.
|
|
85
|
+
"vite-plus": ">=1.8.0"
|
|
67
86
|
},
|
|
68
87
|
"engines": {
|
|
69
|
-
"node": "
|
|
88
|
+
"node": ">=26.13.1"
|
|
70
89
|
},
|
|
71
90
|
"native": {
|
|
72
91
|
"binary": "fu4",
|
|
@@ -76,8 +95,7 @@
|
|
|
76
95
|
]
|
|
77
96
|
},
|
|
78
97
|
"optionalDependencies": {
|
|
79
|
-
"@r_masseater/fu4-linux-x64-gnu": "0.
|
|
80
|
-
"@r_masseater/fu4-win32-x64-msvc": "0.
|
|
81
|
-
}
|
|
82
|
-
"scripts": {}
|
|
98
|
+
"@r_masseater/fu4-linux-x64-gnu": "0.3.1",
|
|
99
|
+
"@r_masseater/fu4-win32-x64-msvc": "0.3.1"
|
|
100
|
+
}
|
|
83
101
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apply-fu4-presets
|
|
3
|
+
description: >
|
|
4
|
+
Use when choosing which @r_masseater/fu4/presets presets a repository's fu4 config extends,
|
|
5
|
+
setting their options, or fixing what their actionlint/ and zizmor/ rules report on GitHub
|
|
6
|
+
Actions workflows, actions, Dependabot and pre-commit configs.
|
|
7
|
+
metadata:
|
|
8
|
+
type: core
|
|
9
|
+
library: "@r_masseater/fu4"
|
|
10
|
+
sources:
|
|
11
|
+
- src/app/presets.ts
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# apply-fu4-presets
|
|
15
|
+
|
|
16
|
+
Each preset returns a fu4 config that loads one plugin and turns its rules on as errors. A config
|
|
17
|
+
lists the presets it wants in `extends`; its own `rules` and `overrides` come after them and win.
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import "@r_masseater/fu4/vite";
|
|
23
|
+
import { actionlint, zizmor } from "@r_masseater/fu4/presets";
|
|
24
|
+
import { defineConfig } from "vite-plus";
|
|
25
|
+
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
fu4: {
|
|
28
|
+
extends: [
|
|
29
|
+
actionlint({
|
|
30
|
+
"self-hosted-runner": { labels: ["gpu"] },
|
|
31
|
+
"config-variables": ["DEPLOY_TARGET"],
|
|
32
|
+
}),
|
|
33
|
+
zizmor({ concerns: ["injection", "supply-chain"], persona: "regular", minSeverity: "low" }),
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Presets
|
|
40
|
+
|
|
41
|
+
- `actionlint(options)` turns on `actionlint/*`: what actionlint reports, with the same messages
|
|
42
|
+
and positions, and its shellcheck checks of `run:` scripts. It takes the options of
|
|
43
|
+
actionlint's `actionlint.yaml`: `self-hosted-runner.labels` and `config-variables`. Leave
|
|
44
|
+
`config-variables` out to accept any `vars.*` name; an empty list rejects every name.
|
|
45
|
+
- `zizmor(options)` turns on `zizmor/*`: zizmor's audits with its findings and positions.
|
|
46
|
+
`concerns` picks `injection`, `supply-chain`, `references`, `credentials`, `workflow` and
|
|
47
|
+
`config`; all by default. `persona`, `minSeverity` and `minConfidence` work as in zizmor.
|
|
48
|
+
`rules` is the `rules` section of a zizmor config. `online: false` skips the audits that query
|
|
49
|
+
GitHub, and `githubHost` points them at GitHub Enterprise Server.
|
|
50
|
+
- `recommended()` extends both with their defaults.
|
|
51
|
+
|
|
52
|
+
The audits that query GitHub read a token from `ZIZMOR_GITHUB_TOKEN`, `GH_TOKEN` or
|
|
53
|
+
`GITHUB_TOKEN` and are skipped without one.
|
|
54
|
+
|
|
55
|
+
## Fixing reports
|
|
56
|
+
|
|
57
|
+
The rule name in brackets names the tool it comes from. A zizmor message ends with a link to
|
|
58
|
+
zizmor's documentation for that audit; for an `actionlint/` rule, read actionlint's
|
|
59
|
+
documentation for the check. Fix the workflow first. A `# zizmor: ignore[audit]` comment on the
|
|
60
|
+
line silences one zizmor finding. Turn a rule off in `overrides` only for files you have decided
|
|
61
|
+
to accept, and keep the globs narrow.
|
|
@@ -7,7 +7,6 @@ description: >
|
|
|
7
7
|
metadata:
|
|
8
8
|
type: core
|
|
9
9
|
library: "@r_masseater/fu4"
|
|
10
|
-
library_version: 0.1.0
|
|
11
10
|
sources:
|
|
12
11
|
- src/app/index.ts
|
|
13
12
|
- src/shared/config/types.ts
|
|
@@ -17,18 +16,17 @@ sources:
|
|
|
17
16
|
|
|
18
17
|
fu4 is the engine of a GitHub Actions linter. Rust parses each file once; TypeScript rules read
|
|
19
18
|
the parsed trees without copying them. fu4 has no rules of its own, so a config without plugins
|
|
20
|
-
reports nothing. The official rules are in `@r_masseater/fu4
|
|
21
|
-
them and fixing what they report.
|
|
19
|
+
reports nothing. The official rules are in `@r_masseater/fu4/presets`.
|
|
22
20
|
|
|
23
21
|
## Setup
|
|
24
22
|
|
|
25
23
|
```sh
|
|
26
|
-
vp add -D @r_masseater/fu4
|
|
24
|
+
vp add -D @r_masseater/fu4
|
|
27
25
|
```
|
|
28
26
|
|
|
29
27
|
```ts
|
|
30
28
|
import "@r_masseater/fu4/vite";
|
|
31
|
-
import { recommended } from "@r_masseater/fu4
|
|
29
|
+
import { recommended } from "@r_masseater/fu4/presets";
|
|
32
30
|
import { defineConfig } from "vite-plus";
|
|
33
31
|
|
|
34
32
|
export default defineConfig({
|