-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 16-adding-tests
- Loading branch information
Showing
42 changed files
with
7,577 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,50 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/crate-ci/typos | ||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.21.0 | ||
hooks: | ||
- id: typos | ||
- id: typos | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.7 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
# Comment to disable autofix: | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
# Run the linter. | ||
- id: ruff | ||
# Comment to disable autofix: | ||
args: [--fix] | ||
# Run the formatter. | ||
- id: ruff-format | ||
|
||
- repo: local | ||
hooks: | ||
- id: tsc | ||
language: node | ||
name: Use vue-tsc to typecheck frontend code. | ||
entry: bash -c "cd frontend && npm run type-check" | ||
- id: eslint | ||
language: node | ||
name: Use eslint to lint frontend code. | ||
entry: bash -c "cd frontend && npm run lint" | ||
- id: prettier | ||
language: node | ||
name: Use prettier to format frontend code. | ||
entry: bash -c "cd frontend && npm run format" | ||
- id: stylelint | ||
language: node | ||
name: Use stylelint to lint CSS. | ||
entry: bash -c "cd frontend && npm run style-lint" | ||
|
||
exclude: '.*\.min\.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
'extends': [ | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/eslint-config-typescript', | ||
'@vue/eslint-config-prettier/skip-formatting' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": true, | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-standard", | ||
"stylelint-config-recommended-vue", | ||
"stylelint-config-idiomatic-order" | ||
], | ||
"plugins": ["stylelint-order"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Dashboard | ||
|
||
This sub directory aims at creating a single page application supporting Mandr. | ||
|
||
It should build as a SPA and as a library of web components. | ||
|
||
## Useful commands | ||
|
||
| command | action | | ||
|---------------------|---------------------------------------------------| | ||
| `npm install` | install depdendecies | | ||
| `npm run dev` | compile and hot-reload for development | | ||
| `npm run build` | type-check, compile and minify for production | | ||
| `npm run test:unit` | run unit tests with [vitest](https://vitest.dev/) | | ||
| `npm run lint` | lint with [ESLint](https://eslint.org/) | | ||
|
||
|
||
## Recommended IDE Setup | ||
|
||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). | ||
|
||
## Type Support for `.vue` Imports in TS | ||
|
||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="/favicon.ico" sizes="any"> | ||
<link rel="icon" href="/favicon.svg" type="image/svg+xml"> | ||
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> | ||
<meta name="theme-color" content="#1E22AA"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>:mandr.</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.