From 64f1d387cd63760c63624d386a834ac93d69cd89 Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:33:46 +0530 Subject: [PATCH] eslint fixing --- .github/workflows/repo-sync.yml | 46 +++++++++---------- .../migration-sitecore/constants/index.js | 1 + 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 1ea83a94f..adb25358b 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -101,32 +101,32 @@ jobs: npm install --save-dev eslint @eslint/js globals - # if [ ! -f "eslint.config.cjs" ]; then - # echo "Creating default ESLint config..." - # cat < eslint.config.cjs - # const js = require("@eslint/js"); - # const globals = require("globals"); - - # module.exports = [ - # js.configs.recommended, - # { - # languageOptions: { - # ecmaVersion: "latest", - # sourceType: "module", - # globals: globals.node, - # }, - # rules: { - # "no-unused-vars": "warn", - # "no-console": "off" - # } - # } - # ]; - # EOL - # fi + if [ ! -f "eslint.config.cjs" ]; then + echo "Creating default ESLint config..." + cat < eslint.config.cjs + const js = require("@eslint/js"); + const globals = require("globals"); + + module.exports = [ + js.configs.recommended, + { + languageOptions: { + ecmaVersion: "latest", + sourceType: "module", + globals: globals.node, + }, + rules: { + "no-unused-vars": "warn", + "no-console": "off" + } + } + ]; + EOL + fi # # Remove unused imports and missing file references echo "Running ESLint to remove unused imports..." - npm install eslint -g + # npm install eslint -g eslint . --fix --ignore-pattern "cli/**" # echo "Running autoflake to remove unused imports..." diff --git a/upload-api/migration-sitecore/constants/index.js b/upload-api/migration-sitecore/constants/index.js index 3e5e04fc1..61f23f427 100644 --- a/upload-api/migration-sitecore/constants/index.js +++ b/upload-api/migration-sitecore/constants/index.js @@ -36,6 +36,7 @@ const MIGRATION_DATA_CONFIG = { ENTRIES_DIR_NAME : "entries", ENTRIES_MASTER_FILE : "index.json", + GLOBAL_FIELDS_DIR_NAME : "global_fields", GLOBAL_FIELDS_FILE: "globalfields",