Skip to content

Commit 991823d

Browse files
mrTuomoKcursoragent
andcommitted
fix(components): add lint-styles script for pnpm CI
Add stylelint scripts to components and use --if-present in CI and g:lint-styles so pnpm skips workspaces without the script, matching yarn workspaces foreach behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7540bde commit 991823d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Linter
7777
run: |
7878
pnpm --filter '@events-helsinki/*' --filter '...[origin/main]' run lint
79-
pnpm --filter '@events-helsinki/*' --filter '...[origin/main]' run lint-styles
79+
pnpm --filter '@events-helsinki/*' --filter '...[origin/main]' --if-present run lint-styles
8080
8181
- name: Unit tests changed packages
8282
run: pnpm --filter '@events-helsinki/*' --filter '...[origin/main]' run test --coverage

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"g:test": "pnpm -r --parallel run test",
2020
"g:test-e2e": "pnpm -r run test-e2e",
2121
"g:lint": "pnpm -r --parallel run lint --color",
22-
"g:lint-styles": "pnpm -r --parallel run lint-styles --color",
22+
"g:lint-styles": "pnpm -r --parallel --if-present run lint-styles --color",
2323
"g:typecheck": "pnpm -r --parallel run typecheck",
2424
"g:lint-staged-files": "lint-staged --allow-empty --debug && pnpm run lint:dependency-versions",
2525
"g:lint-fix": "pnpm -r --parallel run lint-fix",

packages/components/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"dev": "tsup --watch",
2525
"lint": "eslint . --ext .ts,.tsx,.js,.jsx,.cjs,.mjs --cache --cache-location ../../.cache/eslint/components.eslintcache",
2626
"lint-fix": "eslint . --ext .ts,.tsx,.js,.jsx,.cjs,.mjs --fix",
27+
"lint-styles": "stylelint --allow-empty-input --ignore-disables --config ./stylelint.config.mjs --max-warnings 25 \"src/**/*.scss\" \"!src/styles/**\"",
28+
"lint-styles-fix": "pnpm run lint-styles -- --fix",
2729
"publish-canary": "node ../../scripts/publish-canary.js",
2830
"publish-stable": "pnpm run build && node ../../scripts/publish-stable.js",
2931
"serve-storybook": "sirv build/storybook --cors --port 8888",

0 commit comments

Comments
 (0)