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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import expoPlugin from 'eslint-plugin-expo'
✗ const expoPlugin = require('eslint-plugin-expo')
ESM-only since v1; no CommonJS support.
flat config (ESLint 9+)
✓ import expo from 'eslint-plugin-expo/configs/flat'
✗ import expo from 'eslint-plugin-expo'
Use the flat config entry point for ESLint 9+ flat config files.
rules
✓ import { rules } from 'eslint-plugin-expo'
✗ const { rules } = require('eslint-plugin-expo')
Named export for advanced usage; ESM only.
Shows both CommonJS (legacy) and flat config setup for Expo ESLint plugin, including an example rule.
// .eslintrc.cjs (CommonJS)
module.exports = {
plugins: ['expo'],
extends: ['plugin:expo/recommended'],
rules: {
'expo/no-env-var-imports': 'error',
},
};
// eslint.config.js (Flat config, ESLint 9+)
import expo from 'eslint-plugin-expo/configs/flat';
export default [
...expo.configs.recommended,
{
rules: {
'expo/no-env-var-imports': 'error',
},
},
];
Errors
Common errors & fixes
Could not find plugin "eslint-plugin-expo".
Missing npm package or incorrect module resolution.
fixRun: npm install eslint-plugin-expo --save-dev
Error: Failed to load plugin 'expo' declared in '.eslintrc': Cannot find module 'eslint-plugin-expo'
Plugin not installed in project's node_modules or global ESLint installation.
fixInstall locally: npm install eslint-plugin-expo@latest --save-dev
Audit
Dependencies
eslintrequiredpeer dependency, required to run the plugin