Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Support multiple ESLint versions in demo #509

Open
@not-an-aardvark

Description

@not-an-aardvark

It's useful to be able to create a demo permalink like this as an easy way to demonstrate a bug. Ideally, we could allow users to supply a demo URL as an alternative to a code/config sample when reporting a bug.

However, since the demo always uses the latest version of ESLint, demo URLs aren't ideal with respect to archival, because after a bug is fixed the demo will only display the fixed behavior. This might make it difficult to tell what the bug originally was, which could cause problems when trying to figure out whether a certain piece of code is necessary (if the code was originally added while addressing the bug).

To fix this issue, I think it would be nice if the demo supported multiple ESLint versions, perhaps selected with a dropdown menu. The permalink produced by the demo would include the ESLint version (defaulting to the latest version), and when loading a permalink, the appropriate version would be extracted from the URL and configured in the demo.

This would require some changes to the automatic site generation in the ESLint repository, because we would have to copy the generated browser file to a versioned location in addition to putting it at js/app/eslint.js. We would also want to update the frontend code of the demo to load ESLint versions on-demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    demoRelates to the ESLint demo page (https://eslint.org/demo)enhancementThis change enhances an existing feature of the website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions