Skip to content

Instantly share code, notes, and snippets.

@danielmorgan
Last active March 8, 2025 12:15
Show Gist options
  • Select an option

  • Save danielmorgan/0b670c00d326fe6b9d072c2c0487b523 to your computer and use it in GitHub Desktop.

Select an option

Save danielmorgan/0b670c00d326fe6b9d072c2c0487b523 to your computer and use it in GitHub Desktop.
Expo prettier/eslint setup
module.exports = {
extends: ["expo", "prettier"],
plugins: ["prettier"],
rules: {
"prettier/prettier": "error",
},
};
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
expo-env.d.ts
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*
!.env.example
# typescript
*.tsbuildinfo
app-example
# build folders
android
ios
# keys
google-services.json
{
"trailingComma": "es5",
"useTabs": false,
"tabWidth": 2,
"semi": true,
"printWidth": 100,
"bracketSpacing": true,
"bracketSameLine": false,
"endOfLine": "auto",
"importOrder": [
"^expo(.*)$",
"^(react|react-native)$",
"<THIRD_PARTY_MODULES>",
"^@/(.*)$",
"^[./]"
],
"importOrderSeparation": false,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"expo-env.d.ts"
]
}
@danielmorgan
Copy link
Author

danielmorgan commented Feb 28, 2025

npm i -D prettier eslint-config-prettier eslint-plugin-prettier @trivago/prettier-plugin-sort-imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment