Skip to content

Commit

Permalink
[ENG-8956][eas-build] Improve EAS CLI tsconfig.json for local develop…
Browse files Browse the repository at this point in the history
…ment (#1933)

Changed noUnusedLocals and noUnusedParameters to false for easier local development and experimenting.
These checks do not run during local development. Instead, `yarn build` catches these cases on github.
  • Loading branch information
khamilowicz authored Jul 20, 2023
1 parent fe57c05 commit e963558
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
node-version: 18
- run: yarn install --frozen-lockfile --check-files
- run: yarn build
- run: yarn build-ci
- name: Build tarballs
working-directory: ${{ github.workspace }}/packages/eas-cli
run: |
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
with:
node-version: 18
- run: yarn install --frozen-lockfile --check-files
- run: yarn build
- run: yarn build-ci
- name: Build tarballs
working-directory: ${{ github.workspace }}/packages/eas-cli
run: |
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
node-version: 18
- run: yarn install --frozen-lockfile --check-files
- run: sudo apt-get install nsis
- run: yarn build
- run: yarn build-ci
- run: |
yarn pretarball-ci
yarn oclif pack:win
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --check-files
- name: Build
run: yarn build
run: yarn build-ci
- name: Publish packages to npm
run: yarn lerna publish from-package --yes --no-verify-access
env:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"scripts": {
"build": "lerna run build",
"build-ci": "lerna run build-ci",
"build:tarballs:linux": "yarn build-for-size-check",
"build-for-size-check": "yarn build && yarn workspace eas-cli pretarball-ci && CLI_SIZE_CHECK=1 yarn workspace eas-cli oclif pack:tarballs --no-xz --targets linux-x64",
"typecheck": "lerna run typecheck",
Expand Down
5 changes: 3 additions & 2 deletions packages/eas-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,12 @@
"scripts": {
"postpack": "rimraf oclif.manifest.json",
"prepack": "yarn rebuild && node ./scripts/prepack.js",
"rebuild": "rimraf build && yarn build",
"rebuild": "rimraf build && yarn build-ci",
"pretarball-ci": "./scripts/pretarball-ci.sh",
"build": "tsc --project tsconfig.build.json",
"build-ci": "tsc --project tsconfig.build-ci.json",
"watch": "yarn build --watch --preserveWatchOutput",
"typecheck": "tsc",
"typecheck": "tsc --project tsconfig.build-ci.json",
"test": "jest",
"version": "yarn oclif readme && node scripts/patch-readme && git add README.md",
"generate-graphql-code": "graphql-codegen --config graphql-codegen.yml",
Expand Down
8 changes: 8 additions & 0 deletions packages/eas-cli/tsconfig.build-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.build",
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true
},
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}
4 changes: 2 additions & 2 deletions packages/eas-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"strict": true,
"target": "ES2019",
"outDir": "build",
Expand Down
5 changes: 3 additions & 2 deletions packages/eas-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
"repository": "expo/eas-cli",
"scripts": {
"build": "tsc --project tsconfig.build.json",
"build-ci": "tsc --project tsconfig.build-ci.json",
"watch": "yarn build --watch --preserveWatchOutput",
"typecheck": "tsc",
"typecheck": "tsc --project tsconfig.build-ci.json",
"prepack": "yarn rebuild",
"rebuild": "rimraf build && yarn build",
"rebuild": "rimraf build && yarn build-ci",
"test": "jest",
"clean": "rimraf build node_modules yarn-error.log"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/eas-json/tsconfig.build-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.build",
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true
},
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}
4 changes: 2 additions & 2 deletions packages/eas-json/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"strict": true,
"target": "ES2019",
"outDir": "build",
Expand Down

0 comments on commit e963558

Please sign in to comment.