Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

lint again #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .eslintrc

This file was deleted.

32 changes: 16 additions & 16 deletions .github/workflows/pr_test_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Review deployment
# name: Review deployment

on: pull_request
# on: pull_request

jobs:
test:
runs-on: ubuntu-latest
# jobs:
# test:
# runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
# - name: Set Node.js 18.x
# uses: actions/setup-node@v3
# with:
# node-version: 18.x

- name: Install
run: yarn
# - name: Install
# run: yarn

- name: Check
run: yarn lint ; yarn format
# - name: Check
# run: yarn lint ; yarn format
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
yarn.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down
12 changes: 0 additions & 12 deletions .prettierrc

This file was deleted.

10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
"scripts": {
"start": "vue-cli-service serve --port 9002",
"build": "vue-cli-service build",
"lint": "eslint --ext .vue --ext .js .",
"lint:fix": "eslint --ext .vue --ext .js --fix .",
"format": "prettier --check .",
"format:write": "prettier --write .",
"serve:standalone": "vue-cli-service serve --mode standalone"
},
"dependencies": {
"click-outside-vue3": "^4.0.1",
"core-js": "^3.6.5",
"profcomff-common": "file:../../packages/common",
"single-spa-vue": "^2.1.0",
"vue": "3",
"vue-router": "^4.0.0-0"
Expand All @@ -22,12 +19,7 @@
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.8.3",
"vue-cli-plugin-single-spa": "~3.3.0"
},
"browserslist": [
Expand Down
13 changes: 1 addition & 12 deletions src/components/EventRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export default {
},
methods: {
formatLecturer(info) {
if (!info.middle_name)
return `${info.last_name} ${info.first_name[0]}.`;
if (!info.middle_name) return `${info.last_name} ${info.first_name[0]}.`;
return `${info.last_name} ${info.first_name[0]}. ${info.middle_name[0]}.`;
},
formatInfo(lecturer, room) {
Expand Down Expand Up @@ -69,16 +68,6 @@ export default {
.event:hover {
background: var(--bs-primary-20);
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
cursor: default;
}
p {
margin: 0;
}
Expand Down
15 changes: 10 additions & 5 deletions src/components/GroupRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@
class="event-item noselect"
>
<div
v-if="item == 1"
v-if="item === 1"
class="event-item-icon noselect"
>
<span class="material-symbols-sharp">group</span>
<MaterialIcon
icon="group"
class="icon"
/>
</div>
<div
v-else
class="event-item-icon noselect"
>
<span class="material-symbols-sharp">schedule</span>
<MaterialIcon icon="schedule" />
</div>
<div class="event-item-information">
<div v-if="item == 1">
<div v-if="item === 1">
<div>Группа</div>
<div>{{ eventNumber }}</div>
</div>
Expand All @@ -31,8 +34,10 @@

<script>
import '@/components/row.css';
import { MaterialIcon } from 'profcomff-common/components';

export default {
components: { MaterialIcon },
props: {
eventNumber: {
type: String,
Expand All @@ -48,7 +53,7 @@ export default {
</script>

<style scoped>
.material-symbols-sharp {
.icon {
color: #00004b;
font-size: 30px;
}
Expand Down
16 changes: 7 additions & 9 deletions src/components/LecturerRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
class="event-item-icon"
>
<div class="noselect">
<span class="material-symbols-sharp">person</span>
<MaterialIcon
icon="person"
:size="36"
/>
</div>
</div>
<div
Expand All @@ -29,18 +32,17 @@
v-else
class="event-item-information"
>
<b
>{{ lecturer.first_name }} {{ lecturer.middle_name }}
{{ lecturer.last_name }}</b
>
<b>{{ lecturer.first_name }} {{ lecturer.middle_name }} {{ lecturer.last_name }}</b>
</div>
</li>
</template>

<script>
import '@/components/row.css';
import { MaterialIcon } from 'profcomff-common/components';

export default {
components: { MaterialIcon },
props: {
lecturer: {
type: Object,
Expand Down Expand Up @@ -70,10 +72,6 @@ export default {
</script>

<style scoped>
.material-symbols-sharp {
font-size: 36px;
}

.photo-lecturer {
width: 56px;
height: 56px;
Expand Down
17 changes: 7 additions & 10 deletions src/components/RoomRow.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<template>
<li class="event-item noselect">
<div class="event-item-icon noselect">
<span class="material-symbols-sharp">location_on</span>
<MaterialIcon
icon="location_on"
:size="30"
/>
</div>
<div class="event-item-information">
<div class="event-item-header">
Expand All @@ -10,18 +13,18 @@
<div>
<span v-if="room.building">{{ room.building }}</span>
<span v-if="room.building && room.direction"> • </span>
<span v-if="room.direction">{{
roomDirection(room.direction)
}}</span>
<span v-if="room.direction">{{ roomDirection(room.direction) }}</span>
</div>
</div>
</li>
</template>

<script>
import '@/components/row.css';
import { MaterialIcon } from 'profcomff-common/components';

export default {
components: { MaterialIcon },
props: {
room: {
type: Object,
Expand All @@ -36,9 +39,3 @@ export default {
},
};
</script>

<style scoped>
.material-symbols-sharp {
font-size: 30px;
}
</style>
17 changes: 0 additions & 17 deletions src/components/row.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,3 @@
.event-item-information {
font-size: 18px;
}

.noselect {
-webkit-touch-callout: none;
/* iOS Safari */
-webkit-user-select: none;
/* Safari */
-khtml-user-select: none;
/* Konqueror HTML */
-moz-user-select: none;
/* Old versions of Firefox */
-ms-user-select: none;
/* Internet Explorer/Edge */
user-select: none;
/* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
cursor: default;
}
4 changes: 1 addition & 3 deletions src/utils/FetchTimetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export async function fetchTimetable(time_start, time_end, group_id) {
offset: 0,
group_id,
};
Object.keys(params).forEach(key =>
url.searchParams.append(key, params[key]),
);
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
return fetch(url).then(response => response.json());
}
5 changes: 1 addition & 4 deletions src/utils/Retrying.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ export default function retry(callback, times, interval = 1000) {
try {
callback();
} catch (error) {
console.error(
`Call failed, retrying... (${times} attempts left)`,
error,
);
console.error(`Call failed, retrying... (${times} attempts left)`, error);
setTimeout(() => retry(callback, times - 1, interval), interval);
}
}
Expand Down
Loading