spoko-design-system 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ name: Code Quality
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ lint-and-format:
11
+ name: Lint and Format Check
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '22'
22
+
23
+ - name: Setup pnpm
24
+ uses: pnpm/action-setup@v4
25
+ with:
26
+ version: '10.16.1'
27
+
28
+ - name: Get pnpm store directory
29
+ shell: bash
30
+ run: |
31
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32
+
33
+ - name: Setup pnpm cache
34
+ uses: actions/cache@v4
35
+ with:
36
+ path: ${{ env.STORE_PATH }}
37
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38
+ restore-keys: |
39
+ ${{ runner.os }}-pnpm-store-
40
+
41
+ - name: Install dependencies
42
+ run: pnpm install --frozen-lockfile
43
+
44
+ - name: Check Prettier formatting
45
+ run: pnpm exec prettier --check "src/**/*.{js,ts,jsx,tsx,vue,astro,json,css,md}"
46
+
47
+ - name: Run ESLint
48
+ run: pnpm exec eslint "src/**/*.{js,ts,jsx,tsx,vue,astro}"
49
+
50
+ - name: Type check
51
+ run: pnpm exec astro check
@@ -0,0 +1,51 @@
1
+ name: SonarCloud Analysis
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ sonarcloud:
11
+ name: SonarCloud
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0 # Shallow clones should be disabled for better analysis
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '22'
22
+
23
+ - name: Setup pnpm
24
+ uses: pnpm/action-setup@v4
25
+ with:
26
+ version: '10.16.1'
27
+
28
+ - name: Get pnpm store directory
29
+ shell: bash
30
+ run: |
31
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32
+
33
+ - name: Setup pnpm cache
34
+ uses: actions/cache@v4
35
+ with:
36
+ path: ${{ env.STORE_PATH }}
37
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38
+ restore-keys: |
39
+ ${{ runner.os }}-pnpm-store-
40
+
41
+ - name: Install dependencies
42
+ run: pnpm install --frozen-lockfile
43
+
44
+ - name: Build project
45
+ run: pnpm run build
46
+
47
+ - name: SonarCloud Scan
48
+ uses: SonarSource/sonarcloud-github-action@master
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
51
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -0,0 +1,15 @@
1
+ node_modules/
2
+ dist/
3
+ .astro/
4
+ pnpm-lock.yaml
5
+ *.md
6
+ *.svg
7
+ *.png
8
+ *.jpg
9
+ *.jpeg
10
+ *.gif
11
+ *.ico
12
+ *.woff
13
+ *.woff2
14
+ *.ttf
15
+ *.eot
package/.prettierrc ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "tabWidth": 2,
5
+ "trailingComma": "es5",
6
+ "printWidth": 100,
7
+ "useTabs": false,
8
+ "bracketSpacing": true,
9
+ "arrowParens": "avoid",
10
+ "endOfLine": "lf",
11
+ "overrides": [
12
+ {
13
+ "files": "*.astro",
14
+ "options": {
15
+ "parser": "astro"
16
+ }
17
+ },
18
+ {
19
+ "files": "*.vue",
20
+ "options": {
21
+ "parser": "vue"
22
+ }
23
+ }
24
+ ]
25
+ }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [1.1.0](https://github.com/polo-blue/sds/compare/v1.0.1...v1.1.0) (2025-09-23)
2
+
3
+ ### Features
4
+
5
+ * add SonarCloud and ESLint/Prettier code quality workflows ([349ad03](https://github.com/polo-blue/sds/commit/349ad034e4ca90c73d77927dfe8e6b66bde3fd37))
6
+
1
7
  ## [1.0.1](https://github.com/polo-blue/sds/compare/v1.0.0...v1.0.1) (2025-09-23)
2
8
 
3
9
  ### Bug Fixes
@@ -0,0 +1,64 @@
1
+ import js from '@eslint/js';
2
+ import typescript from '@typescript-eslint/eslint-plugin';
3
+ import typescriptParser from '@typescript-eslint/parser';
4
+ import vue from 'eslint-plugin-vue';
5
+ import astro from 'eslint-plugin-astro';
6
+
7
+ export default [
8
+ js.configs.recommended,
9
+
10
+ // TypeScript files
11
+ {
12
+ files: ['**/*.ts', '**/*.tsx'],
13
+ languageOptions: {
14
+ parser: typescriptParser,
15
+ parserOptions: {
16
+ ecmaVersion: 'latest',
17
+ sourceType: 'module',
18
+ },
19
+ },
20
+ plugins: {
21
+ '@typescript-eslint': typescript,
22
+ },
23
+ rules: {
24
+ ...typescript.configs.recommended.rules,
25
+ '@typescript-eslint/no-unused-vars': 'warn',
26
+ '@typescript-eslint/no-explicit-any': 'warn',
27
+ },
28
+ },
29
+
30
+ // Vue files
31
+ {
32
+ files: ['**/*.vue'],
33
+ languageOptions: {
34
+ parser: vue.parser,
35
+ parserOptions: {
36
+ parser: typescriptParser,
37
+ ecmaVersion: 'latest',
38
+ sourceType: 'module',
39
+ },
40
+ },
41
+ plugins: {
42
+ vue,
43
+ },
44
+ rules: {
45
+ ...vue.configs.recommended.rules,
46
+ 'vue/multi-word-component-names': 'off',
47
+ 'vue/no-unused-vars': 'warn',
48
+ },
49
+ },
50
+
51
+ // Astro files
52
+ ...astro.configs.recommended,
53
+
54
+ // Global ignores
55
+ {
56
+ ignores: [
57
+ 'dist/**',
58
+ 'node_modules/**',
59
+ '.astro/**',
60
+ 'pnpm-lock.yaml',
61
+ '**/*.d.ts',
62
+ ],
63
+ },
64
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -109,11 +109,18 @@
109
109
  "@semantic-release/git": "^10.0.1",
110
110
  "@types/gtag.js": "^0.0.20",
111
111
  "@types/node": "^24.5.2",
112
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
113
+ "@typescript-eslint/parser": "^8.44.1",
112
114
  "@unocss/transformer-variant-group": "66.5.1",
113
115
  "@vitejs/plugin-vue": "^6.0.1",
114
116
  "@vue/compiler-sfc": "^3.5.21",
117
+ "@vue/eslint-config-typescript": "^14.6.0",
115
118
  "astro": "^5.13.10",
116
119
  "conventional-changelog-conventionalcommits": "^8.0.0",
120
+ "eslint": "^9.36.0",
121
+ "eslint-plugin-astro": "^1.3.1",
122
+ "eslint-plugin-vue": "^10.5.0",
123
+ "prettier": "^3.6.2",
117
124
  "semantic-release": "^24.2.9",
118
125
  "unocss": "^0.65.0",
119
126
  "vite": "^7.1.7"
@@ -0,0 +1,19 @@
1
+ sonar.projectKey=polo-blue_sds
2
+ sonar.organization=polo-blue
3
+
4
+ # This is the name and version displayed in the SonarCloud UI.
5
+ sonar.projectName=Spoko Design System
6
+ sonar.projectVersion=1.0.0
7
+
8
+ # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
9
+ sonar.sources=src,uno-config,icon.config.ts,astro.config.mjs
10
+ sonar.exclusions=**/node_modules/**,**/dist/**,**/*.spec.ts,**/*.test.ts,**/coverage/**,**/.astro/**
11
+
12
+ # Language
13
+ sonar.javascript.lcov.reportPaths=coverage/lcov.info
14
+ sonar.typescript.lcov.reportPaths=coverage/lcov.info
15
+
16
+ # Additional settings
17
+ sonar.sourceEncoding=UTF-8
18
+ sonar.javascript.file.suffixes=.js,.jsx
19
+ sonar.typescript.file.suffixes=.ts,.tsx,.vue,.astro