cerner / terra-toolkit

Terra Toolkit is a monorepo that contains utility modules for use when developing using Terra components
https://engineering.cerner.com/terra-toolkit
Apache License 2.0
32 stars 37 forks source link

[stylelint-config-terra][browserlist-config-terra] Update stylelint to v15 and remove IE 10 rules #831

Closed BenBoersma closed 8 months ago

BenBoersma commented 8 months ago

Summary

Stylelint-config-terra upgrading stylelint from v13 to v15.

The stylelint rules also have outdated rules for IE10 which is no longer supported.

What was changed:

Why it was changed:

Testing

This change was tested using:

Checking lint tests in terra-core

Reviews

In addition to engineering reviews, this PR needs:

Additional Details

This PR resolves:

UXPLATFORM-9445


Thank you for contributing to Terra. @cerner/terra

sdadn commented 8 months ago

I tried testing the changes locally but it failed with the following error:

Error: Could not find "./lib/rules/custom-property-no-duplicate-declaration/custom-property-no-duplicate-declaration". Do you need the "configBasedir" or "--config-basedir" option?

Looking into it, looks stylelint 14+ only works for css out of the box and some additional changes to stylelint.config.js are needed according to the upgrade guide: https://stylelint.io/migration-guide/to-14

Looks like this was an issue caused by missing files when packing. When adding those files, new config now runs successfully.

CleanShot 2023-10-23 at 10 38 53

However there is a deprecated rule would need to be removed.

BenBoersma commented 8 months ago

I tried testing the changes locally but it failed with the following error:

Error: Could not find "./lib/rules/custom-property-no-duplicate-declaration/custom-property-no-duplicate-declaration". Do you need the "configBasedir" or "--config-basedir" option?

Looking into it, looks stylelint 14+ only works for css out of the box and some additional changes to stylelint.config.js are needed according to the upgrade guide: https://stylelint.io/migration-guide/to-14

Looks like this was an issue caused by missing files when packing. When adding those files, new config now runs successfully.

CleanShot 2023-10-23 at 10 38 53

However there is a deprecated rule would need to be removed.

Deprecated rule removed here https://github.com/cerner/terra-toolkit/pull/831/commits/b44a915a448caa633e2b7a53de473918cff5a525#diff-8e2e1b79fb0b3b94e5769691308a3b408b5095b0db460b97abab3c190d5d6f6cL15

also fixed the packing issue here https://github.com/cerner/terra-toolkit/pull/831/commits/b44a915a448caa633e2b7a53de473918cff5a525#diff-9d09875cea48e31fb06cf2d805b0e637745b28f3d3045538ba35c8e0ef5bde10R14-R21