From 89370322f5b5e0a8a9ec3c08af05a7e8102dbc37 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Wed, 24 Jan 2024 15:36:19 +0100 Subject: [PATCH] Linting in CI --- .github/workflows/ci.yml | 1 + CHANGELOG.md | 8 +++++++- package.json | 2 +- src/corpus/config/CorpusConfiguration.vue | 1 + src/home/HomeNews.vue | 1 + src/index.css | 9 ++++----- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 174d232..8b7c59d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,5 +17,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: yarn install + - run: yarn lint - run: yarn test - run: yarn build diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b75953..029d608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,14 @@ As this project is a user-facing application, the places in the semantic version ## [Unreleased] -### Changed +### Added - Converted code to TypeScript [#113](https://github.com/spraakbanken/mink-frontend/issues/113) +- Lint check in CI workflow script + +### Changed + +- Renamed one-word components, for linting ## [1.2.0] (2024-01-17) @@ -23,6 +28,7 @@ As this project is a user-facing application, the places in the semantic version - Option to enable named entity recognition - Check if admin mode is enabled on load +- Build check in CI workflow script ### Changed diff --git a/package.json b/package.json index ef9eb65..2408c8b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "serve": "vite preview", "typecheck": "vue-tsc --noEmit", "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src", - "format": "prettier . --write '!.yarn' --ignore-path .gitignore", + "format": "prettier . --write --ignore-path .gitignore", "test": "vitest", "coverage": "vitest run --coverage" }, diff --git a/src/corpus/config/CorpusConfiguration.vue b/src/corpus/config/CorpusConfiguration.vue index ad2bcfa..3bf8780 100644 --- a/src/corpus/config/CorpusConfiguration.vue +++ b/src/corpus/config/CorpusConfiguration.vue @@ -168,6 +168,7 @@ async function submit(fields: Form) { :help="$t('annotations.ner.help')" /> +
diff --git a/src/home/HomeNews.vue b/src/home/HomeNews.vue index bc894b7..4e84da3 100644 --- a/src/home/HomeNews.vue +++ b/src/home/HomeNews.vue @@ -17,6 +17,7 @@ function getDate(date: Date) { class="bg-sky-50 dark:bg-sky-800 shadow shadow-sky-200 dark:shadow-sky-600 text-sky-800 dark:text-sky-200 p-1 px-2 my-2" > {{ getDate(item.date) }}: {{ th(item.title) }} +
diff --git a/src/index.css b/src/index.css index 2679944..eda16c1 100644 --- a/src/index.css +++ b/src/index.css @@ -85,8 +85,7 @@ select { @apply text-red-600; } [data-type="radio"] .formkit-inner, -[data-type="checkbox"] .formkit-inner - { +[data-type="checkbox"] .formkit-inner { @apply inline-block mr-2; } [data-type="radio"] .formkit-legend { @@ -115,7 +114,8 @@ select { @apply bg-amber-300 shadow-amber-600 text-amber-900; } - .mink-button[disabled], .mink-button.disabled { + .mink-button[disabled], + .mink-button.disabled { @apply bg-slate-100 shadow text-slate-400 cursor-not-allowed hover:drop-shadow-none hover:brightness-100 !important; @apply dark:bg-slate-600 dark:text-gray-400 !important; } @@ -126,9 +126,8 @@ select { .button-mute:not(:hover) { @apply !bg-transparent !text-inherit; } - + .button-slim { @apply p-0 px-1; } - }