@hapi/eslint-config-hapi

中文文档
13.0.2发布于 2020/01/05BSD-3-ClauseCommonJS零依赖近 30 天下载 1.4万

Shareable ESLint config for the hapi ecosystem

此软件包已被标记为弃用

This module has moved and is now available as part of @hapi/eslint-plugin. Please update your dependencies as this version is no longer maintained and may contain bugs and security issues.

原始使用文档

@hapi/eslint-config-hapi

Build Status

Shareable ESLint config for the hapi ecosystem. To use in your project, add @hapi/eslint-config-hapi and @hapi/eslint-plugin-hapi to your package.json, then in your ESLint configuration add:

{
  "extends": "@hapi/eslint-config-hapi"
}

Note: @hapi/eslint-plugin-hapi is a plugin containing custom hapi linting rules. It is a peer dependency because of the way ESLint handles shareable configs that include plugins and custom rules (see eslint/eslint#3458 and eslint/eslint#2518 for more background).

版本与发布记录

@hapi/eslint-config-hapi 共发布 7 个版本,首次发布于 2019/04/24;过去 12 个月发布了 0 个版本。

版本发布日期距今
13.0.2latest2020/01/056 年前
13.0.12019/12/286 年前
13.0.02019/12/286 年前
12.3.02019/09/177 年前
12.2.02019/08/087 年前
12.1.12019/08/087 年前

关于 @hapi/eslint-config-hapi 的常见问题

@hapi/eslint-config-hapi 是什么?

Shareable ESLint config for the hapi ecosystem注意:该包已被作者标记为弃用——This module has moved and is now available as part of @hapi/eslint-plugin. Please update your dependencies as this version is no longer maintained and may contain bugs and security issues.

如何安装 @hapi/eslint-config-hapi?

在项目目录运行 npm install @hapi/eslint-config-hapi,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@hapi/eslint-plugin-hapi(4.x.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@hapi/eslint-config-hapi 支持 TypeScript 吗?

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

@hapi/eslint-config-hapi 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@hapi/eslint-config-hapi 可以商用吗?

@hapi/eslint-config-hapi 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@hapi/eslint-config-hapi 的下载量有多少?

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

@hapi/eslint-config-hapi 还在维护吗?

最新版本 13.0.2 发布于 2020/01/05(6 年前);至今共发布 7 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/04/24。作者已将其标记为弃用,新项目建议寻找替代方案。