@commercetools-frontend/eslint-config-mc-app

中文文档
27.17.1发布于 2026/11/11MIT构建来源已验证近 30 天下载 2.4万

由Merchant Center定制使用的ESLint配置.

中文使用文档
文档目录4 节
  1. 所需资源
  2. 移徙
  3. 安装
  4. 使用量

@commercialtools-frontend/eslint-config-mc-app (中文(简体) )

Latest release (latest dist-tag) Latest release (next dist-tag) Minified + GZipped size GitHub license

ESLint平面配置 (v9+),用于美商中心定制.

所需资源

  • ESLint 9.x 或更高
  • 节点.js ^22.23.4,^24.22.1,或 ^26.12.1

移徙

见 移徙/ 特定版本升级指南的目录。 每个文件的结构都是针对人类和人工智能辅助的迁移.

安装

pnpm add -D eslint @commercetools-frontend/eslint-config-mc-app

使用量

创建一个 eslint.config.js 在工程根中的文件 :

// eslint.config.js
const mcAppConfig = require('@commercetools-frontend/eslint-config-mc-app');

module.exports = [
  ...mcAppConfig,
  // Add your custom config overrides here
];

说明:本套件使用ESLint9中引入的平面配置格式. 如果你从ESLint 8号移民,你需要替换你的 .eslintrc.js 文件为 eslint.config.js。 。 。 .

版本与发布记录

@commercetools-frontend/eslint-config-mc-app 共发布 1,499 个版本,首次发布于 2018/06/26;过去 12 个月发布了 204 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
27.17.1latest2026/11/11今天
0.0.0-canary-202611101453512026/11/10今天
0.0.0-canary-202611061943342026/11/073 天前
0.0.0-canary-202611060847432026/11/064 天前
0.0.0-canary-202611060848452026/11/064 天前
27.17.02026/11/046 天前

其他发布通道:rc → 21.0.0-rc.7,preview → 22.36.0-preview.0,FEC-157-preview-releases → 0.0.0-FEC-157-preview-releases-20241126231507,testing-workflow → 0.0.0-testing-workflow-20241126234621,testing-comment-workflow → 0.0.0-testing-comment-workflow-20241204141931,rc-preview-demo-cm → 0.0.0-rc-preview-demo-cm-20250130161121。

关于 @commercetools-frontend/eslint-config-mc-app 的常见问题

@commercetools-frontend/eslint-config-mc-app 是什么?

由Merchant Center定制使用的ESLint配置.

如何安装 @commercetools-frontend/eslint-config-mc-app?

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

@commercetools-frontend/eslint-config-mc-app 支持 TypeScript 吗?

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

@commercetools-frontend/eslint-config-mc-app 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4 || ^24.22.1 || >=26.12.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@commercetools-frontend/eslint-config-mc-app 可以商用吗?

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

@commercetools-frontend/eslint-config-mc-app 的下载量有多少?

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

@commercetools-frontend/eslint-config-mc-app 还在维护吗?

最新版本 27.17.1 发布于 2026/11/11(今天);至今共发布 1499 个版本,其中过去 12 个月发布了 204 个;首次发布于 2018/06/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。