@acuris/eslint-config

中文文档
0.1.18发布于 2025/07/16MITCommonJS近 30 天下载 5488

Acuris eslint 可共享配置

中文使用文档
文档目录6 节
  1. 初始化您的项目
  2. 如果您在工程初始化后安装了新软件包( 例如, jest 或打字符), 您可能想要运行 acuris-eslint --…
  3. 更新@ acuris/eslint- config
  4. 插入您的整个工程
  5. 项目配置
  6. 更改日志

@ acuris/eslint-config

@ acuris/eslint-config

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

初始化您的项目

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

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

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

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

更新@ acuris/eslint- config

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

acuris-eslint --init

插入您的整个工程

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

acuris-eslint

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

acuris-eslint --fix

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

acuris-eslint hello.js myFolder

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

acuris-eslint --help

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

项目配置

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

{
  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 共发布 76 个版本,首次发布于 2019/07/26;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.1.18latest2025/07/161.3 年前
0.1.162023/08/093 年前
0.1.152020/10/236 年前
0.1.142020/10/096 年前
0.1.132020/10/096 年前
0.1.122020/08/106 年前

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

@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 和提交记录判断。