Registry / crm-productivity / eslint-config-vtex-react

eslint-config-vtex-react

JSON →
library9.1.0jsnpmunverified

VTEX's ESLint shared configuration for React projects, currently at version 9.1.0. It extends the base eslint-config-vtex and adds React-specific rules, including presets for general React, VTEX IO, and React Native. The package is maintained by VTEX and follows the release cadence of the VTEX Typescript monorepo. Key differentiators: opinionated, tailored for VTEX IO ecosystem, integrates with Prettier and TypeScript, and provides three presets for different React contexts.

npm install eslint-config-vtex-react
INSTALL
IMPORT
SIG · ESLINT-CONFIG-VTEX
E
eslint-config-vtex-react
crm-productivityjavascriptv9.1.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.

eslint-config-vtex-react
extend 'vtex-react' in .eslintrc
extend 'eslint-config-vtex-react'
ESLint resolves 'vtex-react' automatically; do not include the full package name.
vtex-react/io
extend 'vtex-react/io' in .eslintrc
extend 'eslint-config-vtex-react/io'
Sub-preset for VTEX IO React applications.
vtex-react/native
extend 'vtex-react/native' in .eslintrc
extend 'eslint-config-vtex-react/native'
Sub-preset for React Native applications.

Shows how to install and configure eslint-config-vtex-react in a React project.

// 1. Install dependencies // yarn add -D eslint-config-vtex-react typescript prettier eslint // 2. Create .eslintrc with: { "extends": ["vtex-react"], "rules": { // Override rules if needed } } // 3. Optionally add a lint script to package.json: // "lint": "eslint src --ext .ts,.tsx"
Debug
Known issues
gotchaDo not use the full package name 'eslint-config-vtex-react' in the extends field; ESLint expects the shorthand 'vtex-react'.
fix
Use "extends": ["vtex-react"] instead.
affects: >=1.0.0
breakingVersion 9.x dropped support for ESLint 6 and below. Requires ESLint ^7 or ^8.
fix
Upgrade ESLint to version 7 or 8.
affects: >=9.0.0
deprecatedThe 'vtex-react/io' preset may become deprecated in future versions as VTEX IO evolves.
fix
Monitor release notes for migration guidance.
affects: >=9.0.0
gotchaMake sure Prettier is installed as a peer dependency; the config assumes Prettier formatting.
fix
Run 'yarn add -D prettier' if not present.
affects: >=1.0.0
gotchaTypeScript must be installed as a peer dependency for linting TypeScript files.
fix
Run 'yarn add -D typescript' if not present.
affects: >=1.0.0
Errors
Common errors & fixes
Failed to load plugin 'vtex' declared in 'vtex-react'
Missing eslint-plugin-vtex dependency.
fix
Run 'yarn add -D eslint-plugin-vtex'.
Configuration for rule 'react/jsx-filename-extension' is invalid
Invalid rule configuration.
fix
Check that your rule overrides are valid; refer to the eslint-plugin-react documentation.
Cannot find module 'eslint-config-vtex'
Missing base config 'eslint-config-vtex'.
fix
Run 'yarn add -D eslint-config-vtex' (automatically installed as a dependency of eslint-config-vtex-react, but ensure it's present).
Parsing error: Cannot read file 'tsconfig.json'
TypeScript project without a tsconfig.json.
fix
Create a tsconfig.json in the project root or ensure the parser can find it.
Upgrade
Version history
9.1.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency for ESLint functionality
prettierrequiredpeer dependency for code formatting integration
typescriptrequiredpeer dependency for TypeScript support
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
eslint-config-vtex-react — npm install eslint-config-vtex-react · libregistry