Skip to content

feat - add rule to prevent static imports in critical startup path#302772

Merged
bpasero merged 2 commits intomainfrom
ben/costly-baboon
Mar 18, 2026
Merged

feat - add rule to prevent static imports in critical startup path#302772
bpasero merged 2 commits intomainfrom
ben/costly-baboon

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Mar 18, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 18, 2026 11:14
@bpasero bpasero enabled auto-merge (squash) March 18, 2026 11:14
@bpasero bpasero self-assigned this Mar 18, 2026
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new local ESLint rule intended to protect the Electron main-process startup path by preventing synchronous loading of heavy node_modules via static imports, and wires the rule into the repo’s ESLint config for Electron main/node layers.

Changes:

  • Add local/code-no-static-node-module-import rule implementation to the local ESLint plugin.
  • Enable the rule (with a small allowlist) for Electron main + node-layer TypeScript files in eslint.config.js.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
eslint.config.js Enables the new local rule for Electron main/node startup-critical paths and defines allowlisted file globs.
.eslint-plugin-local/code-no-static-node-module-import.ts Implements the new rule that reports disallowed static imports and supports a per-file allowlist.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bpasero bpasero merged commit db0a6b7 into main Mar 18, 2026
20 checks passed
@bpasero bpasero deleted the ben/costly-baboon branch March 18, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants