From e624631775cc376ea45b353a19296e23a049c8df Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:19:02 +0530 Subject: [PATCH] workflow changes --- .github/workflows/repo-sync.yml | 115 ++++++++++++++++---------------- 1 file changed, 57 insertions(+), 58 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index c96bcc312..045ca1b17 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -97,30 +97,29 @@ jobs: git clean -fdX # Remove untracked files and directories git gc --prune=now # Garbage collect and prune unreachable objects - if [ ! -f "eslint.config.cjs" ]; then + 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 + 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 @@ -187,27 +186,27 @@ jobs: git clean -fdX # Remove untracked files and directories git gc --prune=now # Garbage collect and prune unreachable objects - if [ ! -f "eslint.config.cjs" ]; then + 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 + 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 @@ -277,27 +276,27 @@ jobs: git clean -fdX # Remove untracked files and directories git gc --prune=now # Garbage collect and prune unreachable objects - if [ ! -f "eslint.config.cjs" ]; then + 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 + 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