# @bigbinary/eslint-plugin-neeto 中文文档

规范地址：https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/

版本：1\.13\.0
npm 元数据更新时间：2026-10-30T02:22:39.558Z
中文译文更新时间：2026-11-08T01:55:37.931Z
软件包许可：UNLICENSED

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40bigbinary/eslint-plugin-neeto
原文对照：https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：443 kB，6 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- Node.js 要求：\>=22\.13
- 运行依赖：0 个
- peer 依赖：ramda 0\.29\.0，eslint ^9\.25\.1，i18next 21\.7\.0，@bigbinary/neeto-cist ^1\.0\.3，@bigbinary/neeto-commons-frontend 4\.13\.38
- 首次发布：2022-08-01T04:50:42.111Z
- 最新版本发布：2026-10-30T02:22:39.289Z
- 近 30 天下载量：47207（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：146（近 12 个月 22 个）

## 中文简介

用于执行通用前端最佳做法的 ESLint 插件, 专门用于 neto .

## 安装

```sh
npm install @bigbinary/eslint-plugin-neeto
```

也可以使用：`pnpm add @bigbinary/eslint-plugin-neeto`、`yarn add @bigbinary/eslint-plugin-neeto`、`bun add @bigbinary/eslint-plugin-neeto`

## README

# 爱斯林 - 插座 - 需要

用于执行共同前端最佳做法的 ESLint 插件 须取.

## 使用量

从 npm 安装插件 :

```bash
yarn add -D "@bigbinary/eslint-plugin-neeto@latest"
```

在你身边 `.eslintrc.js` 文件,添加 `neeto` 输入 `plugins` 列表并添加 配置“ 建议” 以前缀为“ 插件 ” .

```js
module.exports = {
  // ...other configurations
  plugins: [
    // ...other plugins
    "@bigbinary/neeto",
  ],
  extends: [
    "plugin:@bigbinary/neeto/recommended",
    // ...other plugins/extensions
  ],
};
```

可以选择的是,如果你不需要所有推荐的规则,就遵循这个方法:

```js
module.exports = {
  // ...other configurations
  plugins: [
    // ...other plugins
    "@bigbinary/neeto",
  ],
  rules: {
    "@bigbinary/neeto/ramda-tips": "warn",
    // ...other rules
  },
};
```

## 导出规则

根据严重程度,ESLint规则被归类为错误或警告 在JavaScript代码中识别出的问题.

### 错误

