Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

Commit a37807a

Browse files
committed
Add styled components example
1 parent e804786 commit a37807a

File tree

10 files changed

+264
-47
lines changed

10 files changed

+264
-47
lines changed

.lintstagedrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"*.{js,ts,tsx}": [
33
"eslint --fix"
44
],
5-
"*.css": [
5+
"*.style.ts": [
66
"stylelint --fix --quiet"
77
]
88
}

.stylelintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": ["stylelint-config-standard"],
3+
"customSyntax": "postcss-styled-syntax",
34
"rules": {
45
"function-calc-no-unspaced-operator": true,
56
"order/order": [

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@
7676
"husky": "8.0.3",
7777
"identity-obj-proxy": "^3.0.0",
7878
"is-ci": "3.0.1",
79+
"jest-styled-components": "^7.2.0",
7980
"lint-staged": "15.1.0",
8081
"npm-run-all": "4.1.5",
8182
"postcss-preset-env": "9.3.0",
83+
"postcss-styled-syntax": "^0.5.0",
8284
"prettier": "2.8.7",
8385
"react": "18.2.0",
8486
"react-dom": "18.2.0",
@@ -90,6 +92,7 @@
9092
"rollup-plugin-peer-deps-external": "2.2.4",
9193
"rollup-plugin-postcss": "4.0.2",
9294
"storybook": "7.5.3",
95+
"styled-components": "6.1.1",
9396
"stylelint": "15.11.0",
9497
"stylelint-config-standard": "34.0.0",
9598
"stylelint-order": "6.0.3",
@@ -98,7 +101,8 @@
98101
},
99102
"peerDependencies": {
100103
"react": ">=18.2.0",
101-
"react-dom": ">=18.2.0"
104+
"react-dom": ">=18.2.0",
105+
"styled-components": ">=6.1.1"
102106
},
103107
"scripts": {
104108
"start": "react-scripts start",
@@ -111,7 +115,7 @@
111115
"lint:code": "eslint ./src/",
112116
"fix:code": "run-s 'lint:js --fix'",
113117
"lint:types": "tsc --pretty --noEmit",
114-
"lint:style": "stylelint ./src/**/*.css",
118+
"lint:style": "stylelint ./src/**/*.style.ts",
115119
"fix:style": "run-s 'lint:style --fix'",
116120
"clean:files": "node ./cleanFiles.js",
117121
"copy:files": "node ./copyFiles.js",

0 commit comments

Comments
 (0)