-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic NX, Expo, Prettier, ESLint, TypeScript configuration (#7)
Ticket IDs: 4954909653, 4954931590, 4954946135, 4954945454, 4954946646 Introduced basic configurations for: - NX - Expo - Prettier - ESLint - TypeScript - Configured Yarn 3 with node_modules linker instead of PnP. expo/expo-cli#1073 - Updated the VSCode dev-container with relevant extensions to streamline the development setup. Co-authored-by: Davit-BetterAngels <[email protected]>
- Loading branch information
1 parent
df75c14
commit be73325
Showing
51 changed files
with
21,353 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"root": true, | ||
"plugins": ["@nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nx/typescript"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"no-multiple-empty-lines": [ | ||
"error", | ||
{ | ||
"max": 1 | ||
} | ||
], | ||
"eol-last": ["error", "always"], | ||
"import/export": "error", | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ "allowTemplateLiterals": true, "avoidEscape": true } | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nx/javascript"], | ||
"rules": { | ||
"no-unused-vars": "error", | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ "allowTemplateLiterals": true, "avoidEscape": true } | ||
], | ||
"no-multiple-empty-lines": [ | ||
"error", | ||
{ | ||
"max": 1 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
dist | ||
tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Expo | ||
node_modules/ | ||
.expo/ | ||
dist/ | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
cache/ | ||
|
||
# Yarn 3 | ||
# https://github.com/yarnpkg/berry/issues/454#issuecomment-1411548086 | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
apps/outreach-e2e/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add files here to ignore them from prettier formatting | ||
/dist | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"nrwl.angular-console", | ||
"esbenp.prettier-vscode", | ||
"firsttris.vscode-jest-runner", | ||
"dbaeumer.vscode-eslint", | ||
"arcanis.vscode-zipfs" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.fixAll.eslint": true, | ||
"source.organizeImports": true | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.format.enable": true, | ||
"typescript.suggest.autoImports": true, | ||
"search.exclude": { | ||
"**/.pnp.*": true, | ||
"**/.yarn": true, | ||
"**/.venv": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.6.1.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Monorepo | ||
|
||
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||
|
||
✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ | ||
|
||
## Generate code | ||
|
||
If you happen to use Nx plugins, you can leverage code generators that might come with it. | ||
|
||
Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list <plugin-name>` to see what generators are available. | ||
|
||
Learn more about [Nx generators on the docs](https://nx.dev/plugin-features/use-code-generators). | ||
|
||
## Running tasks | ||
|
||
To execute tasks with Nx use the following syntax: | ||
|
||
``` | ||
nx <target> <project> <...options> | ||
``` | ||
|
||
You can also run multiple targets: | ||
|
||
``` | ||
nx run-many -t <target1> <target2> | ||
``` | ||
|
||
..or add `-p` to filter specific projects | ||
|
||
``` | ||
nx run-many -t <target1> <target2> -p <proj1> <proj2> | ||
``` | ||
|
||
Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/core-features/run-tasks). | ||
|
||
## Want better Editor Integration? | ||
|
||
Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users. | ||
|
||
## Ready to deploy? | ||
|
||
Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed. | ||
|
||
## Set up CI! | ||
|
||
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further. | ||
|
||
- [Set up remote caching](https://nx.dev/core-features/share-your-cache) | ||
- [Set up task distribution across multiple machines](https://nx.dev/core-features/distribute-task-execution) | ||
- [Learn more how to setup CI](https://nx.dev/recipes/ci) | ||
|
||
## Connect with us! | ||
|
||
- [Join the community](https://nx.dev/community) | ||
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools) | ||
- [Follow us on Twitter](https://twitter.com/nxdevtools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@nx/react/babel", | ||
{ | ||
"runtime": "automatic" | ||
} | ||
] | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"testRunner": { | ||
"args": { | ||
"$0": "jest", | ||
"config": "./jest.config.json" | ||
}, | ||
"jest": { | ||
"setupTimeout": 120000 | ||
} | ||
}, | ||
"apps": { | ||
"ios.debug": { | ||
"type": "ios.app", | ||
"build": "cd ../../apps/outreach/ios && xcodebuild -workspace Outreach.xcworkspace -scheme Outreach -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet", | ||
"binaryPath": "../../apps/outreach/ios/build/Build/Products/Debug-iphonesimulator/Outreach.app" | ||
}, | ||
"ios.release": { | ||
"type": "ios.app", | ||
"build": "cd ../../apps/outreach/ios && xcodebuild -workspace Outreach.xcworkspace -scheme Outreach -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet", | ||
"binaryPath": "../../apps/outreach/ios/build/Build/Products/Release-iphonesimulator/Outreach.app" | ||
}, | ||
|
||
"ios.local": { | ||
"type": "ios.app", | ||
"build": "npx nx run outreach:build --platform ios --profile preview --wait --local --no-interactive --output=../../apps/outreach/dist/Outreach.tar.gz", | ||
"binaryPath": "../../apps/outreach/dist/Outreach.app" | ||
}, | ||
|
||
"android.debug": { | ||
"type": "android.apk", | ||
"build": "cd ../../apps/outreach/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug", | ||
"binaryPath": "../../apps/outreach/android/app/build/outputs/apk/debug/app-debug.apk" | ||
}, | ||
"android.release": { | ||
"type": "android.apk", | ||
"build": "cd ../../apps/outreach/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release", | ||
"binaryPath": "../../apps/outreach/android/app/build/outputs/apk/release/app-release.apk" | ||
}, | ||
|
||
"android.local": { | ||
"type": "android.apk", | ||
"build": "npx nx run outreach:build --platform android --profile preview --wait --local --no-interactive --output=../../apps/outreach/dist/Outreach.apk", | ||
"binaryPath": "../../apps/outreach/dist/Outreach.apk" | ||
} | ||
}, | ||
"devices": { | ||
"simulator": { | ||
"type": "ios.simulator", | ||
"device": { | ||
"type": "iPhone 14" | ||
} | ||
}, | ||
"emulator": { | ||
"type": "android.emulator", | ||
"device": { | ||
"avdName": "Pixel_4a_API_30" | ||
} | ||
} | ||
}, | ||
"configurations": { | ||
"ios.sim.release": { | ||
"device": "simulator", | ||
"app": "ios.release" | ||
}, | ||
"ios.sim.debug": { | ||
"device": "simulator", | ||
"app": "ios.debug" | ||
}, | ||
|
||
"ios.sim.local": { | ||
"device": "simulator", | ||
"app": "ios.local" | ||
}, | ||
|
||
"android.emu.release": { | ||
"device": "emulator", | ||
"app": "android.release" | ||
}, | ||
"android.emu.debug": { | ||
"device": "emulator", | ||
"app": "android.debug" | ||
}, | ||
|
||
"android.emu.local": { | ||
"device": "emulator", | ||
"app": "android.local" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["plugin:@nx/react", "../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
Oops, something went wrong.