
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
eslint-config-expo
Advanced tools
Base ESLint config for Expo projects. This is a minimal config that supports JSX and TypeScript, platform-specific global variables, and file extensions like .android.js, .ios.js and .web.js. You are intended to compose this base config with the linter rules of your choice in your own ESLint configuration.
yarn add --dev eslint-config-expo
You will also need to install eslint:
yarn add --dev eslint
Import this config into your configuration file, e.g. eslint.config.js and spread it into the config array.
// eslint.config.js
const expoConfig = require("eslint-config-expo/flat");
const { defineConfig } = require("eslint/config");
module.exports = defineConfig([
  expoConfig,
  // your other config
]);
Import this config into your own ESLint configuration using the extends option. ESLint checks both package.json and .eslintrc.* files for its configuration:
{
  "eslintConfig": {
    "extends": ["expo"]
  }
}
module.exports = {
  extends: ["expo"],
};
eslint-config-airbnb is a popular ESLint configuration that enforces Airbnb's JavaScript style guide. It is widely used in the JavaScript community for both web and mobile projects. Compared to eslint-config-expo, it provides a more general set of rules that are not specifically tailored for Expo or React Native, but it is highly regarded for its comprehensive and strict style guidelines.
eslint-config-react-app is the ESLint configuration used by Create React App. It is designed to work seamlessly with React projects, providing a set of rules that ensure code quality and consistency. While it is not specific to Expo, it offers a solid foundation for React projects, including those using React Native, but may require additional customization for Expo-specific needs.
eslint-plugin-react-native provides React Native specific linting rules. It can be used alongside other ESLint configurations to enhance linting for React Native projects. While eslint-config-expo includes some React Native rules, eslint-plugin-react-native offers a more focused set of rules for developers who need additional React Native-specific linting capabilities.
FAQs
ESLint config for Expo apps
The npm package eslint-config-expo receives a total of 446,888 weekly downloads. As such, eslint-config-expo popularity was classified as popular.
We found that eslint-config-expo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 25 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.