-
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 pull request #223 from SELab-2/frontend-cleanup
Frontend cleanup
- Loading branch information
Showing
81 changed files
with
2,222 additions
and
2,787 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
'env': { | ||
'browser': true, | ||
'es2021': true | ||
}, | ||
"extends": [ | ||
"standard-with-typescript", | ||
"plugin:vue/vue3-essential", | ||
"plugin:prettier/recommended" | ||
'extends': [ | ||
'standard-with-typescript', | ||
'plugin:vue/vue3-essential', | ||
'plugin:prettier/recommended' | ||
], | ||
"overrides": [ | ||
'overrides': [ | ||
{ | ||
"env": { | ||
"node": true | ||
'env': { | ||
'node': true | ||
}, | ||
"files": [ | ||
".eslintrc.{js,cjs}" | ||
'files': [ | ||
'.eslintrc.{js,cjs}' | ||
], | ||
"parserOptions": { | ||
"sourceType": "script", | ||
}, | ||
'parserOptions': { | ||
'sourceType': 'script' | ||
} | ||
} | ||
], | ||
"parser": "vue-eslint-parser", | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser" , | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"project": ["./tsconfig.json"], | ||
"extraFileExtensions": [".vue"] | ||
'parser': 'vue-eslint-parser', | ||
'parserOptions': { | ||
'parser': '@typescript-eslint/parser', | ||
'ecmaVersion': 'latest', | ||
'sourceType': 'module', | ||
'project': ['./tsconfig.json'], | ||
'extraFileExtensions': ['.vue'] | ||
}, | ||
"plugins": [ | ||
"vue", | ||
"prettier" | ||
'plugins': [ | ||
'vue', | ||
'prettier' | ||
], | ||
"rules": { | ||
"vue/multi-word-component-names": "off", // Disable rule that requires multi-word component names in Vue files | ||
"@typescript-eslint/no-floating-promises": "off", // Disable rule that flags floating promises in .ts files | ||
"@typescript-eslint/no-extraneous-class": "off", // Disable rule that flags usage of unnecessary classes in the codebase | ||
"@typescript-eslint/unbound-method": "off", // Disable rule that refuses unboud methods that could scope `this` | ||
"prettier/prettier": "error" | ||
'rules': { | ||
'vue/multi-word-component-names': 'off', // Disable rule that requires multi-word component names in Vue files | ||
'@typescript-eslint/no-floating-promises': 'off', // Disable rule that flags floating promises in .ts files | ||
'@typescript-eslint/no-extraneous-class': 'off', // Disable rule that flags usage of unnecessary classes in the codebase | ||
'@typescript-eslint/unbound-method': 'off', // Disable rule that refuses unbound methods that could scope `this` | ||
'prettier/prettier': "error", | ||
'function-paren-newline': 'off', | ||
'function-call-argument-newline': 'off' | ||
} | ||
} | ||
}; |
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,7 +1,12 @@ | ||
{ | ||
"tabWidth": 4, | ||
"semi": false, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"singleQuote": true | ||
"printWidth": 140, | ||
"max_line_length": 140, | ||
"semi": true, | ||
"singleQuote": true, | ||
"arrowParens": "always", | ||
"wrapParens": "avoid", | ||
"endOfLine": "auto", | ||
"jsxBracketSameLine": true, | ||
"bracketSameLine": true | ||
} |
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
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
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,43 @@ | ||
<script setup lang="ts"> | ||
import Dropdown from 'primevue/dropdown'; | ||
import { useI18n } from 'vue-i18n'; | ||
import { computed } from 'vue'; | ||
/* Composable injections */ | ||
const { t } = useI18n(); | ||
/* Props */ | ||
const props = defineProps<{ years: number[] }>(); | ||
/* State */ | ||
const years = computed(() => | ||
props.years.map((year) => ({ | ||
label: `${year} - ${year + 1}`, | ||
value: year, | ||
})), | ||
); | ||
/* Models */ | ||
const year = defineModel(); | ||
</script> | ||
|
||
<template> | ||
<Dropdown v-model="year" :options="years" optionLabel="label" optionValue="value" class="custom-dropdown"> | ||
<template #value="{ value }"> | ||
<span class="text-primary font-semibold">{{ t('components.buttons.academic_year') }} {{ value }} - {{ value + 1 }}</span> | ||
</template> | ||
<template #option="{ option }"> | ||
<span class="pi pi-calendar mr-2" /> | ||
<span>{{ t('components.buttons.academic_year') }} {{ (option as any).label }}</span> | ||
</template> | ||
<template #dropdownicon> | ||
<i class="pi pi-chevron-down pr-1 text-primary"></i> | ||
</template> | ||
</Dropdown> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
.custom-dropdown { | ||
border-radius: 0; | ||
} | ||
</style> |
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
Oops, something went wrong.