ampproject / ampproject/amp-toolbox
[linter] Runtime preload should only be required if boilerplate is still present
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/ampproject/amp-toolbox/pull/1248, we've skipped adding the AMP runtime preload(s) when the boilerplate had already been removed.
However, the linter still requires the runtime preload to be present unconditionally in https://github.com/ampproject/amp-toolbox/blob/main/packages/linter/src/rules/RuntimeIsPreloaded.ts.
The linter should also check for the presence of the boilerplate and only require the runtime preload if the boilerplate is still present.
Contributor guide
Research direction
Start with packages/linter/src/rules/RuntimeIsPreloaded.ts and review the related change in pull request 1248. Check how the linter currently handles AMP runtime preloads and how boilerplate presence is determined. Done means runtime preloads are required when boilerplate remains and not required after it has been removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100