[Repo Assist] chore: fix .eslintrc.json sourceType and add eslint:recommended extends#109
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
- Change sourceType from 'module' to 'script': the extension uses CommonJS (require/module.exports), not ES Modules. The 'module' setting caused ESLint to misparse the code. - Add 'extends: eslint:recommended' to enable a sensible baseline of recommended rules automatically. - Remove 'browser: false' (already the default) and the unnecessary 'ecmaFeatures.jsx' option (no JSX in this project). - Add explicit 'ecmaVersion: 2015' to match the jsconfig.json target. - Existing rules are kept as 'warn' overrides so as not to introduce new lint errors on the current codebase. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated draft PR from Repo Assist, an AI assistant.
Summary
Fixes two misconfiguration issues in
.eslintrc.jsonthat prevented ESLint from analysing this project correctly:sourceType: "module"→"script": The extension uses CommonJS (require/module.exports), not ES Modules. With"module", ESLint silently misparsed the file —exports,require, andmoduleare not treated as globals in module mode even thoughenv.commonjs: truepartially compensates.Add
"extends": "eslint:recommended": Enables a well-known baseline of recommended rules automatically, consistent with the intent expressed in the planned 0.0.10 CHANGELOG entry (PR [Repo Assist] docs: add unreleased v0.0.10 changelog entries #64).Clean up unused options: Remove
"browser": false(already the default) and"ecmaFeatures": { "jsx": true }(no JSX in this project). Add"ecmaVersion": 2015to matchjsconfig.json.Existing rules are kept as
"warn"overrides so this PR does not introduce new lint errors on the current codebase — it only improves the configuration.This change was noted as a planned fix in PR #64's 0.0.10 CHANGELOG entry ("Fix
.eslintrc.jsonsourceTypefrom"module"to"script"") but no implementation PR existed.Test Status
✅ Unit tests:
⚠️ ESLint itself:
npm run test:unit— 7/7 pass✅ Syntax check:
node --check extension.js— no syntax errorsnode_modulesnot installed in this environment; the configuration change is logically correct and consistent with the project's CommonJS style.