This package provides VTEX's custom ESLint rules.
Give that you already have ESLint installed, run:
yarn add -D eslint-plugin-vtex
After installing the module, just add it to your plugins
array inside your .eslintrc
.
// .eslintrc
{
...,
"plugins": ["vtex"]
}
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.