{"id":19617,"library":"eslint-config-vtex","title":"eslint-config-vtex","description":"VTEX's shared ESLint configuration, version 15.1.0. It provides a preset for both JavaScript and TypeScript projects, automatically applying TypeScript rules for .ts/.tsx files and requiring type-checking via tsconfig. The config is extensible and integrates with Prettier. Released monthly with breaking changes following VTEX's internal needs. Differentiates from other configs by its opinionated set of rules tuned for VTEX's ecosystem, including React and Node.js practices.","status":"active","version":"15.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/vtex/typescript","tags":["javascript","eslint","config","vtex"],"install":[{"cmd":"npm install eslint-config-vtex","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-vtex","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-vtex","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for linting","package":"eslint","optional":false},{"reason":"peer dependency for code formatting","package":"prettier","optional":false},{"reason":"peer dependency for TypeScript support","package":"typescript","optional":true}],"imports":[{"note":"In ESLint 8, 'extends' expects an array. Single string works but array is recommended for adding other configs.","wrong":"// wrong: extends as a string\n{ \"extends\": \"vtex\" }","symbol":"vtex (config name)","correct":"// .eslintrc\n{ \"extends\": [\"vtex\"] }"},{"note":"For TypeScript projects, parser is auto-detected; only set for JS override.","wrong":"// wrong: misspelled\nparser: \"babel-eslint-parser\"","symbol":"babel-eslint parser for JS files","correct":"parser: \"babel-eslint\""},{"note":"Required for rules requiring type information. Ensure tsconfig includes all linted files.","wrong":"// wrong: including node_modules\n{ \"exclude\": [] }","symbol":"TypeScript type-checking rules","correct":"// tsconfig.eslint.json\n{ \"extends\": \"./tsconfig.json\", \"include\": [\"**/*.ts\", \"**/*.tsx\", \"**/*.js\"], \"exclude\": [] }"}],"quickstart":{"code":"// .eslintrc\n{\n  \"extends\": [\"vtex\"],\n  \"rules\": {\n    \"no-console\": \"warn\"\n  }\n}","lang":"javascript","description":"Shows basic ESLint config extending vtex preset and overriding one rule."},"warnings":[{"fix":"Upgrade ESLint to version 8 or later.","message":"In v15, dropped support for ESLint 7; requires ESLint ^8.","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Replace 'babel-eslint' with '@babel/eslint-parser' in dependencies and config.","message":"babel-eslint is deprecated; use @babel/eslint-parser instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Create tsconfig.eslint.json that extends base and includes needed files.","message":"TypeScript type-checking rules require a tsconfig.json including all files.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always use array syntax: \"extends\": [\"vtex\"].","message":"Using 'extends' as a string instead of array can cause issues with override resolution.","severity":"gotcha","affected_versions":">=0.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-config-vtex (or npm install --save-dev eslint-config-vtex)","cause":"Missing package installation or incorrect extends value.","error":"Error: Cannot find module 'eslint-config-vtex'"},{"fix":"Add tsconfig.eslint.json and set parserOptions.project: './tsconfig.eslint.json'","cause":"Missing tsconfig for type-checking rules.","error":"ESLint: Error while loading rule '@typescript-eslint/...': You have used a rule which requires parserServices to be generated. You must provide 'parserOptions.project'."},{"fix":"Install @babel/eslint-parser and use parser: '@babel/eslint-parser'","cause":"babel-eslint not installed or wrong parser name.","error":"Error: Failed to load parser 'babel-eslint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}