Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-wallet!691
  • Loading branch information
AndreasGassmann committed Jun 30, 2023
2 parents b05454c + 871ee98 commit e6e95b9
Show file tree
Hide file tree
Showing 260 changed files with 21,136 additions and 17,659 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Chrome >=79
ChromeAndroid >=79
Firefox >=70
Edge >=79
Safari >=14
iOS >=14
192 changes: 192 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*'
],
overrides: [
{
files: [
'*.ts'
],
parserOptions: {
createDefaultProgram: true
},
extends: [
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended'
],
plugins: [
'eslint-plugin-no-null',
'eslint-plugin-react',
'@typescript-eslint',
'prefer-arrow',
'import'
],
rules: {
'@angular-eslint/component-class-suffix': 'off',
'@angular-eslint/component-selector': [
'error',
{
'type': 'element',
'prefix': 'airgap',
'style': 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
'type': 'attribute',
'prefix': 'airgap',
'style': 'camelCase'
}
],
'@angular-eslint/no-forward-ref': 'error',
'@angular-eslint/no-output-on-prefix': 'warn',
'@angular-eslint/prefer-output-readonly': 'error',
'@typescript-eslint/array-type': [
'error',
{
'default': 'array'
}
],
'@typescript-eslint/await-thenable': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/consistent-type-definitions': 'warn',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
'accessibility': 'explicit'
}
],
'@typescript-eslint/member-delimiter-style': [
'error',
{
'multiline': {
'delimiter': 'none',
'requireLast': true
},
'singleline': {
'delimiter': 'semi',
'requireLast': false
}
}
],
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_'
}
],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/quotes': [
'off',
'single',
{
'allowTemplateLiterals': true
}
],
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/semi': [
'error',
'never'
],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/unbound-method': 'warn',
'arrow-parens': [
'off',
'always'
],
'brace-style': [
'off',
'off'
],
'class-methods-use-this': 'warn',
'complexity': 'error',
'default-case': 'warn',
'eol-last': 'off',
'import/no-default-export': 'error',
'import/no-deprecated': 'error',
'import/no-extraneous-dependencies': 'warn',
'import/no-internal-modules': 'off',
'import/no-unassigned-import': 'off',
'import/order': 'error',
'linebreak-style': 'off',
'max-classes-per-file': 'off',
'max-len': 'off',
'max-lines': 'off',
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'warn',
'no-empty': 'off',
'no-extra-semi': 'off',
'no-invalid-this': 'error',
'no-irregular-whitespace': 'off',
'no-magic-numbers': 'off',
'no-null/no-null': 'off',
'no-param-reassign': 'warn',
'no-redeclare': 'off',
'no-return-await': 'error',
'no-sequences': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-trailing-spaces': 'off',
'no-void': 'error',
'padding-line-between-statements': 'off',
'prefer-const': 'warn',
'prefer-object-spread': 'off',
'prefer-template': 'warn',
'quote-props': 'off',
'react/jsx-curly-spacing': 'off',
'react/jsx-equals-spacing': 'off',
'react/jsx-tag-spacing': [
'off',
{
'afterOpening': 'allow',
'closingSlash': 'allow'
}
],
'react/jsx-wrap-multilines': 'off',
'space-before-function-paren': 'off',
'space-in-parens': [
'off',
'never'
],
'yoda': 'error'
}
},
{
files: [
'*.html'
],
extends: [
'plugin:@angular-eslint/template/recommended'
],
rules: {
'@angular-eslint/template/conditional-complexity': 'off',
'@angular-eslint/template/cyclomatic-complexity': 'off'
}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

Expand Down
42 changes: 21 additions & 21 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,27 @@ unit:
- lcov.info
- lintReport.json

qa:
stage: qa
script:
- docker create --name qa-$CI_PIPELINE_ID $TEST_TAG npm run sonar-scanner -- -X
-Dsonar.typescript.lcov.reportPaths=lcov.info
-Dsonar.typescript.tslint.reportPaths=lintReport.json
-Dsonar.test.inclusions=**/*.spec.ts
-Dsonar.tests=src/
-Dsonar.exclusions=**/node_modules/**,**/*.spec.ts,src/assets/libs/**
-Dsonar.sources=src/
-Dsonar.host.url=$SONAR_URL
-Dsonar.login=$SONAR_LOGIN
-Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.gitlab.project_id=$CI_PROJECT_ID
-Dsonar.branch.name=$CI_BUILD_REF_NAME
- docker cp lcov.info qa-$CI_PIPELINE_ID:/app/lcov.info
- docker cp lintReport.json qa-$CI_PIPELINE_ID:/app/lintReport.json
- docker start -a qa-$CI_PIPELINE_ID
after_script:
- docker rm -f qa-$CI_PIPELINE_ID || true
# qa:
# stage: qa
# script:
# - docker create --name qa-$CI_PIPELINE_ID $TEST_TAG npm run sonar-scanner -- -X
# -Dsonar.typescript.lcov.reportPaths=lcov.info
# -Dsonar.typescript.tslint.reportPaths=lintReport.json
# -Dsonar.test.inclusions=**/*.spec.ts
# -Dsonar.tests=src/
# -Dsonar.exclusions=**/node_modules/**,**/*.spec.ts,src/assets/libs/**
# -Dsonar.sources=src/
# -Dsonar.host.url=$SONAR_URL
# -Dsonar.login=$SONAR_LOGIN
# -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
# -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
# -Dsonar.gitlab.project_id=$CI_PROJECT_ID
# -Dsonar.branch.name=$CI_BUILD_REF_NAME
# - docker cp lcov.info qa-$CI_PIPELINE_ID:/app/lcov.info
# - docker cp lintReport.json qa-$CI_PIPELINE_ID:/app/lintReport.json
# - docker start -a qa-$CI_PIPELINE_ID
# after_script:
# - docker rm -f qa-$CI_PIPELINE_ID || true

build-android:
stage: platform_build
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.13.1
FROM node:16.19.1

# See https://crbug.com/795759
RUN apt-get update && apt-get install -yq libgconf-2-4 bzip2 build-essential libxtst6
Expand Down Expand Up @@ -36,7 +36,7 @@ COPY copy-builtin-modules.js /app
COPY browserify-coinlib.js /app

# install dependencies
RUN npm install
RUN npm install --legacy-peer-deps

# install static webserver
RUN npm install node-static -g
Expand All @@ -50,9 +50,6 @@ RUN npm run browserify-coinlib
# set to production
RUN export NODE_ENV=production

# post-install hook, to be safe if it got cached
RUN node config/patch_crypto.js

# build
RUN npm run build:prod

Expand Down
48 changes: 24 additions & 24 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
Expand All @@ -14,7 +13,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
Expand Down Expand Up @@ -51,7 +49,13 @@
"input": "src/global.scss"
}
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -64,9 +68,7 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -91,7 +93,8 @@
],
"progress": false
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand All @@ -102,9 +105,7 @@
"production": {
"browserTarget": "app:build:production"
},
"ci": {
"progress": false
}
"ci": {}
}
},
"extract-i18n": {
Expand Down Expand Up @@ -142,13 +143,6 @@
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
Expand Down Expand Up @@ -179,6 +173,15 @@
"baseHref": "/airgap-wallet/",
"message": "Deploying latest changes"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
},
Expand All @@ -197,20 +200,17 @@
"devServerTarget": "app:serve:ci"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"cli": {
"analytics": false,
"defaultCollection": "@ionic/angular-toolkit"
"schematicCollections": [
"@angular-eslint/schematics",
"@angular-eslint/schematics",
"@ionic/angular-toolkit"
]
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
Loading

0 comments on commit e6e95b9

Please sign in to comment.