Skip to content

[Repo Assist] chore: fix .eslintrc.json sourceType and add eslint:recommended extends#109

Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/improve-eslintrc-2026-03-26-9993c6142138f7e2
Draft

[Repo Assist] chore: fix .eslintrc.json sourceType and add eslint:recommended extends#109
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/improve-eslintrc-2026-03-26-9993c6142138f7e2

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated draft PR from Repo Assist, an AI assistant.

Summary

Fixes two misconfiguration issues in .eslintrc.json that prevented ESLint from analysing this project correctly:

  1. sourceType: "module""script": The extension uses CommonJS (require / module.exports), not ES Modules. With "module", ESLint silently misparsed the file — exports, require, and module are not treated as globals in module mode even though env.commonjs: true partially compensates.

  2. 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).

  3. Clean up unused options: Remove "browser": false (already the default) and "ecmaFeatures": { "jsx": true } (no JSX in this project). Add "ecmaVersion": 2015 to match jsconfig.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.json sourceType from "module" to "script"") but no implementation PR existed.

Test Status

Unit tests: npm run test:unit — 7/7 pass
Syntax check: node --check extension.js — no syntax errors
⚠️ ESLint itself: node_modules not installed in this environment; the configuration change is logically correct and consistent with the project's CommonJS style.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants