Skip to content

Commit 9d63fee

Browse files
Initial commit
0 parents  commit 9d63fee

22 files changed

+14639
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
insert_final_newline = true
8+
end_of_line = lf
9+
trim_trailing_whitespace = true

.eslintrc.json

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"extends": [
5+
"@react-native-community",
6+
"plugin:import/errors",
7+
"plugin:import/typescript",
8+
"prettier/@typescript-eslint",
9+
"plugin:prettier/recommended"
10+
],
11+
"plugins": [
12+
"unicorn"
13+
],
14+
"settings": {
15+
"import/resolver": {
16+
"alias": {
17+
"map": [
18+
["~", "./lib"],
19+
["#", "./test"]
20+
],
21+
"extensions": [".ts", ".tsx", ".json"]
22+
}
23+
}
24+
},
25+
"rules": {
26+
// Bug avoiding
27+
"import/no-cycle": "error",
28+
"eslint-comments/no-unused-disable": "error",
29+
"@typescript-eslint/explicit-function-return-type": "error",
30+
"no-template-curly-in-string": ["error"],
31+
"nonblock-statement-body-position": ["error"],
32+
33+
// Code style
34+
"unicorn/filename-case": [
35+
"error",
36+
{
37+
"case": "kebabCase"
38+
}
39+
],
40+
"padding-line-between-statements": [
41+
"error",
42+
{
43+
"blankLine": "always",
44+
"prev": "*",
45+
"next": "block-like"
46+
},
47+
{
48+
"blankLine": "always",
49+
"prev": "block-like",
50+
"next": "*"
51+
}
52+
],
53+
"no-else-return": ["error"],
54+
"no-var": ["error"],
55+
"no-multi-spaces": ["error"],
56+
"no-sequences": ["error"],
57+
"no-useless-call": ["error"],
58+
"no-useless-concat": ["error"],
59+
"no-useless-return": ["error"],
60+
"no-void": ["error"],
61+
"no-multi-assign": ["error"],
62+
"no-multiple-empty-lines": ["error", { "max": 1 }],
63+
"no-negated-condition": ["error"],
64+
"array-bracket-newline": ["error", "consistent"],
65+
"eol-last": ["error", "always"],
66+
"keyword-spacing": ["error"],
67+
"no-nested-ternary": ["error"],
68+
"no-tabs": ["error"],
69+
"no-trailing-spaces": ["error"],
70+
"no-unneeded-ternary": ["error"],
71+
"no-whitespace-before-property": ["error"],
72+
"object-curly-newline": ["error", {
73+
"consistent": true
74+
}],
75+
"no-confusing-arrow": ["error"],
76+
"padded-blocks": ["error", "never"],
77+
"no-useless-computed-key": ["error"],
78+
"template-curly-spacing": ["error"],
79+
"@typescript-eslint/member-ordering": [
80+
"error",
81+
{
82+
"default": [
83+
"private-field",
84+
"protected-field",
85+
"public-field",
86+
"constructor",
87+
"private-method",
88+
"protected-method",
89+
"public-method"
90+
]
91+
}
92+
],
93+
"dot-location": ["error", "property"],
94+
95+
// Import
96+
"import/no-duplicates": ["error"],
97+
"import/no-namespace": ["error"],
98+
"no-restricted-imports": ["error", {
99+
"patterns": ["../*", "**/app_colors", "**/app_sizes", "**/app_fonts", "**/colors.json"]
100+
}],
101+
"import/order": ["error", {
102+
"newlines-between": "always",
103+
"groups": ["builtin", "external", "internal", "unknown"],
104+
"pathGroups": [
105+
{ "pattern": "~/**", "group": "internal" },
106+
{ "pattern": "./**", "group": "unknown" }
107+
]
108+
}]
109+
}
110+
}

.github/workflows/publish.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to Azure Artifacts
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone repository
12+
uses: actions/checkout@v2
13+
14+
- name: Read .nvmrc
15+
id: node_version
16+
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
17+
18+
- name: Setup node
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
22+
23+
- name: Configure .npmrc for Azure Artifacts
24+
uses: Vizir/[email protected]
25+
with:
26+
organization: vizir-banking
27+
project: vizir-banking
28+
feeds: vizir-banking
29+
username: vizir-banking
30+
token: ${{ secrets.AZURE_PAT }}
31+
32+
- name: Build
33+
run: |
34+
yarn install
35+
yarn release
36+
37+
- name: Publish
38+
run: npm publish

.github/workflows/pull-request.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone repository
13+
uses: actions/checkout@v2
14+
15+
- name: Read .nvmrc
16+
id: node_version
17+
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
18+
19+
- name: Setup node
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
23+
24+
- name: Configure .npmrc for Azure Artifacts
25+
uses: Vizir/[email protected]
26+
with:
27+
organization: vizir-banking
28+
project: vizir-banking
29+
feeds: vizir-banking
30+
username: vizir-banking
31+
token: ${{ secrets.AZURE_PAT }}
32+
33+
- name: Run CI
34+
run: |
35+
yarn install
36+
yarn lint
37+
yarn release

.gitignore

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
33+
# android eclipse
34+
android/.settings/
35+
android/app/.classpath
36+
android/app/.project
37+
android/app/.settings/
38+
android/.project
39+
40+
# node.js
41+
#
42+
dist/
43+
node_modules/
44+
npm-debug.log
45+
yarn-error.log
46+
47+
# BUCK
48+
buck-out/
49+
\.buckd/
50+
51+
# fastlane
52+
#
53+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
54+
# screenshots whenever they are needed.
55+
# For more information about the recommended setup visit:
56+
# https://docs.fastlane.tools/best-practices/source-control/
57+
58+
*/fastlane/report.xml
59+
*/fastlane/Preview.html
60+
*/fastlane/screenshots
61+
62+
# Bundle artifact
63+
*.jsbundle
64+
65+
# CocoaPods
66+
/ios/Pods/
67+
68+
#envs
69+
.env
70+
.env.qa
71+
.env.hml
72+
.env.prod
73+
.env.production
74+
75+
coverage
76+
77+
# android release config
78+
signing.properties

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@vizir-banking:registry=https://pkgs.dev.azure.com/vizir-banking/vizir-banking/_packaging/vizir-banking/npm/registry/
2+
always-auth=true

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10.14.2

.prettierrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"bracketSpacing": false,
3+
"jsxBracketSameLine": false,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"semi": true
7+
}

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "ms-azuretools.vscode-cosmosdb"]
3+
}

.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible Node.js debug attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach by Process ID",
11+
"processId": "${command:PickProcess}",
12+
"protocol": "inspector"
13+
}
14+
]
15+
}

.vscode/settings.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"eslint.validate": [
3+
"javascript",
4+
"typescript",
5+
"javascriptreact",
6+
"typescriptreact"
7+
],
8+
"editor.formatOnSave": true,
9+
"[javascript]": {
10+
"editor.formatOnSave": true
11+
},
12+
"[typescript]": {
13+
"editor.formatOnSave": true
14+
},
15+
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
16+
"[markdown]": {
17+
"editor.formatOnSave": false
18+
},
19+
"search.exclude": {
20+
"**/node_modules": true,
21+
"**/bower_components": true,
22+
"**/dist": true,
23+
"**/coverage": true
24+
},
25+
"appService.zipIgnorePattern": [
26+
".vscode{,/**}"
27+
],
28+
"appService.deploySubpath": "",
29+
"eslint.workingDirectories": [
30+
{
31+
"directory": ".",
32+
"changeProcessCWD": true
33+
}
34+
],
35+
"eslint.nodePath": "./node_modules",
36+
"editor.codeActionsOnSave": {
37+
"source.fixAll.eslint": true
38+
}
39+
}

.vscode/tasks.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "build",
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
}
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)