mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 17:34:07 +08:00
Add .eslintrc to RN project template (#23901)
Summary: The goal of this PR is to enable eslint checks in the projects generated by `react-native init` command. I added `template/_eslintrc` file, that would be replaced in an initialized project with `.eslintrc` file. This PR comes in parallel with https://github.com/react-native-community/react-native-cli/pull/229 [General] [Added] - Added `.eslintrc` file to generated template. Pull Request resolved: https://github.com/facebook/react-native/pull/23901 Differential Revision: D14561084 Pulled By: cpojer fbshipit-source-id: 6eb717bf03c45d83ae8a393e6a0abb79e1e2f915
This commit is contained in:
committed by
Facebook Github Bot
parent
3c2300f4fe
commit
395197dafe
@@ -30,6 +30,14 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
|
||||
overrides: {
|
||||
files: ['**/__tests__/**/*.js', '**/?(*.)(spec|test).js'],
|
||||
env: {
|
||||
jest: true,
|
||||
'jest/globals': true,
|
||||
},
|
||||
},
|
||||
|
||||
// Map from global var to bool specifying if it can be redefined
|
||||
globals: {
|
||||
__DEV__: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native-community/eslint-config",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "ESLint config for React Native",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
||||
4
template/_eslintrc.js
Normal file
4
template/_eslintrc.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
Reference in New Issue
Block a user