# @acuris/eslint-config 中文文档

规范地址：https://npmcn.com/package/%40acuris/eslint-config/

版本：0\.1\.18
npm 元数据更新时间：2025-07-16T11:01:50.167Z
中文译文更新时间：2026-11-06T03:35:10.226Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40acuris/eslint-config
原文对照：https://npmcn.com/package/%40acuris/eslint-config/?lang=original
项目主页：https://github.com/mergermarket/acuris-eslint#readme
源码仓库：https://github.com/mergermarket/acuris-eslint

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

- 包体积（解压后）：928 kB，217 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- Node.js 要求：\>=16\.15\.1
- 运行依赖：6 个
- peer 依赖：eslint \>=7\.11\.0，eslint-plugin-import \>=2\.22\.1，eslint-plugin-json \>=2\.1\.2，eslint-plugin-node \>=11\.1\.0，eslint-plugin-promise \>=4\.2\.1，prettier \>=2\.1\.2
- 首次发布：2019-07-26T15:04:33.144Z
- 最新版本发布：2025-07-16T11:01:49.910Z
- 近 30 天下载量：5488（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：76（近 12 个月 0 个）

## 中文简介

Acuris eslint 可共享配置

## 安装

```sh
npm install @acuris/eslint-config
```

也可以使用：`pnpm add @acuris/eslint-config`、`yarn add @acuris/eslint-config`、`bun add @acuris/eslint-config`

## README

# @ acuris/eslint-config

@ acuris/eslint-config

共享 Acuris eslint 配置和代码质量工具.

## 初始化您的项目

在您的工程文件夹中运行此命令是最简单和首选的

```sh
npx @acuris/eslint-config@latest --init
```

这将启动一个交互式初始化脚本,该脚本将设置您需要的一切,包括软件包的安装.

## 如果您在工程初始化后安装了新软件包( 例如, jest 或打字符), 您可能想要运行 `acuris-eslint --init` 再次添加额外的依赖关系.

## 更新@ acuris/eslint- config

一旦安装, 您可以更新到最新版本( 包括依赖) 执行

```sh
acuris-eslint --init
```

## 插入您的整个工程

您可以将您的整个工程插入运行

```sh
acuris-eslint
```

您可以修改您整个工程运行的格式

```sh
acuris-eslint --fix
```

您也可以通过 glob 路径、 文件夹或 sinngle 文件到 lint .

```sh
acuris-eslint hello.js myFolder
```

在可用选项和命令的列表中为 morry 帮助运行

```sh
acuris-eslint --help
```

注意: 如果 PATH 无法在 node modules/.bin 中解析节点二进制, 您可以预置所有命令 `npx`。 。 。 .

## 项目配置

您可以添加 `acuris-eslint` 以通过额外选项.

```ts
{
  name: 'my-package',

  // ...

  "acuris-eslint": {
    /**
     * Override patterns used to apply different eslint rules.
     */
    filePatterns: {
      /** patterns that should be prettified when running --fix, but not validated using eslint parsers */
      prettier: string[] | { [pattern: string]: boolean },

      /** mjs module patterns */
      mjs: string[] | { [pattern: string]: boolean },

      /** .ts, .tsx patterns */
      typescript: string[] | { [pattern: string]: boolean },

      /** .d.ts patterns */
      typescriptDefinition: string[] | { [pattern: string]: boolean },

      /** binary script patterns */
      bin: string[] | { [pattern: string]: boolean },

      /** scripts pattern, similar to bin*/
      scripts: string[] | { [pattern: string]: boolean },

      /** server side code patterns */
      server: string[] | { [pattern: string]: boolean },

      /** dist folder patterns (less stringent rules) */
      dist: string[] | { [pattern: string]: boolean },

      /** test files patterns */
      tests: string[] | { [pattern: string]: boolean }
    },

    /**
     * The path of the eslintrc file to load when running acuris-eslint command
     * Can be overridden by command line option '--config'
     */
    eslintrc: string,
    /**
     * Enables or disable eslint cache when running acuris-eslint command.
     * Can be overridden by command line option '--cache' or '--no-cache'
     */
    eslintCache: boolean,
    /**
     * Changes the path of eslint cache when running acuris-eslint command.
     * By default is `.eslintcache`
     * Can be overridden by command line option '--cache-location'
     */
    eslintCacheLocation: string,
    /**
     * The warnigns and errors output format when running acuris-eslint command.
     * By default is `stylish`.
     * Can be overridden by command line option '--format'
     */
    eslintOutputFormat: string,

    /**
     * The react version to use for react eslint plugin.
     */
    reactVersion: string,

    /**
     * A custom path for the `tsconfig.json` configuration when using typescript.
     * By default, the first tsconfig.json in the current folder or parent folders is used.
     */
    tsConfigPath: string,

    /**
     * The list of packages to disable when initializing a project or running eslint.
     * For example, ['typescript', 'react', 'eslint-plugin-jsx-a11y'] disables typescript, react and jsx-a11y.
     *
     */
    ignoredPackages: string[] | { [packageName: string]: boolean },

    /**
      * Additional node_modules paths to use when resolving eslint plugins or configurations.
      */
    nodeResolvePaths: string[] | { [path: string]: boolean },
  }
}
```

## 更改日志

-   页:1
    -   acuris-slint现在支持对所有支持的文件进行预发,而不仅仅是JS和TS. 使用线工来使用免费的CPU来进行先发制人.
    -   通过覆盖加载扩展
    -   添加对. files 的支持, 现在它们被内嵌
    -   选项 --lint-staged和 --ignore-unknown-extensions 将在处理文件列表时跳过不支持扩展名的文件.
    -   7.0.0,打字机3.9
    -   修复时的性能改进和同步写入

## 常见问题

### @acuris/eslint-config 是什么？

Acuris eslint 可共享配置

### 如何安装 @acuris/eslint-config？

在项目目录运行 npm install @acuris/eslint-config，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：eslint（\>=7\.11\.0）、eslint-plugin-import（\>=2\.22\.1）、eslint-plugin-json（\>=2\.1\.2）、eslint-plugin-node（\>=11\.1\.0）、eslint-plugin-promise（\>=4\.2\.1）、prettier（\>=2\.1\.2）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。它还提供命令行工具 acuris-eslint，可以用 npx acuris-eslint 直接运行。

### @acuris/eslint-config 支持 TypeScript 吗？

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

### @acuris/eslint-config 支持 ESM 还是 CommonJS？

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

### @acuris/eslint-config 需要什么版本的 Node\.js？

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

### @acuris/eslint-config 可以商用吗？

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

### @acuris/eslint-config 的下载量有多少？

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

### @acuris/eslint-config 还在维护吗？

最新版本 0\.1\.18 发布于 2025/07/16（1\.3 年前）；至今共发布 76 个版本，其中过去 12 个月发布了 0 个；首次发布于 2019/07/26。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

