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-vtexVerified import paths — ran on the pinned version, not inferred.
Enables the vtex plugin and its two custom rules in an ESLint config file.
Set plugins: ["vtex"]
Use 'vtex/prefer-early-return' instead of 'prefer-early-return'
Upgrade ESLint to version 6 or later.
Change plugins: ["eslint-plugin-vtex"] to plugins: ["vtex"]
Use 'vtex/prefer-early-return' instead of 'prefer-early-return'