diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 14373d1a5..81b45e7ba 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -104,29 +104,33 @@ jobs: 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", - "@typescript-eslint/no-var-requires": 'off', - "@typescript-eslint/no-var-requires": "off", - "no-prototype-builtins": "off", - "@typescript-eslint/no-explicit-any": "off", - "no-constant-condition": "off" + const js = require("@eslint/js"); + const globals = require("globals"); + const tsPlugin = require("@typescript-eslint/eslint-plugin"); + + module.exports = [ + js.configs.recommended, + { + languageOptions: { + ecmaVersion: "latest", + sourceType: "module", + globals: globals.node, + parser: require.resolve("@typescript-eslint/parser"), + }, + plugins: { + "@typescript-eslint": tsPlugin, + }, + rules: { + "no-unused-vars": "warn", + "no-console": "off", + "@typescript-eslint/no-var-requires": "off", + "no-prototype-builtins": "off", + "@typescript-eslint/no-explicit-any": "off", + "no-constant-condition": "off" + } } - } - ]; - EOL + ]; + EOL fi # # Remove unused imports and missing file references diff --git a/upload-api/migration-sitecore/libs/contenttypes.js b/upload-api/migration-sitecore/libs/contenttypes.js index f03747176..3970722c7 100644 --- a/upload-api/migration-sitecore/libs/contenttypes.js +++ b/upload-api/migration-sitecore/libs/contenttypes.js @@ -11,6 +11,7 @@ const configChecker = path?.join('content', 'Common', 'Configuration'); const append = 'a'; let config = {}; + const { DATA_MAPPER_DIR, DATA_MAPPER_CONFIG_FILE,