stylelint / stylelint-demo

The online demo on the Stylelint website
https://stylelint.io/demo/
MIT License
15 stars 8 forks source link

Add support for showing deprecation warnings #396

Open U-4-E-A opened 9 months ago

U-4-E-A commented 9 months ago

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 commented 9 months ago

@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 commented 9 months ago

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)