
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
eslint-config-expo
Advanced tools
The eslint-config-expo package provides a set of ESLint configurations tailored for Expo projects. It helps developers maintain consistent code quality and style across their React Native applications by extending the base ESLint configurations with additional rules and settings specific to Expo.
Expo-specific ESLint rules
This feature allows developers to extend their ESLint configuration with Expo-specific rules. By adding 'extends': 'expo' to the ESLint configuration file, developers can ensure that their code adheres to best practices and conventions recommended for Expo projects.
{
"extends": "expo"
}
Integration with React Native
This feature integrates React Native specific linting rules into the Expo configuration. By extending with 'plugin:react-native/all', developers can enforce React Native best practices alongside Expo-specific rules, ensuring a comprehensive linting setup for their mobile applications.
{
"extends": ["expo", "plugin:react-native/all"]
}
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.
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"],
};
FAQs
ESLint config for Expo apps
The npm package eslint-config-expo receives a total of 157,940 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 26 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.