Skip to content

Commit a404dfe

Browse files
MaxNumeriquegithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent 45305d1 commit a404dfe

18 files changed

Lines changed: 65 additions & 87 deletions

.oxlintrc.json

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,26 @@
77
"style": "error",
88
"restriction": "error"
99
},
10-
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vue"],
10+
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"],
1111
"rules": {
1212
"unicorn/filename-case": [
1313
"error",
1414
{
15-
"cases": {
16-
"snakeCase": true
17-
}
15+
"case": "snakeCase"
1816
}
1917
],
20-
"eslint/func-style": ["error", "declaration"],
21-
"eslint/sort-keys": "off",
22-
"eslint/no-ternary": "off", // A utiliser pour des opérations simples
23-
"oxc/no-async-await": "off",
24-
"oxc/no-rest-spread-properties": "off", // Enable if older browser support is needed
25-
"eslint/max-statements": ["warn", 20],
26-
"eslint/id-length": ["error", { "exceptions": ["x", "y", "z", "i", "j", "k"], "min": 2 }],
27-
"eslint/no-console": "warn", // Disable for debugging. Disable later to not have browser logs
28-
"unicorn/numeric-separators-style": "off", // 1_000 ou 1000 ?
29-
"sort-imports": ["error", { "allowSeparatedGroups": true }],
30-
"eslint/curly": "off", // Quick statement in one line
31-
"eslint/no-undefined": "off", // Conflict with unicorn/no-typeof-undefined which prefers direct undefined comparison
32-
"unicorn/no-null": "warn", // A débattre ?
33-
"import/prefer-default-export": "off",
34-
"import/no-named-export": "off",
35-
"unicorn/prefer-global-this": "off",
36-
"import/unambiguous": "off",
37-
"oxc/no-optional-chaining": "off",
38-
"node/no-process-env": "off",
39-
"capitalized-comments": "warn",
40-
"unicorn/consistent-existence-index-check": "off", // Opérateur < > remplacés par !== -1 for index check
41-
"unicorn/require-post-message-target-origin": "off", // lorsqu'on envoie un message avec postMessage, on doit spécifier l'origin
42-
"unicorn/prefer-structured-clone": "off", // Pas compatible avec plugin Pinia ?
43-
"no-continue": "off",
44-
"max-params": ["warn", { "max": 4 }],
45-
"eslint/no-magic-numbers": [
18+
"eslint/func-style": [
4619
"error",
4720
{
48-
"ignore": [-1, 0, 1, 2, 4],
49-
"ignoreArrayIndexes": true
21+
"style:": "declaration"
5022
}
5123
],
52-
"vue/max-props": ["error", { "maxProps": 7 }]
24+
"eslint/sort-keys": "off",
25+
"eslint/no-ternary": "off"
5326
},
5427
"overrides": [
5528
{
56-
"files": ["app/components/**"],
29+
"files": ["**/components/*"],
5730
"rules": {
5831
"unicorn/filename-case": [
5932
"error",
@@ -62,18 +35,6 @@
6235
}
6336
]
6437
}
65-
},
66-
{
67-
"files": ["*.js", "app/plugins/**"],
68-
"rules": {
69-
"import/no-default-export": "off"
70-
}
71-
},
72-
{
73-
"files": ["utils/**"],
74-
"rules": {
75-
"promise/prefer-await-to-callbacks": "off"
76-
}
7738
}
7839
]
7940
}

