Skip to content

Commit 88da0c4

Browse files
authored
Merge pull request #1 from Runninghill/feature/implement
Setup project and created validator to validate RSA phone numbers
2 parents b9eaa2d + 0a9fef5 commit 88da0c4

20 files changed

+19835
-102
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.gitignore

Lines changed: 45 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,49 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
2033

2134
# Coverage directory used by tools like istanbul
2235
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
10236

103-
# TernJS port file
104-
.tern-port
37+
# misc
38+
/.sass-cache
39+
/connect.lock
40+
/coverage
41+
/libpeerconnection.log
42+
npm-debug.log
43+
yarn-error.log
44+
testem.log
45+
/typings
46+
47+
# System Files
48+
.DS_Store
49+
Thumbs.db

CONTRIBUTOR_README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Angular South African Form Validators
2+
3+
A set of South African specific validators for Angular forms.
4+
5+
# Getting Started
6+
7+
1. Clone the repo.
8+
9+
3. Navigate to `projects/rh-rsa-form-validators`
10+
11+
2. Run `npm install`.
12+
13+
4. Create a feature or bugfix branch.
14+
15+
3. Make your changes.
16+
17+
4. Ensure that your changes are of good quality and comply with our [Coding Standards](#coding-standards).
18+
19+
5. Commit your changes and submit a PR to merge your changes into `main`.
20+
21+
# NPM Scripts
22+
23+
To check eslint, run command `npm run lint`.
24+
25+
To check unit tests, run command `npm run test`.
26+
27+
# Contribute
28+
29+
Ensure you work out of the project itself (`projects/rh-rsa-form-validators`) and not the Angular workspace
30+
31+
Always make the code better, if you see errors, please fix them.
32+
33+
Add tests and try to move the code coverage up to 90%.
34+
35+
Update the [usage documentation](/projects/rh-rsa-form-validators/README.md).
36+
37+
Bump the version number according to [semantic versioning](https://semver.org/#semantic-versioning-200).
38+
39+
Adhere to the [Coding Standards](#coding-standards).
40+
41+
Only the classes and models exported in `public-api.ts` will be exposed through the package.
42+
43+
# Coding Standards
44+
45+
TODO: Define coding standards
46+
47+
- Form validators should not make the form control required.

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

angular.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"rh-rsa-form-validators": {
7+
"projectType": "library",
8+
"root": "projects/rh-rsa-form-validators",
9+
"sourceRoot": "projects/rh-rsa-form-validators/src",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
14+
"options": {
15+
"tsConfig": "projects/rh-rsa-form-validators/tsconfig.lib.json",
16+
"project": "projects/rh-rsa-form-validators/ng-package.json"
17+
},
18+
"configurations": {
19+
"production": {
20+
"tsConfig": "projects/rh-rsa-form-validators/tsconfig.lib.prod.json"
21+
}
22+
}
23+
},
24+
"test": {
25+
"builder": "@angular-devkit/build-angular:karma",
26+
"options": {
27+
"main": "projects/rh-rsa-form-validators/src/test.ts",
28+
"tsConfig": "projects/rh-rsa-form-validators/tsconfig.spec.json",
29+
"karmaConfig": "projects/rh-rsa-form-validators/karma.conf.js"
30+
}
31+
},
32+
"lint": {
33+
"builder": "@angular-devkit/build-angular:tslint",
34+
"options": {
35+
"tsConfig": [
36+
"projects/rh-rsa-form-validators/tsconfig.lib.json",
37+
"projects/rh-rsa-form-validators/tsconfig.spec.json"
38+
],
39+
"exclude": [
40+
"**/node_modules/**"
41+
]
42+
}
43+
}
44+
}
45+
}},
46+
"cli": {
47+
"analytics": false
48+
},
49+
"defaultProject": "rh-rsa-form-validators"
50+
}

0 commit comments

Comments
 (0)