Skip to content

Commit

Permalink
reinstated eslint max-len rule refs #42; consolidated some types refs #…
Browse files Browse the repository at this point in the history
…46; harmonized the casing of the FAIR letters
  • Loading branch information
jspaaks committed Nov 25, 2022
1 parent 8dd95ba commit 7423593
Show file tree
Hide file tree
Showing 20 changed files with 370 additions and 294 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/*.test.ts"] }],
"import/no-unresolved": ["off"],
"indent": ["error", 4],
"max-len": ["off"],
"object-curly-newline": ["error", { "multiline": true }]
}
}
4 changes: 3 additions & 1 deletion pages/data/v0.1/BannerVersions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div class="banner" v-if="showBanner">
A newer version of this checklist is available at <ChecklistLink v-bind:href="link">{{link}}</ChecklistLink>, consider upgrading.
A newer version of this checklist is available at
<ChecklistLink v-bind:href="link">{{link}}</ChecklistLink>
, consider upgrading.
</div>
</template>

Expand Down
15 changes: 12 additions & 3 deletions pages/data/v0.1/ChecklistHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@
<g
id="outline"
transform="matrix(1.032058,0,0,1.032058,-2.0517123,-5.997519)">
<path d="m 64,13.845703 -57.4746094,41.068359 4.6894534,6.5625 7.96289,-5.689453 V 121.80078 H 49.626953 V 91.585938 H 65.746094 V 121.80078 H 108.82227 V 55.787109 l 7.96289,5.689453 4.68945,-6.5625 C 114.12178,49.660112 106.76885,44.406295 99.416016,39.152344 V 17.582031 H 83.607422 V 27.855469 C 77.071721,23.185398 70.535701,18.515774 64,13.845703 Z m 0,15.738281 34.822266,24.882813 V 111.80078 H 75.746094 V 81.585938 H 39.626953 V 111.80078 H 29.177734 V 54.466797 Z" />
<path d="m 64,13.845703 -57.4746094,41.068359 4.6894534,6.5625
7.96289,-5.689453 V 121.80078 H 49.626953 V 91.585938
H 65.746094 V 121.80078 H 108.82227 V 55.787109 l
7.96289,5.689453 4.68945,-6.5625 C 114.12178,49.660112
106.76885,44.406295 99.416016,39.152344 V 17.582031 H
83.607422 V 27.855469 C 77.071721,23.185398 70.535701,18.515774
64,13.845703 Z m 0,15.738281 34.822266,24.882813 V 111.80078
H 75.746094 V 81.585938 H 39.626953 V 111.80078 H 29.177734
V 54.466797 Z" />
<g>
<path d="m 89.706841,22.049501 h 5.808742 v 12.368457 h -5.808742 z" />
</g>
</g>
<path
d="M 63.999995,24.525796 99.938597,50.206302 V 109.3783 H 76.122651 V 78.194827 H 38.845604 V 109.3783 H 28.061403 V 50.206302 Z"
<path d="M 63.999995,24.525796 99.938597,50.206302 V 109.3783 H
76.122651 V 78.194827 H 38.845604 V 109.3783 H 28.061403 V
50.206302 Z"
id="inside" />
</g>
</svg>
Expand Down
26 changes: 17 additions & 9 deletions pages/data/v0.1/index.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
<h1>FAIR for data self-assessment checklist</h1>
<BannerVersions />
<template v-if="nQuestions.total > 0">
<p>Answer the {{ nQuestions.total }} questions below to assess your data's FAIRness, or switch to the checklist for <ChecklistLink v-bind:href="linkToSoftwareChecklist">software</ChecklistLink> instead.</p>
<div v-for="aspect in ['F', 'A', 'I', 'R']" v-bind:key="aspect">
<p>
Answer the {{ nQuestions.total }} questions below to assess
your data's FAIRness, or switch to the checklist for
<ChecklistLink v-bind:href="linkToSoftwareChecklist">software</ChecklistLink>
instead.
</p>
<div v-for="aspect in aspects" v-bind:key="aspect">
<h2>{{ getAspectFullname(aspect) }}</h2>
<ChecklistQuestion v-for="question in questions.filter(q => q.aspect === aspect)"
<ChecklistQuestion
v-for="question in questions.filter(q => q.aspect === aspect)"
v-bind:key="question.id"
v-bind:question="question"
/>
Expand All @@ -28,12 +34,14 @@

<script setup lang="ts">
import { latest } from '~/renderer/versions';
import { aspects } from './store';
import { nQuestions } from './store';
import { progress } from './store';
import { questions } from './store';
import { questions as data } from './questions.json';
import { setQuestions } from './store';
import { type QuestionType } from './store';
import { type Aspect } from './types';
import { type QuestionType } from './types';
import ChecklistAbout from './ChecklistAbout.vue';
import BannerVersions from './BannerVersions.vue';
import ChecklistHeader from './ChecklistHeader.vue';
Expand All @@ -45,11 +53,11 @@ import './app.css';

setQuestions(data as QuestionType[]);

const getAspectFullname = (aspect: string) => ({
F: 'Findable',
A: 'Accessible',
I: 'Interoperable',
R: 'Reusable'
const getAspectFullname = (aspect: Aspect) => ({
f: 'Findable',
a: 'Accessible',
i: 'Interoperable',
r: 'Reusable'
}[aspect]);
const linkToSoftwareChecklist = `${import.meta.env.BASE_URL}software/${latest.value.software}`;
</script>
Expand Down
Loading

0 comments on commit 7423593

Please sign in to comment.