Skip to content

GerardKetuma/eslint-config-react-native-gerardketuma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESLINT-CONFIG-REACT-NATIVE-GERARDKETUMA

CircleCI npm Commitizen friendly

This is my eslint configuration for React Native. I use this across all my React Native projects.

INSTALLATION

yarn add eslint prettier typescript eslint-config-react-native-gerardketuma --dev

Note: I'm using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

USAGE

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
  "extends": "react-native-gerardketuma"
}

Since this project lints TypeScript projects, you must have a tsconfig.json file in your root directory.

Add Prettier config file

Since this package uses Prettier to format code styles, we suggest adding a prettier config file to the root directory and setting your code editor to use a prettier plugin.

Prettier Config:

{
  "trailingComma": "es5",
  "tabWidth": 2,
  "semi": false,
  "singleQuote": true
}

VSCode Prettier Plugin:

Prettier - Code Formatter

VSCode ESLint Plugin:

VS Code ESLint extension

Set VSCode to Auto Fix ESLint errors and warnings on save:

"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}

About

Eslint Configuration used in all my React Native Apps.

Resources

Stars

Watchers

Forks

Packages

No packages published