Skip to content

Commit

Permalink
Introduce @stylistic/stylelint-plugin to watch over stylistic rules…
Browse files Browse the repository at this point in the history
… removed in Stylelint 16
  • Loading branch information
adamkudrna committed Jul 31, 2024
1 parent 4bad6b2 commit 3f6a0e2
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
53 changes: 53 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/register": "^7.24.6",
"@stylistic/stylelint-config": "^1.0.1",
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Grid/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ $grid-responsive-properties: [
align-items,
justify-content,
justify-items,
]; // stylelint-disable-line indentation -- Broken rule?
]; // stylelint-disable-line @stylistic/indentation -- Broken rule?

$grid-span-responsive-properties: [
column-span,
row-span,
]; // stylelint-disable-line indentation -- Broken rule?
]; // stylelint-disable-line @stylistic/indentation -- Broken rule?

$initial-fallback-value: initial;
7 changes: 7 additions & 0 deletions stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ module.exports = {
'@visionappscz/stylelint-config/order',
'@visionappscz/stylelint-config/scss',
'@visionappscz/stylelint-config/cssModules',
'@stylistic/stylelint-config',
],
rules: {
// Allow @else and @elseif to be on the same line as the closing brace of the @if block.
'@stylistic/block-closing-brace-newline-after': 'always-single-line',

// Use 4 spaces for indentation.
'@stylistic/indentation': 4,

// Check that custom property name starts with `rui` prefix and follows either SUIT CSS convention
// (for components theming) or kebab-case syntax (for global design tokens and local properties).
//
Expand Down

0 comments on commit 3f6a0e2

Please sign in to comment.