ampproject / ampproject/amp-toolbox

[linter] Runtime preload should only be required if boilerplate is still present

Open
#1,255 1 comment 1 reaction 0 assignees View on GitHub
bug toolbox-linter
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.