Skip to content

Commit d3effde

Browse files
feat: cva test suite initial implementation
1 parent 8a8f289 commit d3effde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3663
-705
lines changed

.cz-config.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
module.exports = {
2+
types: [
3+
{
4+
value: 'feat',
5+
name: 'feat: new feature for the user, not a new feature for build script',
6+
},
7+
{
8+
value: 'fix',
9+
name: 'fix: bug fix for the user, not a fix to a build script',
10+
},
11+
{ value: 'docs', name: 'docs: Documentation only changes' },
12+
{
13+
value: 'style',
14+
name: 'style: formatting, missing semi colons, etc; no production code change',
15+
},
16+
{
17+
value: 'refactor',
18+
name: 'refactor: refactoring production code, eg. renaming a variable',
19+
},
20+
{
21+
value: 'test',
22+
name: 'test adding missing tests, refactoring tests; no production code change',
23+
},
24+
{
25+
value: 'chore',
26+
name: "chore: Other changes that don't modify src or test files",
27+
},
28+
{
29+
value: 'build',
30+
name: 'build: Changes that affect the build system or external dependencies',
31+
},
32+
{
33+
value: 'ci',
34+
name: 'ci: Changes to our CI configuration files and scripts',
35+
},
36+
{ value: 'perf', name: 'perf: Performance related changes' },
37+
{ value: 'revert', name: 'revert: Revert to a commit' },
38+
],
39+
40+
allowTicketNumber: true,
41+
isTicketNumberRequired: false,
42+
ticketNumberPrefix: 'TICKET-',
43+
ticketNumberRegExp: '\\d{1,5}',
44+
45+
// override the messages, defaults are as follows
46+
messages: {
47+
type: "Select the type of change that you're committing:",
48+
scope: '\nDenote the SCOPE of this change (optional):',
49+
// used if allowCustomScopes is true
50+
customScope: 'Denote the SCOPE of this change:',
51+
subject: 'Write a SHORT, IMPERATIVE (lowercase) description of the change:\n',
52+
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
53+
breaking: 'List any BREAKING CHANGES (optional):\n',
54+
footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
55+
confirmCommit: 'Are you sure you want to proceed with the commit above?',
56+
},
57+
58+
allowCustomScopes: true,
59+
allowBreakingChanges: ['feat', 'fix'],
60+
// skip any questions you want
61+
skipQuestions: ['ticketNumber'],
62+
63+
// limit subject length
64+
subjectLimit: 120,
65+
// breaklineChar: '|', // It is supported for fields body and footer.
66+
// footerPrefix : 'ISSUES CLOSED:'
67+
// askForBreakingChangeFirst : true, // default is false
68+
};

.eslintrc.json

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,50 @@
11
{
2-
"root": true,
3-
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
5-
"overrides": [
6-
{
7-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8-
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
10-
"error",
11-
{
12-
"enforceBuildableLibDependency": true,
13-
"allow": [],
14-
"depConstraints": [
15-
{
16-
"sourceTag": "*",
17-
"onlyDependOnLibsWithTags": ["*"]
18-
}
19-
]
20-
}
21-
]
22-
}
23-
},
24-
{
25-
"files": ["*.ts", "*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
27-
"rules": {}
28-
},
29-
{
30-
"files": ["*.js", "*.jsx"],
31-
"extends": ["plugin:@nrwl/nx/javascript"],
32-
"rules": {}
33-
}
34-
]
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
],
22+
"@typescript-eslint/ban-types": [
23+
"error",
24+
{
25+
"types": {
26+
"Function": false
27+
}
28+
}
29+
],
30+
"@typescript-eslint/no-non-null-assertion": "off"
31+
}
32+
},
33+
{
34+
"files": ["*.ts", "*.tsx"],
35+
"extends": ["plugin:@nrwl/nx/typescript"],
36+
"rules": {}
37+
},
38+
{
39+
"files": ["*.js", "*.jsx"],
40+
"extends": ["plugin:@nrwl/nx/javascript"],
41+
"rules": {}
42+
},
43+
{
44+
"files": ["*.ts"],
45+
"rules": {
46+
"@typescript-eslint/no-explicit-any": "off"
47+
}
48+
}
49+
]
3550
}

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Current Behavior
2+
3+
<!-- The behavior we have today -->
4+
5+
## Expected Behavior
6+
7+
<!-- The behavior you expect to have -->
8+
9+
## Motivation
10+
11+
<!-- Why is this behavior expected? -->
12+
13+
## Additional Notes

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Current Behavior
2+
3+
<!-- The behavior we have today before this PR is merged -->
4+
5+
## Expected Behavior
6+
7+
<!-- The behavior we will have after the PR is merged -->
8+
9+
## Motivation
10+
11+
<!-- Why is this behavior expected? -->
12+
13+
## Related Issue
14+
15+
<!-- Please link an issue from github -->
16+
<!-- that may provide more information regarding this PR -->
17+
18+
## Additional Notes
19+
20+
<!-- ... -->

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: on-pull-request
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
8+
jobs:
9+
build:
10+
name: Build and Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Use Node 14.x
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '14.x'
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Check Formatting
22+
run: npm run format:check
23+
- name: Integration Test
24+
run: npm run test
25+
- name: Test Package
26+
run: npm run test-package
27+
- name: Build App
28+
run: npm run build -- --prod
29+
- name: Build Package
30+
run: npm run build-package

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"singleQuote": true
2+
"singleQuote": true,
3+
"printWidth": 120,
4+
"tabWidth": 4
35
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License Copyright (c) 2021 Dmitriy Stepanenko
2+
3+
Permission is hereby granted,
4+
free of charge, to any person obtaining a copy of this software and associated
5+
documentation files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use, copy, modify, merge,
7+
publish, distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to the
9+
following conditions:
10+
11+
The above copyright notice and this permission notice
12+
(including the next paragraph) shall be included in all copies or substantial
13+
portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
18+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)