ESLint flat config (v9+) for Merchant Center customizations.
Requirements
ESLint 9.x or higher
Node.js ^22.23.4, ^24.22.1, or >=26.12.1
Migrations
See the migrations/ directory for version-specific upgrade guides. Each file is structured for both human and AI-assisted migration.
Install
pnpm add -D eslint @commercetools-frontend/eslint-config-mc-app
Usage
Create an eslint.config.js file in your project root:
// eslint.config.js
const mcAppConfig = require('@commercetools-frontend/eslint-config-mc-app');
module.exports = [
...mcAppConfig,
// Add your custom config overrides here
];
Note : This package uses ESLint's flat config format introduced in ESLint 9. If you're migrating from ESLint 8, you'll need to replace your .eslintrc.js file with eslint.config.js.
关于 @commercetools-frontend/eslint-config-mc-app 的常见问题@commercetools-frontend/eslint-config-mc-app 是什么? ESLint config used by Merchant Center customizations.
如何安装 @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 和提交记录判断。