Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/christoph-jerolimov/react-native-with-eslint

react-native example project with ESLint configuration
https://github.com/christoph-jerolimov/react-native-with-eslint

eslint react-native

Last synced: about 2 months ago
JSON representation

react-native example project with ESLint configuration

Awesome Lists containing this project

README

        

# react-native example project with ESLint configuration

[![Build Status](https://travis-ci.org/jerolimov/react-native-with-eslint.svg?branch=master)](https://travis-ci.org/jerolimov/react-native-with-eslint)

This project contains an "bare" [react-native](http://facebook.github.io/react-native/)" projects
with enabled [ESLint](https://eslint.org/) configuration.

## Step by step

* Create your react-native app:
* Run `react-native init Tutorial`
* Add ESLint runtime and plugins.
* With npm: `npm install --save-dev eslint babel-eslint eslint-plugin-react eslint-plugin-react-native`
* Alternative with yarn: `yarn add --dev eslint babel-eslint eslint-plugin-react eslint-plugin-react-native`
* Add an ESLint configuration file, like this [.eslintrc.js](./eslintrc.js)
* Add a `lint` run script to your [package.json](package.json)
* Run the linter:
* With npm `npm run lint`
* or with yarn: `yarn run lint`

## Prettier

* Add dependency
* With npm: `npm install --save-dev prettier`
* Alternative with yarn: `yarn add --dev prettier`
* Add a prettier configuration
* For example a [.prettierrc.js](.prettierrc.js)