Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide functionality on your website to test a config and alert to deprecation #396

Open
U-4-E-A opened this issue Feb 9, 2024 · 2 comments
Labels
status: needs discussion triage needs further discussion

Comments

@U-4-E-A
Copy link

U-4-E-A commented Feb 9, 2024

What is the problem you're trying to solve?

I recently updated from v14 to v16 and encountered a number of deprecated rules. stylelint's documentation is excellent but the "migrating to v15" simply leaves me having to check and remove individual rules. Whereas this is not the end of the world, I think it would be beneficial for stylelint to provide a view on their website which would automate cleaning up of config.

What solution would you like to see?

A view where a user can paste their config into a text field, select their stylelint version (and perhaps also add in the same selection functionality for the various plugins) and be alerted to rules (and other parts of the config) that are deprecated or removed. Perhaps also allow the user to download a new version of the config with the removed rules deleted and maybe also download with comments added stating where a rule is deprecated and is expected to be removed.

@ybiquitous
Copy link
Member

@U-4-E-A Thanks for the proposal. Implementing all the features at once might be challenging, but at least showing deprecation warnings sounds helpful to me.

This topic is related to stylelint/stylelint-demo, so I'll transfer this.

@ybiquitous ybiquitous transferred this issue from stylelint/stylelint Feb 13, 2024
@ybiquitous ybiquitous added the status: needs discussion triage needs further discussion label Feb 13, 2024
@ybiquitous
Copy link
Member

This demo is an example of the unit-case rule that was removed in 16.0.0. No warnings are shown:

image

On the other hand, the deprecation warning is output with CLI:

$ npx stylelint -v
15.11.0

$ echo 'a { width: 1PX; }' | npx stylelint

Deprecation warnings:
 - The "unit-case" rule is deprecated.

<input css RjcOe8>
 1:13  ✖  Expected "PX" to be "px"  unit-case

1 problem (1 error, 0 warnings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs discussion triage needs further discussion
Development

No branches or pull requests

2 participants