fix: convert require() to ESM imports in scripts and fix lint errors#111
fix: convert require() to ESM imports in scripts and fix lint errors#111Akash-bajpai wants to merge 1 commit into
Conversation
a8ff848 to
392a22e
Compare
…ssions Signed-off-by: Akash-bajpai <aakashbajpai2003@gmail.com>
392a22e to
15bd377
Compare
|
Hi @dselman and @sanketshevkar! I'm Aakash Bajpai, a GSoC 2026 applicant. I've submitted a proposal for the LLM Based Template Logic Executor project. This is my first contribution to the repo — happy to make any changes needed! 🙏 |
|
Hi @dselman and @sanketshevkar GSoC 2026 applicant here. This is my first contribution — happy to make any changes! 🙏 |
|
Hi @dselman and @sanketshevkar! GSoC 2026 applicant here — happy to make any changes needed! 🙏 |
There was a problem hiding this comment.
Pull request overview
This PR attempts to resolve lint issues in repository scripts by converting CommonJS imports to ESM syntax and replacing an unused logical expression with an explicit conditional.
Changes:
- Converted
require()calls in scripts toimportstatements. - Simplified runtime dependency packaging helpers.
- Removed unused imports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scripts/updateRuntimeDependencies.js |
Updates imports and directory helper logic for runtime declaration generation. |
scripts/tag.js |
Updates semver import syntax and tag string quoting for npm publish tagging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync } = require('fs'); | ||
| const tar = require('tar'); | ||
| const path = require('path'); | ||
| import { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync } from 'fs'; |
| 'use strict'; | ||
|
|
||
| const semver = require('semver'); | ||
| import semver from "semver"; |
Problem
The scripts/tag.js and scripts/updateRuntimeDependencies.js files were using require() style imports which violated the @typescript-eslint/no-require-imports rule, causing 7 lint errors.
Additionally, updateRuntimeDependencies.js had an unused expression (!existsSync && mkdirSync) which violated @typescript-eslint/no-unused-expressions.
Fix
joinimport from pathResult
Lint errors reduced from 7 to 0. Only pre-existing warnings remain.
Relates to GSoC 2026 proposal: LLM Based Template Logic Executor