mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Summary: This adds TypeScript support to the community ESLint config. Our babel preset supports TypeScript by default, so it's nice to have TypeScript support pre-configured in the ESLint config too. Note: Users need to install `typescript` in their project for linting to work for TypeScript files. [General] [Added] - Add TypeScript support to the ESLint config Pull Request resolved: https://github.com/facebook/react-native/pull/24100 Differential Revision: D14597127 Pulled By: cpojer fbshipit-source-id: dfbf1b97061ed6e8c46aa49adb21630f5acdb5d1
eslint-config-react-native-community
Installation
yarn add --dev eslint @react-native-community/eslint-config
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Usage
Add to your eslint config (.eslintrc, or eslintConfig field in package.json):
{
"extends": "@react-native-community"
}