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

Commit 5b478ba

Browse files
committed
Add styled components example
1 parent f06e8e0 commit 5b478ba

File tree

10 files changed

+269
-75
lines changed

10 files changed

+269
-75
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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"url": "https://github.com/morewings/cra-template-npm-library/issues"
4242
},
4343
"dependencies": {
44-
"lodash": "^4.17.21"
44+
"lodash": "^4.17.21",
45+
"styled-components": "^6.1.1"
4546
},
4647
"devDependencies": {
4748
"@rollup/plugin-typescript": "11.1.5",
@@ -76,9 +77,11 @@
7677
"husky": "8.0.3",
7778
"identity-obj-proxy": "^3.0.0",
7879
"is-ci": "3.0.1",
80+
"jest-styled-components": "^7.2.0",
7981
"lint-staged": "15.1.0",
8082
"npm-run-all": "4.1.5",
8183
"postcss-preset-env": "9.3.0",
84+
"postcss-styled-syntax": "^0.5.0",
8285
"prettier": "2.8.7",
8386
"react": "18.2.0",
8487
"react-dom": "18.2.0",
@@ -111,7 +114,7 @@
111114
"lint:code": "eslint ./src/",
112115
"fix:code": "run-s 'lint:js --fix'",
113116
"lint:types": "tsc --pretty --noEmit",
114-
"lint:style": "stylelint ./src/**/*.css",
117+
"lint:style": "stylelint ./src/**/*.style.ts",
115118
"fix:style": "run-s 'lint:style --fix'",
116119
"clean:files": "node ./cleanFiles.js",
117120
"copy:files": "node ./copyFiles.js",

0 commit comments

Comments
 (0)