declapract-typescript-ehmpathy 0.35.9 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml +152 -0
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/deploy.yml +55 -0
- package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/test.yml +23 -0
- package/dist/practices/cicd-app-react-native-expo/best-practice/package.json +43 -0
- package/dist/practices/lint/best-practice/.depcheckrc.yml.declapract.ts +4 -0
- package/dist/practices/lint/best-practice/package.json.declapract.ts +4 -0
- package/dist/practices/lint-react/best-practice/package.json +7 -0
- package/dist/practices/lint-react-native/best-practice/.eslintrc.js +56 -0
- package/dist/practices/lint-react-native/best-practice/package.json +5 -0
- package/dist/practices/package-json-order/best-practice/package.json.declapract.ts +32 -0
- package/dist/practices/terraform-common/best-practice/package.json.declapract.ts +3 -0
- package/dist/useCases.yml +21 -2
- package/package.json +2 -1
- /package/dist/practices/{terraform → cicd-app-react-native-expo}/best-practice/package.json.declapract.ts +0 -0
- /package/dist/practices/{linting → lint}/bad-practices/tslint/package.json.declapract.ts +0 -0
- /package/dist/practices/{linting → lint}/bad-practices/tslint/tslint.json.declapract.ts +0 -0
- /package/dist/practices/{linting → lint}/best-practice/.declapract.readme.md +0 -0
- /package/dist/practices/{linting → lint}/best-practice/.depcheckrc.yml +0 -0
- /package/dist/practices/{linting → lint}/best-practice/.eslintrc.js +0 -0
- /package/dist/practices/{linting → lint}/best-practice/package.json +0 -0
- /package/dist/practices/{linting/best-practice/.depcheckrc.yml.declapract.ts → lint-react/best-practice/package.json.declapract.ts} +0 -0
- /package/dist/practices/{linting → lint-react-native}/best-practice/package.json.declapract.ts +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/dev/main.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/dev/versions.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/prod/main.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/prod/versions.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/test/main.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/environments/test/versions.tf +0 -0
- /package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/product/variables.tf +0 -0
- /package/dist/practices/{terraform → terraform-common}/bad-practices/terraform-dir/.declapract.readme.md +0 -0
- /package/dist/practices/{terraform → terraform-common}/bad-practices/terraform-dir/provision/terraform/<star><star>/.gitignore.declapract.ts +0 -0
- /package/dist/practices/{terraform → terraform-common}/bad-practices/terraform-dir/provision/terraform/<star><star>/<star>.hcl.declapract.ts +0 -0
- /package/dist/practices/{terraform → terraform-common}/bad-practices/terraform-dir/provision/terraform/<star><star>/<star>.tf.declapract.ts +0 -0
- /package/dist/practices/{terraform → terraform-common}/best-practice/.terraform-version +0 -0
- /package/dist/practices/{terraform → terraform-common}/best-practice/package.json +0 -0
- /package/dist/practices/{terraform → terraform-github}/best-practice/provision/github/environment/import-existing-repo.sh +0 -0
- /package/dist/practices/{terraform → terraform-github}/best-practice/provision/github/environment/main.tf +0 -0
- /package/dist/practices/{terraform → terraform-github}/best-practice/provision/github/environment/versions.tf +0 -0
- /package/dist/practices/{terraform → terraform-github}/best-practice/provision/github/product/repository.tf +0 -0
package/dist/practices/cicd-app-react-native-expo/best-practice/.github/workflows/.deploy-expo.yml
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
name: .deploy-expo
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
stage:
|
|
7
|
+
type: string
|
|
8
|
+
description: 'the stage of infrastructure to deploy against (e.g., prod, dev)'
|
|
9
|
+
required: true
|
|
10
|
+
build:
|
|
11
|
+
type: string
|
|
12
|
+
description: 'the build to deploy (e.g., production, preview, development)'
|
|
13
|
+
required: true
|
|
14
|
+
github-environment:
|
|
15
|
+
type: string
|
|
16
|
+
description: 'the github environment that the apply step will be executed in'
|
|
17
|
+
required: true
|
|
18
|
+
aws-region:
|
|
19
|
+
type: string
|
|
20
|
+
description: the aws region within which we should access
|
|
21
|
+
required: true
|
|
22
|
+
aws-account-id:
|
|
23
|
+
type: string
|
|
24
|
+
description: the id of the account the credentials are expected to access
|
|
25
|
+
required: true
|
|
26
|
+
needs-vpn-for-acceptance:
|
|
27
|
+
type: boolean
|
|
28
|
+
description: whether or not this environment needs vpn access for acceptance tests
|
|
29
|
+
required: false
|
|
30
|
+
default: false
|
|
31
|
+
app-web-deployment-s3-bucket:
|
|
32
|
+
type: string
|
|
33
|
+
description: the s3 bucket within which the web app is deployed
|
|
34
|
+
required: false
|
|
35
|
+
|
|
36
|
+
secrets:
|
|
37
|
+
expo-token:
|
|
38
|
+
required: true
|
|
39
|
+
description: required credentials to authenticate with expo eas
|
|
40
|
+
aws-access-key-id:
|
|
41
|
+
required: true
|
|
42
|
+
description: required credentials to authenticate with aws provider and state persistance
|
|
43
|
+
aws-secret-access-key:
|
|
44
|
+
required: true
|
|
45
|
+
description: required credentials to authenticate with aws provider and state persistance
|
|
46
|
+
open-vpn-config:
|
|
47
|
+
required: false
|
|
48
|
+
description: complete openvpn config required to enter the vpn, if needed
|
|
49
|
+
|
|
50
|
+
jobs:
|
|
51
|
+
deploy-os:
|
|
52
|
+
strategy:
|
|
53
|
+
matrix:
|
|
54
|
+
platform: [ios, android]
|
|
55
|
+
name: ${{ matrix.platform }}
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
if: ${{ inputs.stage == 'prod' }}
|
|
58
|
+
steps:
|
|
59
|
+
- name: checkout
|
|
60
|
+
uses: actions/checkout@v3
|
|
61
|
+
|
|
62
|
+
- name: set node-version
|
|
63
|
+
uses: actions/setup-node@v3
|
|
64
|
+
with:
|
|
65
|
+
node-version-file: '.nvmrc'
|
|
66
|
+
|
|
67
|
+
- name: configure aws credentials
|
|
68
|
+
uses: aws-actions/configure-aws-credentials@v1
|
|
69
|
+
id: credentials
|
|
70
|
+
with:
|
|
71
|
+
aws-access-key-id: ${{ secrets.aws-access-key-id }}
|
|
72
|
+
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
|
|
73
|
+
aws-region: ${{ inputs.aws-region }}
|
|
74
|
+
|
|
75
|
+
- name: confirm aws credentials
|
|
76
|
+
run: |
|
|
77
|
+
[[ ${{steps.credentials.outputs.aws-account-id}} != ${{ inputs.aws-account-id }} ]] \
|
|
78
|
+
&& echo 'wrong aws account' && exit 1 \
|
|
79
|
+
|| echo 'correct aws account';
|
|
80
|
+
|
|
81
|
+
- name: node-modules cache get
|
|
82
|
+
uses: actions/cache/restore@v4
|
|
83
|
+
id: cache
|
|
84
|
+
with:
|
|
85
|
+
path: ./node_modules
|
|
86
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
87
|
+
|
|
88
|
+
- name: node-modules cache miss install
|
|
89
|
+
if: steps.cache.outputs.cache-hit != 'true'
|
|
90
|
+
run: npm ci --ignore-scripts --prefer-offline --no-audit
|
|
91
|
+
|
|
92
|
+
- name: setup expo
|
|
93
|
+
uses: expo/expo-github-action@v8
|
|
94
|
+
with:
|
|
95
|
+
eas-version: latest
|
|
96
|
+
token: ${{ secrets.expo-token }}
|
|
97
|
+
|
|
98
|
+
- name: deploy ota update
|
|
99
|
+
run: eas update --auto --channel ${{ inputs.build }} --platform ${{ matrix.platform }} --non-interactive
|
|
100
|
+
|
|
101
|
+
- name: deploy app binary
|
|
102
|
+
run: eas build --profile ${{ inputs.build }} --platform ${{ matrix.platform }} --non-interactive --no-wait ${{ inputs.build == 'production' && '--auto-submit' || '' }}
|
|
103
|
+
|
|
104
|
+
deploy-web:
|
|
105
|
+
name: web
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
if: ${{ inputs.stage == 'prod' && inputs.app-web-deployment-s3-bucket }}
|
|
108
|
+
steps:
|
|
109
|
+
- name: checkout
|
|
110
|
+
uses: actions/checkout@v3
|
|
111
|
+
|
|
112
|
+
- name: set node-version
|
|
113
|
+
uses: actions/setup-node@v3
|
|
114
|
+
with:
|
|
115
|
+
node-version-file: '.nvmrc'
|
|
116
|
+
|
|
117
|
+
- name: configure aws credentials
|
|
118
|
+
uses: aws-actions/configure-aws-credentials@v1
|
|
119
|
+
id: credentials
|
|
120
|
+
with:
|
|
121
|
+
aws-access-key-id: ${{ secrets.aws-access-key-id }}
|
|
122
|
+
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
|
|
123
|
+
aws-region: ${{ inputs.aws-region }}
|
|
124
|
+
|
|
125
|
+
- name: confirm aws credentials
|
|
126
|
+
run: |
|
|
127
|
+
[[ ${{steps.credentials.outputs.aws-account-id}} != ${{ inputs.aws-account-id }} ]] \
|
|
128
|
+
&& echo 'wrong aws account' && exit 1 \
|
|
129
|
+
|| echo 'correct aws account';
|
|
130
|
+
|
|
131
|
+
- name: node-modules cache get
|
|
132
|
+
uses: actions/cache/restore@v4
|
|
133
|
+
id: cache
|
|
134
|
+
with:
|
|
135
|
+
path: ./node_modules
|
|
136
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
137
|
+
|
|
138
|
+
- name: node-modules cache miss install
|
|
139
|
+
if: steps.cache.outputs.cache-hit != 'true'
|
|
140
|
+
run: npm ci --ignore-scripts --prefer-offline --no-audit
|
|
141
|
+
|
|
142
|
+
- name: setup expo
|
|
143
|
+
uses: expo/expo-github-action@v8
|
|
144
|
+
with:
|
|
145
|
+
eas-version: latest
|
|
146
|
+
token: ${{ secrets.expo-token }}
|
|
147
|
+
|
|
148
|
+
- name: compile
|
|
149
|
+
run: npm run build:web
|
|
150
|
+
|
|
151
|
+
- name: deploy
|
|
152
|
+
run: aws s3 sync ./dist ${{ inputs.web-deployment-s3-bucket }} --delete --cache-control max-age=60,stale-while-revalidate=604800 # todo: fine tune the cache control; https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#stale-while-revalidate
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
branches:
|
|
8
|
+
- 'main'
|
|
9
|
+
- 'master'
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }} # per [workflow] x [branch, tag]
|
|
13
|
+
cancel-in-progress: true # only cancel work flows on non-latest commits
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
uses: ./.github/workflows/.test.yml
|
|
18
|
+
with:
|
|
19
|
+
aws-region: us-east-1
|
|
20
|
+
aws-account-id: '@declapract{variable.awsAccountId.dev}'
|
|
21
|
+
secrets:
|
|
22
|
+
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
23
|
+
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
24
|
+
|
|
25
|
+
# todo: start deploying dev builds for testing... want to be smart regarding how often we do this though -> e.g., no need to waste builds ($3 per build)
|
|
26
|
+
# dev:
|
|
27
|
+
# uses: ./.github/workflows/.deploy-expo.yml
|
|
28
|
+
# if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release)')
|
|
29
|
+
# needs: [test]
|
|
30
|
+
# with:
|
|
31
|
+
# stage: dev
|
|
32
|
+
# build: development
|
|
33
|
+
# github-environment: dev
|
|
34
|
+
# aws-region: us-east-1
|
|
35
|
+
# aws-account-id: '@declapract{variable.awsAccountId.dev}'
|
|
36
|
+
# secrets:
|
|
37
|
+
# expo-token: ${{ secrets.EXPO_TOKEN }}
|
|
38
|
+
# aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
39
|
+
# aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
40
|
+
|
|
41
|
+
prod:
|
|
42
|
+
uses: ./.github/workflows/.deploy-expo.yml
|
|
43
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
44
|
+
needs: [test]
|
|
45
|
+
with:
|
|
46
|
+
stage: prod
|
|
47
|
+
build: production
|
|
48
|
+
github-environment: prod
|
|
49
|
+
aws-region: us-east-1
|
|
50
|
+
aws-account-id: '@declapract{variable.awsAccountId.prod}'
|
|
51
|
+
app-web-deployment-s3-bucket: s3://@declapract{variable.projectName}-@declapract{variable.infrastructureNamespaceId}-prod'
|
|
52
|
+
secrets:
|
|
53
|
+
expo-token: ${{ secrets.EXPO_TOKEN }}
|
|
54
|
+
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
|
|
55
|
+
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
push:
|
|
6
|
+
branches-ignore:
|
|
7
|
+
- 'main' # exclude main branch, since deploy workflow triggers on main, and calls the test workflow inside of it already
|
|
8
|
+
tags-ignore:
|
|
9
|
+
- v* # exclude tags, since deploy workflow triggers on tags, and calls the test workflow inside of it already
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }} # per [workflow] x [branch, tag]
|
|
13
|
+
cancel-in-progress: true # cancel workflows for non-latest commits
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
suite:
|
|
17
|
+
uses: ./.github/workflows/.test.yml
|
|
18
|
+
with:
|
|
19
|
+
aws-region: us-east-1
|
|
20
|
+
aws-account-id: '@declapract{variable.awsAccountId.dev}'
|
|
21
|
+
secrets:
|
|
22
|
+
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
23
|
+
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jest": {
|
|
3
|
+
"preset": "jest-expo"
|
|
4
|
+
},
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"expo": "@declapract{check.minVersion('51.0.22')}",
|
|
7
|
+
"expo-dev-client": "@declapract{check.minVersion('4.0.20')}",
|
|
8
|
+
"expo-updates": "@declapract{check.minVersion('0.25.21')}"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"jest-expo": "@declapract{check.minVersion('51.0.3')}"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"start:hot:proxy": "npx local-ssl-proxy --source 3447 --target 8081",
|
|
15
|
+
"start:hot:dev": "STAGE=dev npx expo start --clear --dev-client",
|
|
16
|
+
"start:hot:dev:link": "echo '🚀 https://localhost.@declapract{variable.app.web.domain.dev}:@declapract{variable.app.web.port.hot}'",
|
|
17
|
+
"start:hot:dev:proxy": "npm run start:hot:dev:link && npm run start:hot:proxy",
|
|
18
|
+
"start:hot:prod": "STAGE=prod npx expo start --clear --dev-client",
|
|
19
|
+
"start:hot:prod:link": "echo '🚀 https://localhost.@declapract{variable.app.web.domain.prod}:@declapract{variable.app.web.port.hot}'",
|
|
20
|
+
"start:hot:prod:proxy": "npm run start:hot:prod:link && npm run start:hot:proxy",
|
|
21
|
+
"start:cold:proxy": "npx local-ssl-proxy --source 3449 --target 3000",
|
|
22
|
+
"start:cold:dev": "npm run build:web && npx serve dist --single",
|
|
23
|
+
"start:cold:dev:link": "echo '🚀 https://localhost.@declapract{variable.app.web.domain.dev}:@declapract{variable.app.web.port.cold}'",
|
|
24
|
+
"start:cold:dev:proxy": "echo npm run start:cold:dev:link && npm run start:cold:proxy",
|
|
25
|
+
"start:cold:prod": "npm run build:web && npx serve dist --single",
|
|
26
|
+
"start:cold:prod:link": "echo '🚀 https://localhost.@declapract{variable.app.web.domain.prod}:@declapract{variable.app.web.port.cold}'",
|
|
27
|
+
"register:device:apple:info": "echo 'learn more here https://docs.expo.dev/build/internal-distribution/'",
|
|
28
|
+
"register:device:apple:inclusions:rebuild:prod": "npx eas build --platform ios --clear-cache",
|
|
29
|
+
"register:device:apple:inclusions:rebuild:dev": "npx eas build --profile development --platform ios --clear-cache",
|
|
30
|
+
"register:device:apple:add": "echo 'register an apple device to allow it to install internal builds' && eas device:create && npm run register:device:apple:inclusions:rebuild",
|
|
31
|
+
"register:device:apple:list": "eas device:list",
|
|
32
|
+
"register:device:apple:delete": "eas device:delete",
|
|
33
|
+
"register:device:apple:rename": "eas device:rename",
|
|
34
|
+
"register:profile:apple:list": "echo 'see list here https://developer.apple.com/account/resources/profiles/list'",
|
|
35
|
+
"build:dev:ios": "eas build --profile development --platform ios --non-interactive",
|
|
36
|
+
"build:dev:android": "eas build --profile development --platform android --non-interactive",
|
|
37
|
+
"build:web": "npx expo export --platform web",
|
|
38
|
+
"deploy:prod:ios:metadata": "eas metadata:push",
|
|
39
|
+
"deploy:prod": "echo 'use github actions'",
|
|
40
|
+
"open:store:android": "https://play.google.com/console/u/0/developers/",
|
|
41
|
+
"open:store:ios": "browser https://appstoreconnect.apple.com/apps/"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
|
|
3
|
+
extends: [
|
|
4
|
+
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
5
|
+
'plugin:import/recommended', // specifies good import rules
|
|
6
|
+
'airbnb-typescript/base', // uses the airbnb recommended rules
|
|
7
|
+
'plugin:react/recommended',
|
|
8
|
+
'plugin:react-hooks/recommended',
|
|
9
|
+
'plugin:jsx-a11y/recommended',
|
|
10
|
+
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
|
|
11
|
+
],
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: './tsconfig.json',
|
|
14
|
+
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
|
|
15
|
+
sourceType: 'module', // Allows for the use of imports
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
'import/extensions': 'off', // too many false positives; should figure out why
|
|
19
|
+
'react/react-in-jsx-scope': 'off', // https://stackoverflow.com/a/68315971/3068233
|
|
20
|
+
'react/no-unescaped-entities': 'off', // too invasive -> not seeing the value either
|
|
21
|
+
'@typescript-eslint/explicit-function-return-type': 'off', // this can be figured out implicitly, and that is better
|
|
22
|
+
'sort-imports': 'off',
|
|
23
|
+
'import/prefer-default-export': 'off', // default export = bad
|
|
24
|
+
'import/no-default-export': 'error', // require named exports - they make it easier to refactor, enforce consistency, and increase constraints
|
|
25
|
+
'@typescript-eslint/no-non-null-assertion': 'off', // we use these to help typescript out when we know something it doesnt, and cant easily express that
|
|
26
|
+
'import/no-extraneous-dependencies': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
devDependencies: [
|
|
30
|
+
'**/*.test.ts',
|
|
31
|
+
'**/*.test.integration.ts',
|
|
32
|
+
'**/*.test.acceptance.ts',
|
|
33
|
+
'acceptance/**/*.ts',
|
|
34
|
+
'**/__test_utils__/**/*.ts',
|
|
35
|
+
'provision/**/*.ts',
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
'@typescript-eslint/no-explicit-any': 'off', // sometimes this is a valid definition
|
|
40
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
41
|
+
'import/no-cycle': 'off',
|
|
42
|
+
'max-classes-per-file': 'off',
|
|
43
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
44
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
45
|
+
'prefer-destructuring': 'off',
|
|
46
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
47
|
+
'lines-between-class-members': 'off',
|
|
48
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
49
|
+
'no-return-await': 'off', // this does not help anything and actually leads to bugs if we subsequently wrap the return in a try catch without remembering to _then_ add await
|
|
50
|
+
'@typescript-eslint/return-await': 'off',
|
|
51
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
52
|
+
},
|
|
53
|
+
settings: {
|
|
54
|
+
'import/ignore': ['react-native'], // https://github.com/facebook/react-native/issues/28549
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -65,12 +65,44 @@ export const desiredRelativeKeyOrder = {
|
|
|
65
65
|
'preversion',
|
|
66
66
|
'postversion',
|
|
67
67
|
'postinstall',
|
|
68
|
+
'prepare:husky',
|
|
68
69
|
'deploy:prune',
|
|
69
70
|
'deploy:release',
|
|
70
71
|
'deploy:send-notification',
|
|
71
72
|
'deploy:dev',
|
|
72
73
|
'deploy:prod',
|
|
73
74
|
'deploy',
|
|
75
|
+
|
|
76
|
+
// from app-react-native-expo
|
|
77
|
+
'start:hot:proxy',
|
|
78
|
+
'start:hot:dev',
|
|
79
|
+
'start:hot:dev:link',
|
|
80
|
+
'start:hot:dev:proxy',
|
|
81
|
+
'start:hot:prod',
|
|
82
|
+
'start:hot:prod:link',
|
|
83
|
+
'start:hot:prod:proxy',
|
|
84
|
+
'start:cold:proxy',
|
|
85
|
+
'start:cold:dev',
|
|
86
|
+
'start:cold:dev:link',
|
|
87
|
+
'start:cold:dev:proxy',
|
|
88
|
+
'start:cold:prod',
|
|
89
|
+
'start:cold:prod:link',
|
|
90
|
+
'register:device:apple:info',
|
|
91
|
+
'register:device:apple:inclusions:rebuild:prod',
|
|
92
|
+
'register:device:apple:inclusions:rebuild:dev',
|
|
93
|
+
'register:device:apple:add',
|
|
94
|
+
'register:device:apple:list',
|
|
95
|
+
'register:device:apple:delete',
|
|
96
|
+
'register:device:apple:rename',
|
|
97
|
+
'register:profile:apple:list',
|
|
98
|
+
'build:dev:ios',
|
|
99
|
+
'build:dev:android',
|
|
100
|
+
'build:web',
|
|
101
|
+
'deploy:prod:ios:metadata',
|
|
102
|
+
'open:store:android',
|
|
103
|
+
'open:store:ios',
|
|
104
|
+
'android',
|
|
105
|
+
'ios',
|
|
74
106
|
],
|
|
75
107
|
};
|
|
76
108
|
|
package/dist/useCases.yml
CHANGED
|
@@ -10,7 +10,7 @@ use-cases:
|
|
|
10
10
|
- errors
|
|
11
11
|
- format
|
|
12
12
|
- git
|
|
13
|
-
-
|
|
13
|
+
- lint
|
|
14
14
|
- node
|
|
15
15
|
- nonpublished-modules
|
|
16
16
|
- package-json-order
|
|
@@ -40,7 +40,9 @@ use-cases:
|
|
|
40
40
|
- node-service
|
|
41
41
|
- runtime-type-checking
|
|
42
42
|
- serverless
|
|
43
|
-
- terraform
|
|
43
|
+
- terraform-common
|
|
44
|
+
- terraform-github
|
|
45
|
+
- terraform-aws
|
|
44
46
|
- tests-service
|
|
45
47
|
- uuid
|
|
46
48
|
lambda-service-with-rds:
|
|
@@ -55,3 +57,20 @@ use-cases:
|
|
|
55
57
|
- lambda-service
|
|
56
58
|
practices:
|
|
57
59
|
- persist-with-dynamodb
|
|
60
|
+
app-react-native-expo:
|
|
61
|
+
practices:
|
|
62
|
+
- cicd-common
|
|
63
|
+
- cicd-app-react-native-expo
|
|
64
|
+
- conventional-commits
|
|
65
|
+
- husky
|
|
66
|
+
- format
|
|
67
|
+
- git
|
|
68
|
+
- node
|
|
69
|
+
- nonpublished-modules
|
|
70
|
+
- package-json-order
|
|
71
|
+
- prettier
|
|
72
|
+
- terraform-common
|
|
73
|
+
- terraform-github
|
|
74
|
+
- lint
|
|
75
|
+
- lint-react
|
|
76
|
+
- lint-react-native
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "declapract-typescript-ehmpathy",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "declapract best practices declarations for typescript",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.36.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally && npm run test:validate",
|
|
35
35
|
"test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
36
36
|
"prepush": "npm run test && npm run build",
|
|
37
|
+
"prepublish": "npm run build",
|
|
37
38
|
"preversion": "npm run prepush",
|
|
38
39
|
"postversion": "git push origin HEAD --tags --no-verify",
|
|
39
40
|
"postinstall": "[ -d .git ] && npm run prepare:husky || exit 0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/practices/{linting → lint-react-native}/best-practice/package.json.declapract.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/practices/{terraform → terraform-aws}/best-practice/provision/aws/product/variables.tf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|