ecr

eslint-config-react-native-prettier

Extends the following plugins and adds configuration that works well with React Native:

Showing:

Popularity

Downloads/wk

9

Maintenance

No Maintenance Data Available

Package

Dependencies

8

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

eslint-config-react-native-prettier

Extends the following plugins and adds configuration that works well with React Native:

plugin:flowtype/recommended
plugin:react/recommended
plugin:import/errors
plugin:import/warnings
prettier
prettier/flowtype
prettier/react

Set it up

  1. Install the package (& ESLint)
npm i eslint-config-react-native-prettier --save-dev

 # or

yarn add -D eslint-config-react-native-prettier

If you don't have eslint installed on your project already, install that too:

npm i eslint --save-dev

 # or

yarn add -D eslint
  1. Configure your project to use it

Create .eslintrc in your project root, and put this in it:

{
  "extends": [
    "react-native-prettier"
  ]
}

Feel free to customize further as you would in other ESLint configs.

  1. Add scripts

In package.json, you might want to add a couple of useful scripts:

"scripts": {
  "lint": "eslint .",
  "prettier": "eslint . --fix"
},
  1. Configure your editor

I use Visual Studio Code along with the vscode-eslint extension from Microsoft. I personally prefer disabling autofix on save and instead setting up a keyboard shortcut for formatting.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial