# react-native-template-basic-app

> Template to create a new React Native project with ESLint, Prettier, Flow and Enzyme

Latest version **0.2.0** (published 2019-06-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-template-basic-app
pnpm add react-native-template-basic-app
yarn add react-native-template-basic-app
bun add react-native-template-basic-app
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-06-02 |
| First published | 2018-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Luciano Lima |
| Maintainers | lucianomlima |
| Keywords | react-native, template, eslint, prettier, flow, enzyme |

## Links

- npm: https://www.npmjs.com/package/react-native-template-basic-app
- Repository: https://github.com/lucianomlima/react-native-template-basic
- Issues: https://github.com/lucianomlima/react-native-template-basic/issues
- npm.io page: https://npm.io/package/react-native-template-basic-app

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-06-02
- 0.1.0 — 2018-10-29
- 0.0.9 — 2018-10-29
- 0.0.8 — 2018-10-29
- 0.0.7 — 2018-10-29
- 0.0.6 — 2018-10-28
- 0.0.5 — 2018-10-28
- 0.0.4 — 2018-10-03
- 0.0.3 — 2018-08-24
- 0.0.2 — 2018-07-15

## README

# React Native Basic App Template

A simple basic template to start a new React Native app with ESLint and custom scripts.

## Requirements

- node
- react-native-cli
- yarn

## Usage

Create a new project passing a template:

```
react-native init [ProjectName] --template basic-app
```

Wait for download dependencies.

### Finish installation

Run `node setup.js` to inject custom scripts and remove unnecessary files.

#### For VSCode users

If you use Path Intellisense extension add the following to `settings.json`:

```json
  "path-intellisense.mappings": {
    "~": "${workspaceRoot}/src"
  }
```

#### Flow configuration

Open `.flowconfig` file. Go to the `[options]` section and find the line where is `module.name_mapper`.
Add this to the next line:

```flow
module.name_mapper='^~\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
```

It should look like the following:

```flow
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
module.name_mapper='^~\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
```

## Includes

- [x] ESlint (extends Airbnb)
- [x] Husky
- [x] Lint Staged
- [x] Prettier
- [x] Flow
- [x] Enzyme

### Custom Scripts

- [x] `android:install` - Run in Release mode
- [x] `ios:install` - Run in Release mode
- [x] `project:clean` - Clean project
- [x] `prettier:check` - Check for unformatted files
- [x] `prettier:all` - Format files
- [x] `flow` - Run Flow
- [x] `lint` - Run lint
- [x] `start` - Start Metro Bundler
- [x] `start:clean` - Start Metro Bundler without cache
- [x] `test` - Run jest
- [x] `test:watch` - Run jest in watch mode

## Contributing

Clone this repo with `git clone https://github.com/lucianomlima/react-native-template-basic react-native-template-basic-app` cause npm needs project dir name to be equal to project name in `package.json`.

To execute the project with your changes, you can use the absolute path of cloned repo with `react-native-cli`:

```
react-native init [PROJECT_NAME] --template file:///path/to/repo
```

## License

MIT

---
_Source: https://npm.io/package/react-native-template-basic-app · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
