Skip to content

Commit 7ca1529

Browse files
authored
release: promote next to main (#754)
Promote next after resolving conflicts and review feedback.
2 parents 3f8f6cc + ea4f766 commit 7ca1529

6 files changed

Lines changed: 33 additions & 31 deletions

File tree

docs/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ Zi is a Swiss Army Knife for Zsh — a blazing-fast plugin manager with Turbo mo
6666
alt="Z-Shell Metrics"
6767
width="100%"
6868
height="auto"
69-
img="https://raw.githubusercontent.com/z-shell/.github/main/metrics/plugin/metrics.svg"
69+
img="https://raw.githubusercontent.com/z-shell/.github/metrics/metrics/plugin/metrics.svg"
7070
/>
7171
<ImgShow
7272
alt="Z-Shell Repositories"
7373
width="100%"
7474
height="auto"
75-
img="https://raw.githubusercontent.com/z-shell/.github/main/metrics/plugin/repositories_metrics.svg"
75+
img="https://raw.githubusercontent.com/z-shell/.github/metrics/metrics/plugin/repositories_metrics.svg"
7676
/>
7777
</Link>
7878

ecosystem/plugins/zsh_lint.mdx

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,39 @@
22
id: zsh_lint
33
title: 🔍 Zsh Lint
44
sidebar_position: 13
5-
description: A Zi-aware linter for Zsh configuration and scripting.
5+
description: A Go-based semantic analyzer for Zsh.
66
keywords:
77
- zsh-lint
88
- linter
9-
- zi
9+
- zsh
10+
- go
1011
---
1112

1213
{/* @format */}
1314

14-
import Tabs from "@theme/Tabs";
15-
import TabItem from "@theme/TabItem";
15+
## A Go-based semantic analyzer for Zsh
1616

17-
## Zi-aware Linter for Zsh scripting language
18-
19-
`zsh-lint` is a powerful linter designed specifically for Zsh. It understands Zi-specific constructs and helps ensure your configuration and scripts are following best practices and are free of syntax errors.
17+
`zsh-lint` is being rebooted as a Go semantic analyzer for Zsh. It parses Zsh
18+
sources with a real grammar front end and reports problems. It currently
19+
operates as a **parser survey** — reporting which files the parser accepts — and
20+
does not implement lint rules yet.
2021

2122
### <i class="fa-brands fa-github"></i> [z-shell/zsh-lint][]
2223

2324
### Installation
2425

25-
<Tabs>
26-
<TabItem value="zi" label="Zi" default>
27-
28-
Add the following to your `.zshrc` file:
29-
30-
```zsh title="~/.zshrc"
31-
zi light z-shell/zui
32-
zi light z-shell/zsh-lint
26+
```sh
27+
go install github.com/z-shell/zsh-lint/cmd/zsh-lint@latest
3328
```
3429

35-
Note: `zsh-lint` requires [ZUI](zui) to be loaded as well.
36-
37-
</TabItem>
38-
<TabItem value="standalone" label="Standalone">
39-
40-
Clone the repository and source the plugin:
30+
### Usage
4131

42-
```shell title="~/.zshrc"
43-
git clone https://github.com/z-shell/zsh-lint.git
44-
source path/to/zsh-lint/zsh-lint.plugin.zsh
32+
```sh
33+
zsh-lint path/to/file.zsh another.zsh
4534
```
4635

47-
</TabItem>
48-
</Tabs>
36+
Each file gets an `OK`/`FAIL` line; failures include a greppable
37+
`path:line:col: message`. The exit code is `0` only if every file parsed.
4938

5039
{/* end-of-file */}
5140
{/* links */}

functions/[[path]].ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ interface Env {
44
ASSETS_BUCKET: R2Bucket;
55
}
66

7+
const immutableAssetPrefixes = ["/assets/", "/cdn/", "/img/"];
8+
79
export const onRequest: PagesFunction<Env> = async (context) => {
810
if (context.request.method === "OPTIONS") {
911
return new Response(null, {
@@ -46,7 +48,11 @@ export const onRequest: PagesFunction<Env> = async (context) => {
4648

4749
const headers = new Headers();
4850
object.writeHttpMetadata(headers);
49-
headers.set("Cache-Control", "public, max-age=31536000, immutable");
51+
if (immutableAssetPrefixes.some((prefix) => url.pathname.startsWith(prefix))) {
52+
headers.set("Cache-Control", "public, max-age=31536000, immutable");
53+
} else if (!headers.has("Cache-Control")) {
54+
headers.set("Cache-Control", "public, max-age=300");
55+
}
5056
headers.set("ETag", object.httpEtag);
5157
headers.set("Access-Control-Allow-Origin", "*");
5258
headers.set("Accept-Ranges", "bytes");

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
"lint:links": "trunk check --filter lychee",
2020
"lint:links:all": "trunk check --all --filter lychee",
2121
"lint:links:refresh": "trunk check --all --filter lychee --cache=false",
22-
"project-health": "pnpm lint && pnpm build:en",
22+
"project-health": "pnpm lint && pnpm wrangler:typecheck && pnpm build:en",
2323
"serve": "docusaurus serve",
2424
"start": "docusaurus start",
2525
"start:cf": "wrangler pages dev build --remote",
2626
"swizzle": "docusaurus swizzle",
2727
"validate:frontmatter": "node scripts/validate-frontmatter.mjs",
28+
"wrangler:typecheck": "tsc -p functions/tsconfig.json",
2829
"wrangler:types": "wrangler types --path='./functions/worker-env.d.ts'",
2930
"write-docs-version": "docusaurus docs:version",
3031
"write-heading-ids": "docusaurus write-heading-ids",

pnpm-workspace.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ overrides:
1515
webpackbar: "^7.0.0"
1616
serialize-javascript: "7.0.5"
1717
uuid: "14.0.0"
18+
19+
# Allow ESLint 10 (current stable) for plugins whose declared peer range
20+
# predates it but which work fine with it. Removes install-time peer warnings.
21+
peerDependencyRules:
22+
allowedVersions:
23+
"eslint-plugin-jsx-a11y>eslint": "^10"

src/components/HomeBanner/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function HeroBanner(): React.JSX.Element {
4444
<iframe
4545
className={styles.indexCtasGitHubButton}
4646
src="https://ghbtns.com/github-btn.html?user=z-shell&amp;repo=zi&amp;type=star&amp;count=true&amp;size=large"
47-
width={130}
47+
width={170}
4848
height={30}
4949
title="GitHub Stars"
5050
loading="lazy"

0 commit comments

Comments
 (0)