Skip to content

Commit 921666b

Browse files
authored
Feat/better frontend (#240)
* feat: using svelte5 stuff like (svelte:window) instead of hardcoded wheels * feat: removed local imports * feat: styles and date lib instead of hardcoded stuff * feat: consola for more precise logging, also removed useless code * feat: removal of unused code * feat: test fixes + style lint
1 parent ae620eb commit 921666b

66 files changed

Lines changed: 1579 additions & 1893 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/frontend-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
working-directory: frontend
3636
run: npm run lint
3737

38+
- name: Run Stylelint
39+
working-directory: frontend
40+
run: npm run stylelint
41+
3842
- name: Run svelte-check
3943
working-directory: frontend
4044
run: npm run check

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ repos:
3838
files: ^frontend/src/.*\.(ts|svelte)$
3939
pass_filenames: false
4040

41+
# Stylelint - matches CI: cd frontend && npx stylelint "src/**/*.css"
42+
- id: stylelint-frontend
43+
name: stylelint (frontend)
44+
entry: bash -c 'cd frontend && npx stylelint "src/**/*.css"'
45+
language: system
46+
files: ^frontend/src/.*\.css$
47+
pass_filenames: false
48+
4149
# Svelte Check - matches CI: cd frontend && npx svelte-check
4250
- id: svelte-check-frontend
4351
name: svelte-check (frontend)

frontend/.stylelintrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": ["stylelint-config-standard"],
3+
"rules": {
4+
"at-rule-no-unknown": [true, {
5+
"ignoreAtRules": [
6+
"theme", "plugin", "source", "utility", "variant",
7+
"custom-variant", "apply", "reference"
8+
]
9+
}],
10+
"import-notation": null,
11+
"no-descending-specificity": null,
12+
"function-no-unknown": [true, {
13+
"ignoreFunctions": ["theme", "alpha", "spacing"]
14+
}],
15+
"selector-class-pattern": ["^([a-z][a-z0-9]*)(-[a-z0-9]+)*$|^cm-[a-zA-Z]+$", {
16+
"message": "Expected class selector to be kebab-case (or cm-* CodeMirror selector)"
17+
}]
18+
}
19+
}

0 commit comments

Comments
 (0)