-   [开关- 儿童- 必须是路线或方向](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/switch-children-must-be-route-or-redirect.md)
-   [不需要的类名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-unnecessary-classnames.md)
-   [无本地存储](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-local-storage.md)
-   [无小写翻译](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-lowercase-on-translation.md)
-   [使用- query- 客户端- hook](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-use-query-client-hook.md)
-   [用于动力学类的类名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-classnames-for-dynamic-classes.md)
-   [用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用 -用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用-用](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-use-mutation-with-invalidation-hook.md)
-   [无 T- 为智能组件](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-withT-for-smart-components.md)
-   [无大功能-内置-jsx](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-large-functions-inside-jsx.md)
-   [使用标准日期-时间格式](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-standard-date-time-formats.md)
-   [无 dumb- 组件与使用翻译](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-dumb-components-with-use-translation.md)
-   [无必要条件](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-unnecessary-if-condition.md)
-   [api- connectionor-name-should- match- filename 连接器文件名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/api-connector-name-should-match-filename.md)
-   [api- 连接器- 应使用- 默认- 导出](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/api-connector-should-use-default-export.md)
-   [保证对象](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ensure-compact-objects.md)
-   [保证格式验证](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ensure-formik-eager-validation.md)
-   [保证- zumstand- store- 是附加说明的](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ensure-zustand-stores-are-type-annotated.md)
-   [文件- 内置- 反应- query- 文件夹- should- end- with- api](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/files-inside-react-query-folder-should-end-with-api.md)
-   [最小化- zumstand- store- 访问范围](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/minimize-zustand-store-access-scope.md)
-   [无轴- 进口- 外侧- apis](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-axios-import-outside-apis.md)
-   [无黑名单进口](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-blacklisted-imports.md)
-   [无建设者呼叫与空参数](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-buildurl-call-with-empty-params.md)
-   [无条件重叠](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-conditional-overlays.md)
-   [无减值进口](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-deprecated-imports-from-zustand.md)
-   [无编辑到生成的翻译文件](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-edits-to-generated-translation-files.md)
-   [无花招](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-dangling-constants.md)
-   [无全局方案架构](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-globalProps-destructure.md)
-   [无全局配置](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-globalProps-reassignment.md)
-   [无遗漏的本地化](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-missing-localization.md)
-   [无多部分文件](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-multiple-components-in-a-file.md)
-   [无多翻译功能-同父异母](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-multiple-translation-functions-under-same-parent.md)
-   [无名称的空间指定符- 导入- 朗达](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-namespace-specifier-import-for-ramda.md)
-   [无冗余-jsx-表达式](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-redundant-jsx-expression.md)
-   [无冗余字符串模板](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-redundant-string-templates.md)
-   [无路线-拆除结构-改派](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-routes-destructure-and-reassignment.md)
-   [无翻译功能字符串插入](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-translation-functions-in-string-interpolation.md)
-   [前缀- 需要- ui- import- 化名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/prefix-neeto-ui-import-alias.md)
-   [路由 - 应声明 - 默认 - 出口](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/routes-should-be-declared-and-default-exported.md)
-   [路径 - 应匹配 - 对象 - 路径](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/routes-should-match-object-path.md)
-   [使用阵列方法](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-array-methods.md)
-   [使用-轴-配置-通过-平流-参数](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-axios-config-for-passing-query-parameters.md)
-   [函数名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-camel-case-or-pascal-case-for-function-names.md)
-   [使用共同路线](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-common-routes.md)
-   [使用-组件-儿童-正交](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-components-children-prop-in-trans.md)
-   [使用- 创建- 订阅- 用户功能](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-create-subscription-util-function.md)
-   [使用- i18 次页](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-i18next-plurals.md)
-   [使用内线 svg 表示放弃](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-inline-svg-for-render.md)
-   [使用-拓扑-包装](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-pluralize-package.md)
-   [管理远程数据](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-react-query-for-managing-remote-data.md)
-   [使用 snake 大小写表示连接文件名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-snake-case-for-api-connector-filename.md)
-   [组件](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-translation-hook-in-components.md)
-   [转换组件和价值道具](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-trans-components-and-values-props.md)
-   [全球国家管理](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-zustand-for-global-state-management.md)
-   [网络包装 - 化名 - 和 - jsconfig - paths - 应该是同步](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/webpack-aliases-and-jsconfig-paths-should-be-in-sync.md)
-   [zustand-recommand-comparator-函数使用器](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/zustand-recommend-comparator-function-usage.md)
-   [zu-亲接-单项](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/zustand-use-prop-to-pick-single-item.md)
-   [用- zustand- pick- 转换器](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-zustand-pick-transformer.md)
-   [道具内置-扩散-属性-应该处理](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/props-inside-spread-attributes-should-be-sorted.md)
-   [合并-扩展属性](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/merge-spread-attributes.md)
-   [道具与-不同-键-值-应该-外-散-属性](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/props-with-different-key-value-should-be-outside-spread-attribute.md)
-   [无重复的正键值名称](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-repetition-in-prop-key-value-names.md)
-   [zupt-use- with-immultive-action-wrapper-inside-create-create-collections 相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相接相相相相接相相接相相相接相接相接相相接相接相接相](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/zustand-use-with-immutable-actions-wrapper-inside-create.md)
-   [所需附加- 等同- 依赖](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/add-required-peer-dependencies.md)
-   [向上移动的分布式属性](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/move-spread-attributes-to-top-position.md)
-   [使用- show-thumbs- up-toast (英语)](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-show-thumbs-up-toastr)
-   [保证使用状态为初始值](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ensure-usestate-has-initial-value.md)
-   [保证- 等同依赖- 是同步](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ensure-peer-dependencies-are-in-sync.md)
-   [使用- dayjs- 从- nees- to- commons- fronted](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-dayjs-from-neeto-commons-fronted.md)
-   [标准化- 帮助- urls](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/standardize-help-urls.md)

### 警告

