@boulevard/eslint-config

中文文档
2.2.0发布于 2020/10/06UNLICENSED近 30 天下载 2208

Sharable ESLint config.

原始使用文档
文档目录4 节
  1. Why?
  2. Installation
  3. Enable ESLint Errors for TypeScript and React in VSCode
  4. Enable automatic code formatting in VSCode

ESLint Config

Sharable ESLint configuration.

Why?

There are too many projects, and too many cooks in the kitchen, to not enforce a set of standards on how JavaScript code is written. A linter can help us all write JavaScript in a more consistent and safer style which will in turn enhance productivity overtime.

This package is a stage for democracy. If you feel strongly about changing a rule then open a PR and present your case to the rest of the team. If a consensus is reached the change will be accepted. No one has veto power.

Installation

Install this package using npm or yarn.

$ yarn add -D @boulevard/eslint-config

Then extend the desired config files in your ESLint config file.

{
  "extends": [
    "@boulevard/eslint-config",
    "@boulevard/eslint-config/react",
    "@boulevard/eslint-config/typescript"
  ]
}

Enable ESLint Errors for TypeScript and React in VSCode

Install the ESLint VSCode extension and then add the following to your VSCode settings to enable ESLint errors for TypeScript and React.

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}

Enable automatic code formatting in VSCode

The prettier-vscode extension respects your editor.formatOnSave setting, and also supports other keyboard shortcuts for formatting.

版本与发布记录

@boulevard/eslint-config 共发布 16 个版本,首次发布于 2019/10/12;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.2.0latest2020/10/066 年前
2.1.52020/02/196 年前
2.1.42020/02/066 年前
2.1.32020/02/046 年前
2.1.22020/01/296 年前
2.1.12019/11/136 年前

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

@boulevard/eslint-config 是什么?

Sharable ESLint config.

如何安装 @boulevard/eslint-config?

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

@boulevard/eslint-config 支持 TypeScript 吗?

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

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

@boulevard/eslint-config 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

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

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

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

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