Skip to content

Commit

Permalink
feat(lint): disallow unexpected font-family from sketch (#11001)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Apr 19, 2023
1 parent 2e36898 commit f7c8d9c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/lint/src/config/stylelint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ module.exports = {
// to avoid conflicts with less option { math: always }
// ref: https://github.com/less/less-docs/blob/c8b9d33b0b4ec5fe59a4bbda11db202545741228/content/usage/less-options.md#math
'color-function-notation': null,
// disallowed set single font-family as PingFangSC
// in most cases, this font-family rule is copied unconsciously from Sketch
// and it will cause an unexpected font rendering on the devices that have no PingFangSC font
'declaration-property-value-disallowed-list': {
'font-family': [
'PingFangSC',
"'PingFangSC'",
'PingFangSC-Regular',
"'PingFangSC-Regular'",
'PingFangSC-Medium',
"'PingFangSC-Medium'",
'PingFangSC-Semibold',
"'PingFangSC-Semibold'",
'PingFangSC-Bold',
"'PingFangSC-Bold'",
],
},
},
customSyntax: require.resolve('../../../compiled/postcss-less'),
ignoreFiles: ['node_modules'],
Expand Down

0 comments on commit f7c8d9c

Please sign in to comment.