Skip to content

Instantly share code, notes, and snippets.

@abhishekbhardwaj
Created March 19, 2019 20:58
Show Gist options
  • Save abhishekbhardwaj/d8a32684aead1022ccd8318150346a80 to your computer and use it in GitHub Desktop.
Save abhishekbhardwaj/d8a32684aead1022ccd8318150346a80 to your computer and use it in GitHub Desktop.
ESLint for Typescript powered React Native Projects
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"universe/native",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "all"
}
],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"indent": ["error", 2]
}
}

Install dependencies with:

yarn add --dev eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import eslint-config-universe prettier eslint-config-prettier eslint-plugin-prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment