diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 4ac87aa0d..f91def1e5 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -4,6 +4,8 @@ require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
extends: [
+ 'plugin:vue/vue3-recommended',
+ 'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
@@ -12,4 +14,7 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest',
},
+ rules: {
+ 'vue/multi-word-component-names': 'off',
+ },
};
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
index 61d94181d..748c5c06e 100644
--- a/.github/workflows/linting.yml
+++ b/.github/workflows/linting.yml
@@ -15,4 +15,4 @@ jobs:
- name: Install npm dependencies
run: yarn install
- name: Lint
- run: yarn workspace oxd-components lint
+ run: yarn lint
diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml
index 1861c2a0d..add6ddc7d 100644
--- a/.github/workflows/storybook.yml
+++ b/.github/workflows/storybook.yml
@@ -15,4 +15,4 @@ jobs:
- name: Install npm dependencies
run: yarn install
- name: Build Storybook
- run: yarn workspace oxd-storybook build
+ run: yarn build:storybook
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 088ac9413..ac67c1877 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -17,7 +17,7 @@ jobs:
run: yarn install
- name: Unit tests
- run: yarn workspace oxd-components test:unit --coverage
+ run: yarn test:unit --coverage
- name: Upload jest coverage
uses: actions/upload-artifact@v3
diff --git a/.gitignore b/.gitignore
index 718af65c7..290b74f7d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,6 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
+
+# Coverage report
+src/coverage/*
diff --git a/package.json b/package.json
index 67f592989..845ea4d8b 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
"@types/jsdom": "^20.0.1",
"@types/node": "^18.11.12",
"@vitejs/plugin-vue": "^4.0.0",
+ "@vitest/coverage-c8": "^0.27.1",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.2.6",
diff --git a/src/components/Alert/stories/AlertContainer.vue b/src/components/Alert/stories/AlertContainer.vue
index 1b307415e..75de3148d 100644
--- a/src/components/Alert/stories/AlertContainer.vue
+++ b/src/components/Alert/stories/AlertContainer.vue
@@ -28,10 +28,10 @@
>
{{ order }}
@@ -41,6 +41,15 @@ import CardTable from '@/components/CardTable/CardTable.vue'; export default { + components: { + 'oxd-card-table': CardTable, + }, + + props: { + selectable: { + type: Boolean, + }, + }, data() { return { selector: { @@ -69,22 +78,6 @@ export default { }; }, - props: { - selectable: { - type: Boolean, - }, - }, - - components: { - 'oxd-card-table': CardTable, - }, - - methods: { - onClick(e) { - console.log(e); - }, - }, - created() { // simulate async data fetch setTimeout(() => { @@ -98,6 +91,12 @@ export default { ]; }, 500); }, + + methods: { + onClick(e) { + console.log(e); + }, + }, }; diff --git a/src/components/Chart/stories/Dashboard.story.vue b/src/components/Chart/stories/Dashboard.story.vue index c5c02b430..5e8a0a897 100644 --- a/src/components/Chart/stories/Dashboard.story.vue +++ b/src/components/Chart/stories/Dashboard.story.vue @@ -56,7 +56,7 @@
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
diff --git a/src/components/Dialog/stories/DialogDeleteConfirmation.story.vue b/src/components/Dialog/stories/DialogDeleteConfirmation.story.vue
index dfe26715d..61aeb6566 100644
--- a/src/components/Dialog/stories/DialogDeleteConfirmation.story.vue
+++ b/src/components/Dialog/stories/DialogDeleteConfirmation.story.vue
@@ -21,9 +21,9 @@
-->
- slot for context
-
- (Github ID : {{ data.id }})
-
-
+ (Github ID : {{ data.id }})
+
diff --git a/src/components/ReportTable/stories/PIMReport.story.vue b/src/components/ReportTable/stories/PIMReport.story.vue
index 05d7f1630..7daf841b3 100644
--- a/src/components/ReportTable/stories/PIMReport.story.vue
+++ b/src/components/ReportTable/stories/PIMReport.story.vue
@@ -27,7 +27,7 @@
:headers="headers"
:items="items"
>
-
+