eslint-plugin-vtex
This package provides VTEX's custom ESLint rules.
Installation
Give that you already have ESLint installed, run:
yarn add -D eslint-plugin-vtexUsage
After installing the module, just add it to your plugins array inside your .eslintrc.
// .eslintrc
{
...,
"plugins": ["vtex"]
}Rules
This plugin provides the following custom ESLint rules:
prefer-early-return: Suggest early returning to prevent nesting and improve code readability.enforce-explicit-enum-values: Enforce explicit enum values.