Skip to content

Commit 9b93fa7

Browse files
committed
build: create a reusable stylelint-config
1 parent 5698487 commit 9b93fa7

File tree

12 files changed

+106
-91
lines changed

12 files changed

+106
-91
lines changed

apps/docs/.stylelintrc.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
{
2-
"extends": ["stylelint-config-recommended-scss"],
3-
"plugins": ["stylelint-order", "stylelint-scss"],
4-
"rules": {
5-
"no-descending-specificity": null,
6-
"selector-pseudo-class-no-unknown": [
7-
true,
8-
{ "ignorePseudoClasses": ["global", "local"] }
9-
],
10-
"order/properties-alphabetical-order": true,
11-
"scss/operator-no-newline-before": null,
12-
"scss/operator-no-newline-after": null
13-
}
2+
"extends": ["@react-md/stylelint-config"]
143
}

apps/docs/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"@inquirer/confirm": "^5.1.13",
7373
"@next/eslint-plugin-next": "^15.4.4",
7474
"@react-md/eslint-config": "workspace:*",
75+
"@react-md/stylelint-config": "workspace:*",
7576
"@types/js-cookie": "^3.0.6",
7677
"@types/lodash": "^4.17.20",
7778
"@types/mdx": "^2.0.13",
@@ -89,10 +90,6 @@
8990
"sass": "^1.89.2",
9091
"sassdoc-generator": "workspace:*",
9192
"stylelint": "^16.22.0",
92-
"stylelint-config-prettier-scss": "^1.0.0",
93-
"stylelint-config-recommended-scss": "^15.0.1",
94-
"stylelint-order": "^7.0.0",
95-
"stylelint-scss": "^6.12.1",
9693
"svgo": "^4.0.0",
9794
"tsx": "^4.20.3",
9895
"typedoc": "^0.28.8",

packages/code/.stylelintrc.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
{
2-
"extends": ["stylelint-config-recommended-scss"],
3-
"plugins": ["stylelint-order", "stylelint-scss"],
4-
"rules": {
5-
"no-descending-specificity": null,
6-
"selector-pseudo-class-no-unknown": [
7-
true,
8-
{ "ignorePseudoClasses": ["global", "local"] }
9-
],
10-
"order/properties-alphabetical-order": true,
11-
"scss/operator-no-newline-before": null,
12-
"scss/operator-no-newline-after": null
13-
}
2+
"extends": ["@react-md/stylelint-config"]
143
}

packages/code/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@jest/globals": "^29.7.0",
6060
"@jest/types": "^29.6.3",
6161
"@react-md/eslint-config": "workspace:*",
62+
"@react-md/stylelint-config": "workspace:*",
6263
"@swc/cli": "^0.6.0",
6364
"@swc/core": "^1.13.2",
6465
"@swc/jest": "^0.2.39",
@@ -81,10 +82,6 @@
8182
"postcss-selector-parser": "^7.1.0",
8283
"sass": "^1.89.2",
8384
"stylelint": "^16.22.0",
84-
"stylelint-config-prettier-scss": "^1.0.0",
85-
"stylelint-config-recommended-scss": "^15.0.1",
86-
"stylelint-order": "^7.0.0",
87-
"stylelint-scss": "^6.12.1",
8885
"typescript": "^5.8.3"
8986
},
9087
"peerDependencies": {

packages/core/.stylelintrc.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
11
{
2-
"extends": ["stylelint-config-recommended-scss"],
3-
"plugins": ["stylelint-order", "stylelint-scss"],
4-
"rules": {
5-
"no-descending-specificity": null,
6-
"selector-pseudo-class-no-unknown": [
7-
true,
8-
{ "ignorePseudoClasses": ["global", "local"] }
9-
],
10-
"order/properties-alphabetical-order": true,
11-
"scss/comment-no-empty": null,
12-
"scss/operator-no-newline-before": null,
13-
"scss/operator-no-newline-after": null
14-
}
2+
"extends": ["@react-md/stylelint-config"]
153
}

packages/core/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"@jest/types": "^29.6.3",
104104
"@microsoft/api-extractor": "^7.52.9",
105105
"@react-md/eslint-config": "workspace:*",
106+
"@react-md/stylelint-config": "workspace:*",
106107
"@swc/cli": "^0.6.0",
107108
"@swc/core": "^1.13.2",
108109
"@swc/jest": "^0.2.39",
@@ -127,10 +128,6 @@
127128
"npm-run-all": "^4.1.5",
128129
"prettier": "^3.6.2",
129130
"stylelint": "^16.22.0",
130-
"stylelint-config-prettier-scss": "^1.0.0",
131-
"stylelint-config-recommended-scss": "^15.0.1",
132-
"stylelint-order": "^7.0.0",
133-
"stylelint-scss": "^6.12.1",
134131
"ts-morph": "^26.0.0",
135132
"ts-node": "^10.9.2",
136133
"tsx": "^4.20.3",

packages/eslint-config/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# @react-md/eslint-config
2+
3+
This is just a re-export of `@mlaursen/eslint-config` so that I don't need to
4+
update it in each package.

packages/eslint-config/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
"type": "module",
44
"private": true,
55
"version": "1.0.0",
6-
"description": "",
7-
"files": [
8-
"dist/"
9-
],
106
"exports": {
117
".": "./index.js",
128
"./package.json": "./package.json"
@@ -20,8 +16,7 @@
2016
"prettier": "^3.6.2",
2117
"typescript": "^5.8.3"
2218
},
23-
"keywords": [],
24-
"author": "",
19+
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
2520
"license": "MIT",
2621
"volta": {
2722
"node": "22.13.1",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @react-md/stylelint-config
2+
3+
The reusable stylelint config for react-md.

packages/stylelint-config/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default {
2+
extends: ["stylelint-config-recommended-scss"],
3+
plugins: ["stylelint-order", "stylelint-scss"],
4+
rules: {
5+
"no-descending-specificity": null,
6+
"selector-pseudo-class-no-unknown": [
7+
true,
8+
{ ignorePseudoClasses: ["global", "local"] },
9+
],
10+
"order/properties-alphabetical-order": true,
11+
// if this is not enabled, I cannot create "paragraphs" of comments
12+
"scss/comment-no-empty": null,
13+
"scss/operator-no-newline-before": null,
14+
"scss/operator-no-newline-after": null,
15+
},
16+
};

0 commit comments

Comments
 (0)