@fooxly/eslint-config-react-native
The default ESLint config for Fooxly projects using React Native.
Last updated 19 days ago by luchermkens .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fooxly/eslint-config-react-native 
SYNC missed versions from official npm registry.

Fooxly ESLint Config for React Native

The default ESLint config for Fooxly projects using React Native.

npm version downloads js-fooxly-style ci status

:rocket:  Powered By

:heart:  Support us

About 40% of your donation goes to one of the charities we support. For further information or questions please visit our website or contact us via charity@fooxly.com.

BuyMeACoffee    Patreon    PayPal


:cloud:  Installation

using npm

npm install --save-dev @fooxly/eslint-config-react-native

using yarn

yarn add -D @fooxly/eslint-config-react-native

:triangular_ruler:  Usage

We recommend using Babel's ESLint parser.

using .eslintrc

{
  "parser": "babel-eslint",
  "extends": ["@fooxly/eslint-config-react-native"]
}

using package.json

...
"eslintConfig": {
  "parser": "babel-eslint",
  "extends": ["@fooxly/eslint-config-react-native"]
}
...

:straight_ruler:  Our Configuration

This configuration extends our React config with a few additional rules for React Native.

No Inline Styles

Logging level: Error

Unless variables (like Animations) are used for inline styling, these slow down your app (mostly during re-renders) and are therefore not allowed.

No Unused Styles

Logging level: Error

This one is obvious, reduces the bundle size due to the styles not being used anyways.

No Color Literals

Logging level: Warning

We (like others) prefer storing all our color variables inside a theme file (like styled-components theming) or folder.

Splitting Platform Components

Logging level: Warning

Splitting platform-specific parts of your app in multiple files produces the correct bundle per platform.

No Single Element Style Arrays

Logging level: Error

These cause an unnecessary performance loss due to the array's identity changing on every re-render, and are therefore not allowed.

:label:  Badge

Are you using this in one of your projects? Include this badge in your README to let others know that your code is using the Fooxly code style.

js-fooxly-style

[![js-fooxly-style](https://img.shields.io/badge/code%20style-fooxly-brightgreen)](https://www.npmjs.com/package/@fooxly/eslint-config-react-native)

Current Tags

  • 3.0.0                                ...           latest (19 days ago)

4 Versions

  • 3.0.0                                ...           19 days ago
  • 2.0.1                                ...           6 months ago
  • 2.0.0                                ...           6 months ago
  • 1.0.0                                ...           7 months ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 14
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |