
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
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.
Shared ESLint configs for Expo's JS.
yarn add --dev eslint-config-expo
You will also need to install eslint
and prettier
:
yarn add --dev eslint prettier
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',
};
There are several configs for different platforms. They are:
expo
: the basic config for JavaScript projects for which there isn't a more specific configexpo/native
: the config for React Native projects, including Expo projects, with support for React and JSXexpo/web
: the config for code that runs in web browsers, with support for React and JSXexpo/node
: the config for code that runs in NodeFor an Expo project, your configuration might look like this:
"eslintConfig": {
"extends": "expo/native"
}
You also can extend multiple configs, which is useful for projects that span several platforms:
"eslintConfig": {
"extends": ["expo/node", "expo/web"]
}
FAQs
ESLint config for Expo apps
The npm package eslint-config-expo receives a total of 349,331 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.