Skip to content

Commit cbfdbf0

Browse files
cs-rajharshitha-cstk
authored andcommitted
Merge pull request #2308 from contentstack/feat/DX-3870-2
Feat: Converted Clone to TS module
1 parent af39ea4 commit cbfdbf0

34 files changed

Lines changed: 5070 additions & 1140 deletions

.github/workflows/unit-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
- name: Run tests for Contentstack Branches
6969
working-directory: ./packages/contentstack-branches
7070
run: npm run test:unit
71+
72+
- name: Run tests for Contentstack Clone
73+
working-directory: ./packages/contentstack-clone
74+
run: npm run test:unit
7175

7276
# - name: Fetch latest references
7377
# run: |
Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
11
{
2-
"extends": "oclif"
2+
"env": {
3+
"node": true,
4+
"es2021": true
5+
},
6+
"parser": "@typescript-eslint/parser",
7+
"parserOptions": {
8+
"project": "tsconfig.json",
9+
"sourceType": "module"
10+
},
11+
"plugins": [
12+
"@typescript-eslint"
13+
],
14+
"extends": [
15+
"plugin:@typescript-eslint/recommended",
16+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
17+
],
18+
"ignorePatterns": [
19+
"lib/**/*",
20+
"test/**/*",
21+
"node_modules/**/*",
22+
"*.js"
23+
],
24+
"rules": {
25+
"@typescript-eslint/no-unused-vars": [
26+
"error",
27+
{
28+
"args": "none",
29+
"argsIgnorePattern": "^_",
30+
"varsIgnorePattern": "^_"
31+
}
32+
],
33+
"@typescript-eslint/prefer-namespace-keyword": "error",
34+
"@typescript-eslint/no-floating-promises": "error",
35+
"@typescript-eslint/no-misused-promises": "error",
36+
"@typescript-eslint/await-thenable": "error",
37+
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
38+
"semi": "off",
39+
"@typescript-eslint/no-redeclare": "off",
40+
"eqeqeq": ["error", "smart"],
41+
"id-match": "error",
42+
"no-eval": "error",
43+
"no-var": "error",
44+
"@typescript-eslint/no-explicit-any": "warn",
45+
"@typescript-eslint/no-require-imports": "off",
46+
"prefer-const": "error",
47+
"@typescript-eslint/no-unsafe-call": "off",
48+
"@typescript-eslint/no-unsafe-member-access": "off",
49+
"@typescript-eslint/no-unsafe-assignment": "off",
50+
"@typescript-eslint/no-unsafe-return": "off",
51+
"@typescript-eslint/no-unsafe-argument": "off",
52+
"@typescript-eslint/require-await": "off"
53+
}
354
}

packages/contentstack-clone/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/yarn.lock
77
node_modules
88
coverage
9+
/lib
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"require": ["test/helpers/init.js", "ts-node/register", "source-map-support/register"],
3+
"watch-extensions": [
4+
"ts"
5+
],
6+
"recursive": true,
7+
"timeout": 5000
8+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"include": [
3+
"lib/**/*.js",
4+
"src/**/*.ts"
5+
],
6+
"exclude": [
7+
"**/*.test.ts",
8+
"**/test/**",
9+
"**/node_modules/**"
10+
],
11+
"reporter": [
12+
"text",
13+
"text-summary",
14+
"lcov",
15+
"html"
16+
],
17+
"check-coverage": false,
18+
"statements": 90,
19+
"branches": 90,
20+
"functions": 90,
21+
"lines": 90,
22+
"extension": [
23+
".ts",
24+
".js"
25+
],
26+
"sourceMap": true,
27+
"instrument": true
28+
}

0 commit comments

Comments
 (0)