{"id":19616,"library":"eslint-config-vtex-react","title":"VTEX ESLint Config for React","description":"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.","status":"active","version":"9.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/vtex/typescript","tags":["javascript","eslint","config","vtex","react"],"install":[{"cmd":"npm install eslint-config-vtex-react","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-vtex-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-vtex-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for ESLint functionality","package":"eslint","optional":false},{"reason":"peer dependency for code formatting integration","package":"prettier","optional":false},{"reason":"peer dependency for TypeScript support","package":"typescript","optional":false}],"imports":[{"note":"ESLint resolves 'vtex-react' automatically; do not include the full package name.","wrong":"extend 'eslint-config-vtex-react'","symbol":"eslint-config-vtex-react","correct":"extend 'vtex-react' in .eslintrc"},{"note":"Sub-preset for VTEX IO React applications.","wrong":"extend 'eslint-config-vtex-react/io'","symbol":"vtex-react/io","correct":"extend 'vtex-react/io' in .eslintrc"},{"note":"Sub-preset for React Native applications.","wrong":"extend 'eslint-config-vtex-react/native'","symbol":"vtex-react/native","correct":"extend 'vtex-react/native' in .eslintrc"}],"quickstart":{"code":"// 1. Install dependencies\n// yarn add -D eslint-config-vtex-react typescript prettier eslint\n\n// 2. Create .eslintrc with:\n{\n  \"extends\": [\"vtex-react\"],\n  \"rules\": {\n    // Override rules if needed\n  }\n}\n\n// 3. Optionally add a lint script to package.json:\n// \"lint\": \"eslint src --ext .ts,.tsx\"","lang":"json","description":"Shows how to install and configure eslint-config-vtex-react in a React project."},"warnings":[{"fix":"Use \"extends\": [\"vtex-react\"] instead.","message":"Do not use the full package name 'eslint-config-vtex-react' in the extends field; ESLint expects the shorthand 'vtex-react'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade ESLint to version 7 or 8.","message":"Version 9.x dropped support for ESLint 6 and below. Requires ESLint ^7 or ^8.","severity":"breaking","affected_versions":">=9.0.0"},{"fix":"Monitor release notes for migration guidance.","message":"The 'vtex-react/io' preset may become deprecated in future versions as VTEX IO evolves.","severity":"deprecated","affected_versions":">=9.0.0"},{"fix":"Run 'yarn add -D prettier' if not present.","message":"Make sure Prettier is installed as a peer dependency; the config assumes Prettier formatting.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run 'yarn add -D typescript' if not present.","message":"TypeScript must be installed as a peer dependency for linting TypeScript files.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'yarn add -D eslint-plugin-vtex'.","cause":"Missing eslint-plugin-vtex dependency.","error":"Failed to load plugin 'vtex' declared in 'vtex-react'"},{"fix":"Check that your rule overrides are valid; refer to the eslint-plugin-react documentation.","cause":"Invalid rule configuration.","error":"Configuration for rule 'react/jsx-filename-extension' is invalid"},{"fix":"Run 'yarn add -D eslint-config-vtex' (automatically installed as a dependency of eslint-config-vtex-react, but ensure it's present).","cause":"Missing base config 'eslint-config-vtex'.","error":"Cannot find module 'eslint-config-vtex'"},{"fix":"Create a tsconfig.json in the project root or ensure the parser can find it.","cause":"TypeScript project without a tsconfig.json.","error":"Parsing error: Cannot read file 'tsconfig.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}