Registry / testing / eslint-plugin-vtex

eslint-plugin-vtex

JSON →
library2.3.0jsnpmunverified

VTEX's custom ESLint plugin providing rules like prefer-early-return and enforce-explicit-enum-values. Current stable version is 2.3.0. The plugin is actively maintained by VTEX and ships TypeScript type definitions. It supports ESLint versions 6, 7, and 8. Unlike generic ESLint plugins, this one targets VTEX-specific coding conventions, making it essential for projects within the VTEX ecosystem. The plugin is released on npm and follows semantic versioning.

npm install eslint-plugin-vtex
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-VTEX
E
eslint-plugin-vtex
testingjavascriptv2.3.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
plugins: ["vtex"]
plugins: ["eslint-plugin-vtex"]
ESLint plugin names are abbreviated; 'eslint-plugin-' prefix is omitted.
rules
"vtex/prefer-early-return": "warn"
"prefer-early-return": "warn"
Rules must be prefixed with the plugin name (vtex/).
Config
import type { Config } from 'eslint-plugin-vtex'
TypeScript users can import type definitions for configuration objects.

Enables the vtex plugin and its two custom rules in an ESLint config file.

// .eslintrc.json { "plugins": ["vtex"], "rules": { "vtex/prefer-early-return": "warn", "vtex/enforce-explicit-enum-values": "error" } }
Debug
Known issues
gotchaPlugin name must be 'vtex' not 'eslint-plugin-vtex' in the plugins array.
fix
Set plugins: ["vtex"]
affects: >=1.0.0
gotchaRule names must be prefixed with 'vtex/' in the rules object.
fix
Use 'vtex/prefer-early-return' instead of 'prefer-early-return'
affects: >=1.0.0
breakingDropped support for ESLint <6 in version 2.0.0.
fix
Upgrade ESLint to version 6 or later.
affects: >=2.0.0
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-vtex". The package is not installed, or the plugin name is misspelled.
Using the full npm package name in the plugins array instead of the abbreviated name.
fix
Change plugins: ["eslint-plugin-vtex"] to plugins: ["vtex"]
Definition for rule 'prefer-early-return' was not found.
Missing the plugin prefix in the rule name.
fix
Use 'vtex/prefer-early-return' instead of 'prefer-early-return'
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency, required to run ESLint plugins
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-vtex — npm install eslint-plugin-vtex · libregistry