Skip to content

Commit e6904e4

Browse files
committed
feat!: implement prettier and remove conflicting rules
BREAKING CHANGE: `prettier` should be installed
1 parent 0a4d7c2 commit e6904e4

File tree

4 files changed

+44
-16
lines changed

4 files changed

+44
-16
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ Configuration rules to ensure your CSS code is compliant with Atölye15's code s
77
## Installation
88

99
```console
10-
yarn add @atolye15/stylelint-config --dev
10+
yarn add @atolye15/stylelint-config postcss prettier stylelint --dev
1111

1212
# Or with npm:
1313

14-
npm install @atolye15/stylelint-config --save-dev
14+
npm install @atolye15/stylelint-config postcss prettier stylelint --save-dev
1515
```
1616

17+
_`@atolye15/stylelint-config` does not install PostCSS, Prettier or Stylelint for you. You must install these yourself._
18+
1719
## Usage
1820

1921
Set your stylelint config to:

index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module.exports = {
2-
extends: 'stylelint-config-standard-scss',
2+
extends: [
3+
'stylelint-config-standard-scss',
4+
'stylelint-prettier/recommended',
5+
'stylelint-config-prettier-scss',
6+
],
37
plugins: ['stylelint-order'],
48
customSyntax: 'postcss-scss',
59
rules: {
@@ -155,8 +159,6 @@ module.exports = {
155159
'scss/at-rule-no-unknown': true,
156160
'scss/comment-no-empty': null,
157161
'scss/declaration-nested-properties-no-divided-groups': true,
158-
'scss/dollar-variable-colon-space-after': 'always',
159-
'scss/dollar-variable-colon-space-before': 'never',
160162
'scss/dollar-variable-no-missing-interpolation': true,
161163
'scss/dollar-variable-pattern': '^[_-]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$',
162164
'scss/function-quote-no-quoted-strings-inside': true,
@@ -165,9 +167,6 @@ module.exports = {
165167
'scss/percent-placeholder-pattern': '^[_-]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$',
166168
'scss/no-duplicate-mixins': true,
167169
'scss/no-global-function-names': true,
168-
'scss/operator-no-newline-after': true,
169-
'scss/operator-no-newline-before': true,
170-
'scss/operator-no-unspaced': true,
171170
'scss/selector-no-redundant-nesting-selector': true,
172171
'selector-attribute-quotes': 'always',
173172
'selector-class-pattern': [

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@
2424
"homepage": "https://github.com/atolye15/stylelint-config#readme",
2525
"peerDependencies": {
2626
"postcss": "^8.4.39",
27+
"prettier": "^3.5.3",
2728
"stylelint": "^16.15.0"
2829
},
2930
"dependencies": {
3031
"postcss-scss": "^4.0.9",
32+
"stylelint-config-prettier-scss": "^1.0.0",
3133
"stylelint-config-standard-scss": "^14.0.0",
32-
"stylelint-order": "^6.0.4"
34+
"stylelint-order": "^6.0.4",
35+
"stylelint-prettier": "^5.0.3"
3336
},
3437
"devDependencies": {
3538
"prettier": "^3.5.3",
36-
"stylelint": "^16.15.0"
39+
"stylelint": "^16.16.0"
3740
}
3841
}

yarn.lock

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ fast-deep-equal@^3.1.3:
225225
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
226226
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
227227

228+
fast-diff@^1.1.2:
229+
version "1.3.0"
230+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
231+
integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
232+
228233
fast-glob@^3.2.9, fast-glob@^3.3.3:
229234
version "3.3.3"
230235
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
@@ -253,7 +258,7 @@ fastq@^1.6.0:
253258
dependencies:
254259
reusify "^1.0.4"
255260

256-
file-entry-cache@^10.0.6:
261+
file-entry-cache@^10.0.7:
257262
version "10.0.7"
258263
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-10.0.7.tgz#e0ac34d4b8c44bea8a0a27ceb4dae982f2d32749"
259264
integrity sha512-txsf5fu3anp2ff3+gOJJzRImtrtm/oa9tYLN0iTuINZ++EyVR/nRrg2fKYwvG/pXDofcrvvb0scEbX3NyW/COw==
@@ -601,6 +606,13 @@ postcss@^8.5.3:
601606
picocolors "^1.1.1"
602607
source-map-js "^1.2.1"
603608

609+
prettier-linter-helpers@^1.0.0:
610+
version "1.0.0"
611+
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
612+
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
613+
dependencies:
614+
fast-diff "^1.1.2"
615+
604616
prettier@^3.5.3:
605617
version "3.5.3"
606618
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5"
@@ -683,6 +695,11 @@ strip-ansi@^6.0.1:
683695
dependencies:
684696
ansi-regex "^5.0.1"
685697

698+
stylelint-config-prettier-scss@^1.0.0:
699+
version "1.0.0"
700+
resolved "https://registry.yarnpkg.com/stylelint-config-prettier-scss/-/stylelint-config-prettier-scss-1.0.0.tgz#4125152ce9ee39ec233ce14436fc0818fa866aee"
701+
integrity sha512-Gr2qLiyvJGKeDk0E/+awNTrZB/UtNVPLqCDOr07na/sLekZwm26Br6yYIeBYz3ulsEcQgs5j+2IIMXCC+wsaQA==
702+
686703
stylelint-config-recommended-scss@^14.1.0:
687704
version "14.1.0"
688705
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz#1a5855655cddcb5f77c10f38c76567adf2bb9aa3"
@@ -720,6 +737,13 @@ stylelint-order@^6.0.4:
720737
postcss "^8.4.32"
721738
postcss-sorting "^8.0.2"
722739

740+
stylelint-prettier@^5.0.3:
741+
version "5.0.3"
742+
resolved "https://registry.yarnpkg.com/stylelint-prettier/-/stylelint-prettier-5.0.3.tgz#470134ec5ed86501119be9a5cb44709b467d7c91"
743+
integrity sha512-B6V0oa35ekRrKZlf+6+jA+i50C4GXJ7X1PPmoCqSUoXN6BrNF6NhqqhanvkLjqw2qgvrS0wjdpeC+Tn06KN3jw==
744+
dependencies:
745+
prettier-linter-helpers "^1.0.0"
746+
723747
stylelint-scss@^6.4.0:
724748
version "6.11.1"
725749
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-6.11.1.tgz#03860aab250112825b2deb77ca7ff1e2ba3a5414"
@@ -734,10 +758,10 @@ stylelint-scss@^6.4.0:
734758
postcss-selector-parser "^7.1.0"
735759
postcss-value-parser "^4.2.0"
736760

737-
stylelint@^16.15.0:
738-
version "16.15.0"
739-
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.15.0.tgz#a561cd50ad468cc4898f5c57cc1f223287fdea59"
740-
integrity sha512-OK6Rs7EPdcdmjqiDycadZY4fw3f5/TC1X6/tGjnF3OosbwCeNs7nG+79MCAtjEg7ckwqTJTsku08e0Rmaz5nUw==
761+
stylelint@^16.16.0:
762+
version "16.16.0"
763+
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.16.0.tgz#ebecf27becd277aaf752e75de324023a1e13e486"
764+
integrity sha512-40X5UOb/0CEFnZVEHyN260HlSSUxPES+arrUphOumGWgXERHfwCD0kNBVILgQSij8iliYVwlc0V7M5bcLP9vPg==
741765
dependencies:
742766
"@csstools/css-parser-algorithms" "^3.0.4"
743767
"@csstools/css-tokenizer" "^3.0.3"
@@ -752,7 +776,7 @@ stylelint@^16.15.0:
752776
debug "^4.3.7"
753777
fast-glob "^3.3.3"
754778
fastest-levenshtein "^1.0.16"
755-
file-entry-cache "^10.0.6"
779+
file-entry-cache "^10.0.7"
756780
global-modules "^2.0.0"
757781
globby "^11.1.0"
758782
globjoin "^0.1.4"

0 commit comments

Comments
 (0)