-   [山地尖顶](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/ramda-tips.md)
-   [组合-多功能独立意识](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/combine-multiple-independent-awaits.md)
-   [一致按钮-链接-锁定](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/consistent-button-link-anchor.md)
-   [文件名称和出口名称标准](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/file-name-and-export-name-standards.md)
-   [硬码字符串应本地化](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/hard-coded-strings-should-be-localized.md)
-   [jsx-前卫-clause.md](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/jsx-prefer-guard-clause.md)
-   [需要普通点](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/neetocommons-tips.md)
-   [无过量函数参数](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-excess-function-arguments.md)
-   [无snake-case-解构-用于-query-params-和-get-query-params](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/no-snake-case-destructuring-for-use-query-params-and-get-query-params.md)
-   [偏好函数参考.md](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/prefer-function-reference.md)
-   [常用常数](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-common-constants.md)
-   [用户提前返回](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-early-return.md)
-   [用户功能和用户功能](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-functions-and-hooks-from-neeto-commons-frontend.md)
-   [使用标题](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-title-case-neeto-in-strings.md)
-   [用户序列](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-neetoui-classes.md)
-   [个人专用路线](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-permissions-prop-in-private-route.md)
-   [用户名](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-webpack-alias.md)
-   [信息格式](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/use-neetoui-action-block-in-formik-forms.md)
-   [偏好收音机按钮作为选择](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/src/rules/prefer-radio-buttons-for-few-options.md)

## 超越规则

### ESLint 错误

ESLint 错误标记开发者必须严格的强制性编码标准 坚持不懈。 这些错误由 `pre-commit` 钩子和CI检查. 在某些情况下,我们可能故意选择采用特定方法 编码样式并想防止ESLint丢出错误. 在这种情况下,你 可以通过添加 a 来暂时禁用对错误提醒负责的规则 在代码上方注释,说明您为什么禁用 为了避免今后出现任何混乱,该行的特定规则:

```js
// Reason for disabling the rule.
// eslint-disable-next-line <rule>
```

### ESLint 警告

当创建 ESLint 规则时, 可能并不总是能够覆盖每个边缘 并消除所有虚假阳性。 这种规则被配置为: 警告而不是错误。 这些警告在 `pre-commit` 钩子或CI检查。 尽管如此,ESLint警告还需要在下列情况下处理: 和ESLint错误一样 建议随时审查和解决 可行的。 但是,如果你发现该建议不适用于你 具体的情况,你们可以灵活地无视它.

## 其他参考资料

-   [发展指示](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/general/development-instructions.md)
-   [制定新规则](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/general/creating-new-rules.md)
-   [运行测试](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/general/running-tests.md)
-   [建造和释放](https://npmcn.com/package/%40bigbinary/eslint-plugin-neeto/docs/general/building-and-releasing.md)

## 常见问题

### @bigbinary/eslint-plugin-neeto 是什么？

用于执行通用前端最佳做法的 ESLint 插件, 专门用于 neto \.

### 如何安装 @bigbinary/eslint-plugin-neeto？

在项目目录运行 npm install @bigbinary/eslint-plugin-neeto，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：ramda（0\.29\.0）、eslint（^9\.25\.1）、i18next（21\.7\.0）、@bigbinary/neeto-cist（^1\.0\.3）、@bigbinary/neeto-commons-frontend（4\.13\.38）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @bigbinary/eslint-plugin-neeto 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/bigbinary\_\_eslint-plugin-neeto 是否存在。

### @bigbinary/eslint-plugin-neeto 支持 ESM 还是 CommonJS？

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

### @bigbinary/eslint-plugin-neeto 需要什么版本的 Node\.js？

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

### @bigbinary/eslint-plugin-neeto 可以商用吗？

@bigbinary/eslint-plugin-neeto 使用 UNLICENSED 许可。作者声明为 UNLICENSED，即不授予公开使用许可（与公共领域的 Unlicense 不同）。使用前需获得作者授权。以上为概括，不构成法律意见，请以许可原文为准。

### @bigbinary/eslint-plugin-neeto 的下载量有多少？

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

### @bigbinary/eslint-plugin-neeto 还在维护吗？

最新版本 1\.13\.0 发布于 2026/10/30（9 天前）；至今共发布 146 个版本，其中过去 12 个月发布了 22 个；首次发布于 2022/08/01。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

