ampproject / ampproject/amphtml

defend against variable declaration issue

Open
#39,383 1 comment 0 reactions 1 assignee Claimed by @erwinmombay View on GitHub
P1: High Priority Stale Type: Bug WG: infra WG: runtime
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Figure out how we can prevent https://github.com/ampproject/amphtml/issues/39381, https://github.com/ampproject/amphtml/issues/39380

the issue cropped itself up in our module build but is non an issue in our nomodule build (because of function scoping)

Look into https://eslint.org/docs/latest/rules/no-redeclare if we can use this lint rule to prevent the issue

also look into why our tests was not able to catch the issue

### Reproduction Steps

re introduce this renaming bug
https://github.com/ampproject/amphtml/commit/54c040015323502c18d65b31a03aec69b98dd0b3

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.