@forgerock/eslint-config

中文文档
2.0.0发布于 2020/03/04MIT零依赖近 30 天下载 8267

ForgeRock’s JavaScript Style Guide as a ESLint Shareable Configuration.

原始使用文档
文档目录14 节
  1. Prerequisites
  2. Installation
  3. via Yarn
  4. via NPM
  5. Usage
  6. Babel
  7. Built-In
  8. Filenames
  9. JSX a11y
  10. JSDoc
  11. Promise
  12. React
  13. React Hooks
  14. Contributing

ForgeRock ESLint Shareable Configuration

ForgeRock’s JavaScript Style Guide as a ESLint Shareable Configuration.

Prerequisites

ForgeRock ESLint Shareable Configuration requires ESLint 6.x.

Installation

via Yarn

yarn add @forgerock/eslint-config

via NPM

npm install @forgerock/eslint-config

Usage

Add one or more of the following rule sets to the extends section of your .eslintrc.js configuration.

Babel

extends: ["@forgerock/eslint-config/babel"]

Babel rules provided by eslint-plugin-babel.

Use these rules if you are using the babel-eslint parser.

Built-In

extends: ["@forgerock"]

Built-in rules provided by ESLint.

Filenames

extends: ["@forgerock/eslint-config/filenames"]

Filename rules provided by eslint-plugin-filenames.

JSX a11y

extends: ["@forgerock/eslint-config/jsx-a11y"]

JSX accessiblity rules provided by eslint-plugin-jsx-a11y.

JSDoc

extends: ["@forgerock/eslint-config/jsdoc"]

JSDoc rules provided by eslint-plugin-jsdoc.

Promise

extends: ["@forgerock/eslint-config/promise"]

Promise rules provided by eslint-plugin-promise.

React

extends: ["@forgerock/eslint-config/react"]

React and JSX rules provided by eslint-plugin-react.

React Hooks

extends: ["@forgerock/eslint-config/react-hooks"]

React Hook rules provided by eslint-plugin-react-hooks.

Contributing

Contribute to ForgeRock ESLint Shareable Configuration by opening a Pull Request.

版本与发布记录

@forgerock/eslint-config 共发布 7 个版本,首次发布于 2018/12/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.0latest2020/03/046 年前
1.4.02020/01/296 年前
1.3.02019/10/167 年前
1.2.02019/10/167 年前
1.1.12019/04/047 年前
1.1.02019/01/037 年前

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

@forgerock/eslint-config 是什么?

ForgeRock’s JavaScript Style Guide as a ESLint Shareable Configuration.

如何安装 @forgerock/eslint-config?

在项目目录运行 npm install @forgerock/eslint-config,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:eslint(^6.5.1)、eslint-plugin-babel(^5.3.0)、eslint-plugin-jsdoc(^15.11.1)、eslint-plugin-react(^7.16.0)、eslint-plugin-promise(^4.2.1)、eslint-plugin-jsx-a11y(^6.2.3)、eslint-plugin-filenames(^1.3.2)、eslint-plugin-react-hooks(^2.1.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@forgerock/eslint-config 支持 TypeScript 吗?

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

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

@forgerock/eslint-config 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

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

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

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

最新版本 2.0.0 发布于 2020/03/04(6 年前);至今共发布 7 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/12/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。