{"id":19608,"library":"eslint-config-universe","title":"eslint-config-universe","description":"Shared ESLint configs for Expo projects, providing a single dependency to set up ESLint with TypeScript, React, and Prettier. Currently at version 15.0.3, it follows Expo's release cadence and updates frequently to align with new ESLint rules and Expo SDK changes. Differentiators include automatic parser detection based on TypeScript usage, built-in support for React Native and React, and seamless integration with Expo's ecosystem. Requires ESLint >=8.10 and Prettier >=3. Notably, the default export provides a comprehensive base config, but developers often misuse the require path or fail to install peer dependencies.","status":"active","version":"15.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/expo/expo","tags":["javascript","eslint-config","expo","react-native"],"install":[{"cmd":"npm install eslint-config-universe","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-universe","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-universe","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to run ESLint","package":"eslint","optional":false},{"reason":"Peer dependency required for formatting rules","package":"prettier","optional":false}],"imports":[{"note":"Use the string 'universe' in ESLint config's extends array. Direct require is incorrect.","wrong":"const config = require('eslint-config-universe')","symbol":"default config","correct":"module.exports = { extends: 'universe' }"},{"note":"The TypeScript config is at 'universe/shared/typescript', not 'universe/typescript'.","wrong":"module.exports = { extends: 'universe/typescript' }","symbol":"TypeScript config","correct":"module.exports = { extends: 'universe/shared/typescript' }"},{"note":"Use 'universe/web' for web projects; 'universe' includes React Native rules.","wrong":"module.exports = { extends: 'universe' } (without specifying web)","symbol":"Web config","correct":"module.exports = { extends: 'universe/web' }"}],"quickstart":{"code":"// Install peer dependencies first\n// npm install --save-dev eslint prettier eslint-config-universe\n\n// .eslintrc.js\nmodule.exports = {\n  extends: 'universe',\n  // For TypeScript projects, use 'universe/shared/typescript' instead\n  // For web projects, use 'universe/web'\n  env: {\n    node: true,\n    browser: true,\n    es2021: true,\n  },\n  parserOptions: {\n    ecmaVersion: 'latest',\n    sourceType: 'module',\n  },\n};\n","lang":"javascript","description":"Sets up ESLint with Expo's recommended config. Requires installing peer deps and correct extends path."},"warnings":[{"fix":"Update your ESLint config: use 'universe' for RN or 'universe/web' for web projects.","message":"Since version 12, the recommended config no longer automatically detects React Native; use 'universe' (includes RN) or 'universe/web' explicitly.","severity":"breaking","affected_versions":">=12.0"},{"fix":"Use 'universe' or customize with 'universe/shared/typescript' as needed.","message":"The 'universe/node' config is deprecated and will be removed in a future version.","severity":"deprecated","affected_versions":">=14.0"},{"fix":"Install prettier: npm install --save-dev prettier","message":"Missing peer dependency 'prettier' causes runtime error: 'Cannot find module 'prettier''.","severity":"gotcha","affected_versions":">=10.0"},{"fix":"Use ELLint 8.x or stick with legacy config until flat config support is added.","message":"ESLint 9 flat config is not supported; this config uses legacy .eslintrc format.","severity":"gotcha","affected_versions":">=9.0 (ESLint)"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev eslint-config-universe","cause":"eslint-config-universe is not installed or not in node_modules.","error":"Error: Failed to load config 'universe' to extend from."},{"fix":"npm install --save-dev prettier","cause":"Missing peer dependency prettier.","error":"Cannot find module 'prettier'"},{"fix":"Update eslint-plugin-react to the version required by eslint-config-universe.","cause":"Incompatible eslint-plugin-react version.","error":"Configuration for rule 'react/jsx-no-bind' is invalid"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}