app/components/DragAndDrop.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<script setup>
2-
const { multiple, accept, loading, showExtensions, idleText, dropText, loadingText } = defineProps({
2+
const {
3+
multiple,
4+
accept,
5+
loading,
6+
showExtensions,
7+
idleText,
8+
dropText,
9+
loadingText,
10+
} = defineProps({
311
multiple: { type: Boolean, default: false },
412
accept: { type: String, default: "" },
513
loading: { type: Boolean, default: false },

app/components/FeedBack/Snackers.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
const MARGIN_BETWEEN_SNACKERS = 60
55
const FIRST_SNACKER_MARGIN = 8
66
7-
87
const feedbackStore = useFeedbackStore()
98
const show = ref(true)
109

app/components/FileSelector.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
toggle_loading()
5252
const geodeStore = useGeodeStore()
5353
const response = await geodeStore.request(schema, {})
54-
accept.value = response.extensions.map((extension) => `.${extension}`).join(",")
54+
accept.value = response.extensions
55+
.map((extension) => `.${extension}`)
56+
.join(",")
5557
toggle_loading()
5658
}
5759
@@ -62,7 +64,12 @@
6264
<FetchingData v-if="loading" />
6365
<FileUploader
6466
v-else
65-
v-bind="{ multiple, accept, files: internal_files, auto_upload: internal_auto_upload }"
67+
v-bind="{
68+
multiple,
69+
accept,
70+
files: internal_files,
71+
auto_upload: internal_auto_upload,
72+
}"
6673
@files_uploaded="files_uploaded_event"
6774
/>
6875
</template>

app/components/HybridRenderingView.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
55
import { useViewerStore } from "@ogw_front/stores/viewer"
66
7-
87
const DEFAULT_ELEMENT_HEIGHT = 100
98
109
const emit = defineEmits(["click"])

app/components/ObjectSelector.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@
6161
allowed_objects.value = {}
6262
6363
const promise_array = filenames.map((filename) =>
64-
geodeStore.request(schema, { filename })
64+
geodeStore.request(schema, { filename }),
6565
)
6666
const responses = await Promise.all(promise_array)
67-
const allowed_objects_list = responses.map((response) => response.allowed_objects)
67+
const allowed_objects_list = responses.map(
68+
(response) => response.allowed_objects,
69+
)
6870
const all_keys = [...new Set(allowed_objects_list.flatMap(Object.keys))]
6971
const common_keys = all_keys.filter((key) =>
7072
allowed_objects_list.every((obj) => key in obj),

app/components/Viewer/ContextMenu.vue

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
import { useDataStore } from "@ogw_front/stores/data"
33
import { useEventListener } from "@vueuse/core"
44
import { useMenuStore } from "@ogw_front/stores/menu"
5-
6-
const RADIUS = 80
7-
const MARGIN_OFFSET = 40
8-
const Z_INDEX_MENU = 1000
9-
const Z_INDEX_ACTIVE_ITEM = 10
10-
const Z_INDEX_BASE_ITEM = 1
11-
const FULL_ANGLE = 360
12-
const ANGLE_45 = 45
13-
const ANGLE_135 = 135
14-
const ANGLE_225 = 225
15-
const ANGLE_315 = 315
16-
const CLOSE_DELAY = 100
5+
6+
const RADIUS = 80
7+
const MARGIN_OFFSET = 40
8+
const Z_INDEX_MENU = 1000
9+
const Z_INDEX_ACTIVE_ITEM = 10
10+
const Z_INDEX_BASE_ITEM = 1
11+
const FULL_ANGLE = 360
12+
const ANGLE_45 = 45
13+
const ANGLE_135 = 135
14+
const ANGLE_225 = 225
15+
const ANGLE_315 = 315
16+
const CLOSE_DELAY = 100
1717
1818
const menuStore = useMenuStore()
1919
const dataStore = useDataStore()
@@ -138,7 +138,10 @@
138138
transform: `translate(${Math.cos(angle) * RADIUS}px, ${Math.sin(angle) * RADIUS}px)`,
139139
transition: "opacity 0.2s ease, transform 0.2s ease",
140140
position: "absolute",
141-
zIndex: menuStore.active_item_index === index ? Z_INDEX_ACTIVE_ITEM : Z_INDEX_BASE_ITEM,
141+
zIndex:
142+
menuStore.active_item_index === index
143+
? Z_INDEX_ACTIVE_ITEM
144+
: Z_INDEX_BASE_ITEM,
142145
}
143146
}
144147
</script>

app/components/Viewer/ContextMenuItem.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
3939
if (absoluteButtonY - height / 2 < margin) {
4040
dy = margin - (absoluteButtonY - height / 2)
41-
} else if (absoluteButtonY + height / 2 > menuStore.containerHeight - margin) {
41+
} else if (
42+
absoluteButtonY + height / 2 >
43+
menuStore.containerHeight - margin
44+
) {
4245
dy = menuStore.containerHeight - margin - (absoluteButtonY + height / 2)
4346
}
4447
return { top: `calc(50% + ${dy}px)` }
@@ -93,11 +96,7 @@
9396
color="transparent"
9497
@click.stop
9598
>
96-
<OptionCard
97-
:title="tooltip"
98-
width="320"
99-
:max-height="maxCardHeight"
100-
>
99+
<OptionCard :title="tooltip" width="320" :max-height="maxCardHeight">
101100
<slot name="options" />
102101
</OptionCard>
103102
</v-sheet>

app/components/Viewer/Options/TexturesSelector.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
2020
function update_value_event($event, index) {
2121
internal_textures.value[index][$event.key] = $event.value
22-
const filtered = internal_textures.value.filter((texture) =>
23-
texture.texture_name !== "" && texture.id !== "",
22+
const filtered = internal_textures.value.filter(
23+
(texture) => texture.texture_name !== "" && texture.id !== "",
2424
)
2525
if (filtered.length !== 0) {
2626
textures.value = filtered

app/components/Viewer/Tree/ObjectTree.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
document.addEventListener("mousemove", resize)
3434
document.addEventListener("mouseup", stopResize)
3535
}
36-
37-
3836
</script>
3937

4038
<template>

0 commit comments

Comments
 (0)