Skip to content

Commit

Permalink
✨ feat: Add stylelint-use-logical-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jul 1, 2024
1 parent e7d24ac commit 861ecb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"stylelint-config-recommended": "^14.0.1",
"stylelint-less": "^3.0.1",
"stylelint-order": "^6.0.4",
"stylelint-use-logical-spec": "^5.0.1",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
Expand Down
15 changes: 9 additions & 6 deletions src/stylelint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@ export default {
files: ['*.less', '*.css'],
plugins: ['stylelint-less'],
rules: {
'at-rule-no-unknown': undefined,
'at-rule-no-unknown': 'never',
'color-no-invalid-hex': true,
'function-no-unknown': undefined,
'function-no-unknown': 'never',
'less/color-no-invalid-hex': true,
},
},
{
customSyntax: 'postcss-styled-syntax',
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'no-empty-source': undefined,
'no-invalid-double-slash-comments': undefined,
'no-missing-end-of-source-newline': undefined,
'no-empty-source': 'never',
'no-invalid-double-slash-comments': 'never',
'no-missing-end-of-source-newline': 'never',
'property-no-vendor-prefix': true,
'value-no-vendor-prefix': [true, { ignoreValues: ['box'] }],
},
},
],
plugins: ['stylelint-order'],
plugins: ['stylelint-order', 'stylelint-use-logical-spec'],
rules: {
'liberty/use-logical-spec': [true, { except: ['float', /^((min|max)-)?(height|width)$/i] }],
},
};

0 comments on commit 861ecb8

Please sign in to comment.