@globalpayments/eslint-plugin-vega-eslint

中文文档
1.2.24发布于 2026/08/26UNLICENSEDCommonJS零依赖近 30 天下载 6270

Eslint Plugin Package for Vega project

原始使用文档
文档目录8 节
  1. Installation
  2. Usage
  3. Supported Rules
  4. Testing
  5. Running Tests
  6. Development
  7. Build
  8. Publish

vega-eslint

Eslint plugin for vega project

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @globalpayments/eslint-plugin-vega-eslint:

npm install @globalpayments/eslint-plugin-vega-eslint --save-dev

Usage

Add @globalpayments/vega-eslint to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@globalpayments/vega-eslint"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "@globalpayments/vega-eslint/rule-name": 2
    }
}

Supported Rules

For a full list of available rules, see:

  • Documentation: docs/rules/ — detailed description and examples for each rule
  • Source: src/rules/ — rule implementations

Testing

The plugin includes a comprehensive test suite built with Vitest. Tests ensure all rules work correctly and maintain high code coverage.

Running Tests

# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

# Watch mode for development
npm run test:watch

For testing guidance, see the test files in tests/rules/.

Development

Build

To build the package, please run

npm run build

Publish

Every push (or merged PR) to main automatically:

  1. Bumps the patch version in package.json
  2. Builds the package
  3. Publishes to the npm registry
  4. Pushes the version-bump commit and git tag back to main

This is powered by the GitHub Actions workflow at .github/workflows/publish.yml.

Prerequisites – add the following repository secret in
Settings → Secrets and variables → Actions:

SecretDescription
NPM_TOKEN_GLOBALPAYMENTSnpm Granular Access Token with read-write permission scoped to @globalpayments/eslint-plugin-vega-eslint

⚠️ Token Rotation – npm Granular Access Tokens expire after 90 days (max).
Set a calendar reminder to rotate the token every ~80 days:

  1. Generate a new token:
    npm token create --name "vega-eslint-ci" --expires 90 --packages "@globalpayments/eslint-plugin-vega-eslint" --packages-and-scopes-permission read-write --bypass-2fa
    
  2. Update the NPM_TOKEN_GLOBALPAYMENTS secret in GitHub → Settings → Secrets and variables → Actions
  3. Revoke the old token: npm token revoke <old-token-id>

版本与发布记录

@globalpayments/eslint-plugin-vega-eslint 共发布 29 个版本,首次发布于 2026/05/26;过去 12 个月发布了 29 个版本。

版本发布日期距今
1.2.24latest2026/08/262 个月前
1.2.232026/08/143 个月前
1.2.222026/08/043 个月前
1.2.212026/07/313 个月前
1.2.202026/07/283 个月前
1.2.18backfill2026/06/105 个月前

关于 @globalpayments/eslint-plugin-vega-eslint 的常见问题

@globalpayments/eslint-plugin-vega-eslint 是什么?

Eslint Plugin Package for Vega project

如何安装 @globalpayments/eslint-plugin-vega-eslint?

在项目目录运行 npm install @globalpayments/eslint-plugin-vega-eslint,或使用 pnpm add / yarn add / bun add。

@globalpayments/eslint-plugin-vega-eslint 支持 TypeScript 吗?

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

@globalpayments/eslint-plugin-vega-eslint 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@globalpayments/eslint-plugin-vega-eslint 可以商用吗?

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

@globalpayments/eslint-plugin-vega-eslint 的下载量有多少?

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

@globalpayments/eslint-plugin-vega-eslint 还在维护吗?

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