Skip to content

Commit

Permalink
[stylelint-polaris] PoC for custom messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chloerice committed Nov 11, 2022
1 parent f5ea4df commit 3aaeced
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion stylelint-polaris/configs/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ module.exports = {
'stylelint-polaris/coverage': {
colors: {
'color-named': 'never',
'color-no-hex': true,
'color-no-hex': [
true,
{
// TODO: Add custom meta support in coverage.js
meta: {
url: 'https://polaris.shopify.com/tokens/color',
},
message: (hex) =>
`Unexpected use of hex code: value "${hex}" should be replaced with a color token`,
},
],
// TODO: Receiving an error that the rule doesn't exist
// 'scss/function-color-relative': true,
'declaration-property-value-disallowed-list': {
Expand Down

0 comments on commit 3aaeced

Please sign in to comment.