{"id":19514,"library":"eslint-config-expo","title":"ESLint Config Expo","description":"Official ESLint configuration for Expo applications, maintained by the Expo team. Version 55.0.0 aligns with Expo SDK 55 and supports ESLint 8.x. Provides a consistent set of rules for Expo/React Native projects, including React, React Hooks, React Native, and Expo-specific best practices. Unlike generic React Native configs, this package includes rules tailored for Expo's file-based routing, Expo modules, and platform-specific code. Released in tandem with Expo SDK updates, typically on a monthly cadence. Key differentiators: first-class support for Expo Router, automatic detection of web vs native platforms, and integration with Expo's Metro bundler settings.","status":"active","version":"55.0.0","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-expo","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-expo","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-expo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; ESLint 8.10+ required","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since version 50 (SDK 50). Use dynamic import or assert type: 'module' in package.json if using require() in CommonJS.","wrong":"const expoConfig = require('eslint-config-expo');","symbol":"default config","correct":"import expoConfig from 'eslint-config-expo';"},{"note":"For CommonJS projects, dynamic import is required; direct require() throws 'ERR_REQUIRE_ESM'.","wrong":"const expoConfig = require('eslint-config-expo');","symbol":"default config (CommonJS workaround)","correct":"const expoConfig = (await import('eslint-config-expo')).default;"},{"note":"Type import is only available from version 50+. Use import type to avoid runtime errors.","wrong":"import { ESLintConfig } from 'eslint-config-expo';","symbol":"types","correct":"import type { ESLintConfig } from 'eslint-config-expo';"},{"note":"Since version 52, flat config is in a separate entrypoint. The default export is the legacy eslintrc config.","wrong":"import expo from 'eslint-config-expo';","symbol":"plugin reference (flat config)","correct":"import expo from 'eslint-config-expo/flat';"},{"note":"In eslintrc format, just 'expo' is enough; the full package name is not needed.","wrong":"extends: ['eslint-config-expo']","symbol":"plugin reference (legacy eslintrc)","correct":"module.exports = {\n  extends: ['expo'],\n};"}],"quickstart":{"code":"// Install: npm install --save-dev eslint-config-expo eslint@>=8.10\n// .eslintrc.js (CommonJS workaround)\nmodule.exports = {\n  extends: ['expo'],\n  rules: {\n    // Override rules if needed\n  },\n};\n\n// or flat config in eslint.config.js (ESM)\nimport expo from 'eslint-config-expo/flat';\nexport default [\n  ...expo,\n  {\n    rules: {\n      'react/react-in-jsx-scope': 'off',\n    },\n  },\n];\n\n// Run: npx eslint .","lang":"javascript","description":"Configure ESLint for an Expo project using either legacy eslintrc or flat config format, with ESLint 8.x."},"warnings":[{"fix":"Downgrade to ESLint 8.x or use eslintrc format with ESLint 8.","message":"ESLint 9 flat config is not supported. Only ESLint 8.x (>=8.10) is compatible.","severity":"breaking","affected_versions":">=55.0.0"},{"fix":"import expo from 'eslint-config-expo'; instead of 'eslint-config-expo/flat'.","message":"The 'eslint-config-expo/flat' entry point is deprecated as of SDK 55. Use the default export for flat config in future versions.","severity":"deprecated","affected_versions":"=55.0.0"},{"fix":"npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin","message":"If using strict TypeScript, you must also install @typescript-eslint/parser and @typescript-eslint/eslint-plugin separately; they are not included.","severity":"gotcha","affected_versions":">=50.0.0"},{"fix":"Use dynamic import or switch to ESM.","message":"CommonJS require() directly will fail with 'ERR_REQUIRE_ESM'. This package is ESM-only.","severity":"gotcha","affected_versions":">=50.0.0"}],"env_vars":null,"search_vec":"'55':21 '55.0.0':16 '8':25 'align':17 'applic':9 'automat':94 'base':64 'best':47 'bundler':107 'cadenc':84 'class':89 'code':72 'config':2,53,112 'configur':6 'consist':29 'detect':95 'differenti':86 'eslint':1,5,24,111 'eslint-config':110 'expo':3,8,13,19,45,60,66,77,92,104,113 'expo-specif':44 'expo/react':34 'file':63 'file-bas':62 'first':88 'first-class':87 'generic':50 'hook':40 'includ':37,56 'integr':102 'javascript':109 'key':85 'maintain':10 'metro':106 'modul':67 'month':83 'nativ':35,42,52,99,116 'offici':4 'packag':55 'platform':70,100 'platform-specif':69 'practic':48 'project':36 'provid':27 'react':38,39,41,51,115 'react-nat':114 'releas':73 'rout':65 'router':93 'rule':32,57 'sdk':20,78 'set':30,108 'specif':46,71 'support':23,90 'tailor':58 'tandem':75 'team':14 'typic':80 'unlik':49 'updat':79 'version':15 'vs':98 'web':97 'x':26","created_at":"2026-04-25T11:18:11.980567+00:00","updated_at":"2026-04-25T11:18:11.980567+00:00","problems":[{"fix":"Use dynamic import: const expoConfig = (await import('eslint-config-expo')).default;","cause":"Using require() to import an ESM-only package in a CommonJS file.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Ensure you have eslint-config-expo installed and your ESLint config uses the correct extends (just 'expo').","cause":"The config references 'expo' plugin but it's not installed; it is bundled within eslint-config-expo, but some versions require explicit peer dependency.","error":"ESLint couldn't find the plugin 'eslint-plugin-expo'."},{"fix":"Check your .eslintrc for duplicate or malformed rule settings; consider removing overrides if not needed.","cause":"Conflicting rule definitions in custom config override the recommended values.","error":"Configuration for rule 'react-hooks/exhaustive-deps' is invalid."},{"fix":"npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin","cause":"Missing peer dependency for TypeScript support.","error":"Cannot find module '@typescript-eslint/parser'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://docs.expo.dev","github":"https://github.com/expo/expo","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-config-expo","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}