Skip to content

Commit f58d35b

Browse files
author
naman-contentstack
committed
fixed test cases, linter errors and added workflow for unit test cases
1 parent f5d45d0 commit f58d35b

File tree

20 files changed

+735
-321
lines changed

20 files changed

+735
-321
lines changed

.eslintrc

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
11
{
2+
"env": {
3+
"node": true
4+
},
5+
"parser": "@typescript-eslint/parser",
6+
"parserOptions": {
7+
"project": "tsconfig.json",
8+
"sourceType": "module"
9+
},
10+
"plugins": [
11+
"@typescript-eslint"
12+
],
213
"extends": [
3-
"oclif",
4-
"oclif-typescript"
5-
]
6-
}
14+
"plugin:@typescript-eslint/recommended"
15+
],
16+
"ignorePatterns": [
17+
"lib/**/*",
18+
"test/**/*"
19+
],
20+
"rules": {
21+
"@typescript-eslint/no-unused-vars": [
22+
"error",
23+
{
24+
"args": "none"
25+
}
26+
],
27+
"@typescript-eslint/prefer-namespace-keyword": "error",
28+
"quotes": "off",
29+
"semi": "off",
30+
"@typescript-eslint/no-redeclare": "off",
31+
"eqeqeq": [
32+
"error",
33+
"smart"
34+
],
35+
"id-match": "error",
36+
"no-eval": "error",
37+
"no-var": "error",
38+
"@typescript-eslint/no-explicit-any": "warn",
39+
"@typescript-eslint/no-require-imports": "warn",
40+
"prefer-const": "error"
41+
}
42+
}

.github/workflows/unit-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
run-tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: "22.x"
18+
19+
- name: Install dependencies
20+
run: |
21+
npm install
22+
23+
- name: Run tests
24+
run: npm run test

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
threshold: medium
22
fileignoreconfig:
33
- filename: package-lock.json
4-
checksum: 69eb1bbe84c2173e8e25a92031cb0b26eee906080415e85e87307c2f6f2ccfa9
4+
checksum: 21fac429ab80d0ffe81207cbd7e1cc33972d9410693cd4cfd4d57b00bc2f5233
55
version: "1.0"

0 commit comments

Comments
 (0)