@activescott/eslint-config

中文文档
3.1.0发布于 2026/09/20MITTypeScriptES Module零依赖近 30 天下载 9603

用于 TypeScript 的 ESLint 可变配置 .

中文使用文档
文档目录7 节
  1. 使用量
  2. 页:1
  3. 反应
  4. 本地测试
  5. 释放程序(部署到国家预防机制)
  6. 说明自我
  7. 待办

@ actionscott/eslint- config

npm version Build Status

这是 @活泼斯科特的 粗略的配置 为了ESLint. 为TypeScript优化了默认. 它确实也预设了其他文件,包括JavaScript,Markdown等.

如本文所述,今后可在此软件包中添加多个配置 https://eslint.org/docs/developer-guide/shareable-configs# 共享-多功能-configs

使用量

步骤1: 在您的项目中添加以下依赖性:

npm add -D @activescott/eslint-config@3 typescript-eslint@8 eslint-plugin-prettier@5 eslint-plugin-jest@28 @stylistic/eslint-plugin@2 eslint-config-prettier@9 eslint-plugin-unicorn@56

步骤2: 输入以下来创建 eslint.config.js, (中文(简体) ), .prettierrc,以及 .prettierignore 在有正确内容的根中:

printf 'import config from "@activescott/eslint-config"

// Global ignores - must be in a separate config object with ONLY the ignores property
const globalIgnores = {
  ignores: [
    "**/node_modules/**",
    "**/dist/**",
    "**/.react-router/**",
    "**/test-data/**",
  ],
}

const overrides = {
  rules: {
  },
}
export default [globalIgnores, ...config, overrides]

' > eslint.config.js
printf "semi: false\n" > .prettierrc

printf '.prettierignore
node_modules/
/dist/
/.next/
.nyc_output/
coverage/
.react-router/
'

步骤3 (可选) : 添加以下脚本到 package.json数字 :

{
  "scripts": {
    "lint": "eslint",
    "lint-fix": "eslint --fix"
  }
}

见 https://eslint.org/docs/用户指南/配置 更多信息.

页:1

反应

使用 React 添加时 plugin:react/recommended 从软件包中 eslint-plugin-react数字 :

extends:
  - ...
  - "plugin:react/recommended"

本地测试

您也可以通过将您的模块连接到全球的方式在您的计算机上测试您的共享配置 。 类型 :

npm link

然后,在您想要使用您共享配置的项目中, 类型 :

npm link @activescott/eslint-config

释放程序(部署到国家预防机制)

我们用 语义释放 持续释放 铸造- 兼容的版本。 这个项目部署在多个 npm 分布标签。以下每个分支对应以下 npm 分布标记:

分支npm 分发标记
师傅最新消息
β 语录β 语录

启动释放时使用常规承诺 Angular 提交信件常规 上面的一个树枝.

说明自我

参考文献:

待办

版本与发布记录

@activescott/eslint-config 共发布 29 个版本,首次发布于 2019/09/28;过去 12 个月发布了 1 个版本。

版本发布日期距今
3.1.0latest2026/09/201 个月前
3.0.12025/10/231 年前
3.0.02025/05/281.4 年前
3.0.0-beta.5beta2025/05/281.4 年前
3.0.0-beta.42025/05/281.4 年前
3.0.0-beta.32025/01/101.8 年前

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

@activescott/eslint-config 是什么?

用于 TypeScript 的 ESLint 可变配置 .

如何安装 @activescott/eslint-config?

在项目目录运行 npm install @activescott/eslint-config,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:eslint(>= 9)、typescript-eslint(^8.19.1)、eslint-plugin-jest(^28.10.0)、eslint-plugin-unicorn(^56.0.1)、eslint-plugin-prettier(^5.2.1)、@stylistic/eslint-plugin(^2.12.1 || ^5.10.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@activescott/eslint-config 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@activescott/eslint-config 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@activescott/eslint-config 需要什么版本的 Node.js?

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

@activescott/eslint-config 可以商用吗?

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

@activescott/eslint-config 的下载量有多少?

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

@activescott/eslint-config 还在维护吗?

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