@asamarts/alint

中文文档
0.21.2发布于 2026/11/07(Apache-2.0 OR MIT)构建来源已验证近 30 天下载 2307

Language-agnostic linter for repository structure, file existence, filename conventions, and file content rules. This package downloads and wraps the platform-matched native alint binary.

原始使用文档
文档目录6 节
  1. Install
  2. Supported platforms
  3. Skipping the postinstall download
  4. How it works
  5. License
  6. Links

@asamarts/alint

npm install path for alint, a language-agnostic linter for repository structure, file existence, filename conventions, and file content rules.

This package downloads and wraps the platform-matched native alint binary at install time. The package itself ships no JavaScript runtime behaviour — it's a thin shim around the same release tarballs the install.sh and Homebrew paths consume. Same SHA-256 verification, same upstream artifacts.

Install

# project-local
npm install --save-dev @asamarts/alint
npx alint check

# global (puts `alint` on PATH)
npm install -g @asamarts/alint
alint check

The npm package version tracks alint releases exactly: npm install @asamarts/[email protected] downloads alint v0.21.2.

Supported platforms

OSArchitectures
Linuxx64, arm64 (musl)
macOSx64, arm64
Windowsx64 (arm64 runs the x64 binary under Windows 11 emulation)

For unsupported platforms, install via cargo install alint, Homebrew, or by downloading the tarball directly from GitHub Releases.

Skipping the postinstall download

Set ALINT_SKIP_INSTALL=1 before npm install. The shim will install without staging a binary, and alint invocations will print a clear "binary not found" error pointing at the missing step. Useful for CI systems that snapshot node_modules and don't want a network hop on every restore.

How it works

  1. package.json declares bin/alint.js as the npm-exposed bin.
  2. npm install runs install.js (postinstall):
    • Detects process.platform + process.arch.
    • Downloads https://github.com/asamarts/alint/releases/download/v<ver>/alint-v<ver>-<target>.tar.gz plus its .sha256 companion.
    • Verifies SHA-256.
    • Extracts the alint (or alint.exe) binary into bin-platform/.
  3. bin/alint.js is invoked when the user runs alint. It locates the staged binary and spawns it with the original argv.

License

Apache-2.0 OR MIT, matching the upstream alint project.

版本与发布记录

@asamarts/alint 共发布 54 个版本,首次发布于 2026/04/28;过去 12 个月发布了 54 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.21.2latest2026/11/07今天
0.21.12026/11/062 天前
0.21.02026/11/026 天前
0.20.12026/10/2414 天前
0.20.02026/10/2216 天前
0.19.02026/10/1920 天前

关于 @asamarts/alint 的常见问题

@asamarts/alint 是什么?

Language-agnostic linter for repository structure, file existence, filename conventions, and file content rules. This package downloads and wraps the platform-matched native alint binary.

如何安装 @asamarts/alint?

在项目目录运行 npm install @asamarts/alint,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 alint,可以用 npx alint 直接运行。

@asamarts/alint 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/asamarts__alint 是否存在。

@asamarts/alint 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@asamarts/alint 可以商用吗?

@asamarts/alint 使用 (Apache-2.0 OR MIT) 许可。可在 Apache-2.0、MIT 中任选其一遵守。选择 Apache-2.0 时,宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@asamarts/alint 的下载量有多少?

根据 npm 官方下载统计,@asamarts/alint 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,307 次,日均约 77 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@asamarts/alint 还在维护吗?

最新版本 0.21.2 发布于 2026/11/07(今天);至今共发布 54 个版本,其中过去 12 个月发布了 54 个;首次发布于 2026/04/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。