Skip to content

Commit 791c806

Browse files
committed
Merge branch 'dev' of https://github.com/contentstack/migration-v2-node-server into feature/content-mapper
2 parents a60ad17 + 9f9cc37 commit 791c806

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

.github/workflows/repo-sync.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ jobs:
9898
git gc --prune=now # Garbage collect and prune unreachable objects
9999
100100
# echo "Installing ESLint dependencies..."
101-
npm install --save-dev eslint @eslint/js globals
101+
npm install --save-dev eslint @eslint/js globals @typescript-eslint/eslint-plugin @typescript-eslint/parser
102102
103103
104104
if [ ! -f "eslint.config.cjs" ]; then
105105
echo "Creating default ESLint config..."
106106
cat <<EOL > eslint.config.cjs
107-
const js = require("@eslint/js");
108-
const globals = require("globals");
107+
const js = require("@eslint/js");
108+
const globals = require("globals");
109+
const tsPlugin = require("@typescript-eslint/eslint-plugin");
109110
110111
module.exports = [
111112
js.configs.recommended,
@@ -114,11 +115,19 @@ jobs:
114115
ecmaVersion: "latest",
115116
sourceType: "module",
116117
globals: globals.node,
118+
parser: require("@typescript-eslint/parser"),
119+
},
120+
plugins: {
121+
"@typescript-eslint": tsPlugin,
117122
},
118123
rules: {
119124
"no-unused-vars": "warn",
120125
"no-console": "off",
121-
"@typescript-eslint/no-var-requires": 'off'
126+
"@typescript-eslint/no-var-requires": "off",
127+
"no-prototype-builtins": "off",
128+
"@typescript-eslint/no-explicit-any": "off",
129+
"no-constant-condition": "off",
130+
"no-constant-binary-expression": "off",
122131
}
123132
}
124133
];
@@ -225,7 +234,7 @@ jobs:
225234
git gc --prune=now # Garbage collect and prune unreachable objects
226235
227236
echo "Installing ESLint dependencies..."
228-
npm install --save-dev eslint @eslint/js globals
237+
npm install --save-dev eslint @eslint/js globals @typescript-eslint/eslint-plugin @typescript-eslint/parser
229238
230239
if [ ! -f "eslint.config.cjs" ]; then
231240
echo "Creating default ESLint config..."
@@ -243,7 +252,12 @@ jobs:
243252
},
244253
rules: {
245254
"no-unused-vars": "warn",
246-
"no-console": "off"
255+
"no-console": "off",
256+
"@typescript-eslint/no-var-requires": 'off',
257+
"@typescript-eslint/no-var-requires": "off",
258+
"no-prototype-builtins": "off",
259+
"@typescript-eslint/no-explicit-any": "off",
260+
"no-constant-condition": "off"
247261
}
248262
}
249263
];
@@ -318,7 +332,7 @@ jobs:
318332
git gc --prune=now # Garbage collect and prune unreachable objects
319333
320334
echo "Installing ESLint dependencies..."
321-
npm install --save-dev eslint @eslint/js globals
335+
npm install --save-dev eslint @eslint/js globals @typescript-eslint/eslint-plugin @typescript-eslint/parser
322336
323337
if [ ! -f "eslint.config.cjs" ]; then
324338
echo "Creating default ESLint config..."
@@ -336,7 +350,12 @@ jobs:
336350
},
337351
rules: {
338352
"no-unused-vars": "warn",
339-
"no-console": "off"
353+
"no-console": "off",
354+
"@typescript-eslint/no-var-requires": 'off',
355+
"@typescript-eslint/no-var-requires": "off",
356+
"no-prototype-builtins": "off",
357+
"@typescript-eslint/no-explicit-any": "off",
358+
"no-constant-condition": "off"
340359
}
341360
}
342361
];

upload-api/migration-contentful/libs/createInitialMapper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const path = require('path');
99
// const contentTypeMapper = require('./contentTypeMapper');
1010
const contentTypeMapper = require('./contentTypeMapper');
1111

12+
1213
/**
1314
* Internal module dependencies.
1415
*/

upload-api/migration-sitecore/libs/configuration.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ const {
1111
} = MIGRATION_DATA_CONFIG;
1212

1313

14+
15+
16+
1417
const assignFolderName = ({ path }) => {
1518
const spliter = "/sitecore";
1619
const newPath = path.split(spliter)?.[1];

upload-api/migration-sitecore/libs/contenttypes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ const groupFlat = (data, item) => {
372372
contentstackField: item?.meta?.name,
373373
contentstackFieldUid: uidCorrector({ uid: item?.meta?.key }),
374374
contentstackFieldType: 'group',
375-
backupFieldType: 'group',
376-
backupFieldUid: uidCorrector({ uid: item?.meta?.key })
375+
backupFieldType: 'group'
377376
};
378377
flat?.push(group);
379378
data?.schema?.forEach((element) => {
@@ -397,6 +396,7 @@ const contentTypeMapper = ({
397396
components,
398397
standardValues,
399398
content_type,
399+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
400400
basePath,
401401
sitecore_folder,
402402
affix

0 commit comments

Comments
 (0)