Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

U - Lint ingredient order #338

Closed
ddbeck opened this issue Mar 3, 2020 · 1 comment · Fixed by #438
Closed

U - Lint ingredient order #338

ddbeck opened this issue Mar 3, 2020 · 1 comment · Fixed by #438
Assignees
Labels
js-linting All issues that concern linting of JS docs

Comments

@ddbeck
Copy link
Contributor

ddbeck commented Mar 3, 2020

A follow up to #320 .

We should lint for the order of ingredients in pages.

Implementation notes

This is a little bit tricky. Some ingredients are only meaningful in order (e.g., prose.short_description) and linting the ingredient in-depth is the only meaningful check on it. But others can exist anywhere in a page (most prose sections).

A possible route to implementation might be to use html-require-recipe-ingredients. After linting ingredients, it could check to see if any new messages were logged to a file. If not (i.e., if all ingredients matched), then it could check the order of section headings. This might be good enough for many, maybe even most, pages.

Acceptance criteria

The linter is able to check that all ingredients appear in the correct order, according to the specification agreed in mdn/sprints#3075.

@wbamberg wbamberg changed the title Lint ingredient order U - Lint ingredient order Apr 8, 2020
@ddbeck ddbeck self-assigned this Apr 9, 2020
@ddbeck ddbeck added this to the Echo Foxtrot (S1 Q2 2020) milestone Apr 14, 2020
@Elchi3 Elchi3 added the js-linting All issues that concern linting of JS docs label Apr 30, 2020
@ddbeck
Copy link
Contributor Author

ddbeck commented May 4, 2020

This in progress as #420, but I don't expect it will be merged by the end of sprint Echo Foxtrot (i.e., today).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
js-linting All issues that concern linting of JS docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants