Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak-shah-np committed Oct 24, 2024
1 parent 57fb283 commit e444157
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 42 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default withNuxt({
ignores: ['node_modules', '.nuxt', 'dist', 'test', 'playground/*'],
rules: {
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-explicit-any':'off'
},
languageOptions: {
globals: {
Expand Down
9 changes: 7 additions & 2 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
export default defineNuxtConfig({
srcDir: 'src/',
ssr: false,
modules: ['../src/module', '@nuxt/eslint', 'vuetify-nuxt-module','@nuxtjs/leaflet'],
modules: [
'../src/module',
'@nuxt/eslint',
'vuetify-nuxt-module',
'@nuxtjs/leaflet',
],
devtools: { enabled: true },
compatibilityDate: '2024-08-02',
imports: {
Expand All @@ -24,7 +29,7 @@ export default defineNuxtConfig({
dark: false,
colors: {
// background: '#FFFFFF',
primary: '#008080',
primary: '#008080',
// secondary: '#E34234',
// white: '#FFFFFF',
floor: '#DCDCDC',
Expand Down
2 changes: 1 addition & 1 deletion playground/src/components/layout/SideBar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-navigation-drawer width="400" color="primary">
<v-navigation-drawer width="400" color="primary">
<v-list v-model:opened="groups">
<v-list-group value="started">
<template #activator="{ props }">
Expand Down
2 changes: 1 addition & 1 deletion playground/src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<v-app-bar-nav-icon icon="mdi-view-dashboard-variant" to="/" />
<v-app-bar-title to="/">Spatial UI Elements</v-app-bar-title>

<v-spacer/>
<v-spacer />
<v-btn
icon="mdi-github"
variant="elevated"
Expand Down
3 changes: 1 addition & 2 deletions playground/src/pages/Components/s-base-map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<tr>
<td>lmap</td>
<td>any</td>
<td></td>
<td />
<td>
<i>lmap</i> props contains the reference to leaflet
map.
Expand All @@ -51,7 +51,6 @@
</template>

<script setup lang="ts">
import L from 'leaflet'
import { LMap, LTileLayer, LControl } from '@vue-leaflet/vue-leaflet'
import ComponentDoc from '~/components/layout/ComponentDoc.vue'
Expand Down
2 changes: 1 addition & 1 deletion playground/src/pages/Components/s-footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
</pre>
</td>
<td/>
<td />
</tr>
</tbody>
</v-table>
Expand Down
4 changes: 2 additions & 2 deletions playground/src/pages/Components/s-header-logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
<td>right</td>
<td>ImageProps[]</td>
<td>
<pre/>
<pre />
</td>
<td/>
<td />
</tr>
<tr>
<td>configuration</td>
Expand Down
10 changes: 5 additions & 5 deletions playground/src/pages/Components/s-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:configuration="configuration"
:menu="menu"
/>
<div class="pt-4"/>
<div class="pt-4" />
</template>
<template #prop>
<v-table>
Expand All @@ -26,7 +26,7 @@
<tr>
<td>title</td>
<td>string</td>
<td/>
<td />
<td>Requred</td>
</tr>
<tr>
Expand All @@ -53,14 +53,14 @@
<tr>
<td>menu</td>
<td>IRoute</td>
<td/>
<td/>
<td />
<td />
</tr>
<tr>
<td>imageIcon</td>
<td>string</td>
<td>SERVIR Logo as default</td>
<td/>
<td />
</tr>
</tbody>
</v-table>
Expand Down
16 changes: 8 additions & 8 deletions playground/src/pages/Components/s-legend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@
<tr>
<td>legends</td>
<td>LegendItem[]</td>
<td></td>
<td />
<td>
<i>
<pre>
<i>
<pre>
interface LegendItem {
color: string
name: number
}
</pre>
</i>

</pre
>
</i>
</td>
</tr>
<tr>
<td>width</td>
<td>string</td>
<td>200px</td>
<td></td>
<td />
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>Legend</td>
<td></td>
<td />
</tr>
</tbody>
</v-table>
Expand Down
6 changes: 3 additions & 3 deletions playground/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
geospatial applications with a focus on flexibility,
performance, and ease of integration for SERVIR Science
applications.
<br >
<br >
<br />
<br />
<div class="d-flex align-center justify-center">
<img
class=""
src="/logos/servir.svg"
alt="description"
width="200"
>
/>
</div>
</v-card-text>
</v-card>
Expand Down
15 changes: 7 additions & 8 deletions src/runtime/components/SBaseMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<v-expansion-panels v-model="panel">
<v-expansion-panel color="primary">
<v-expansion-panel-title
v-slot="{ expanded }"
expand-icon="mdi-map"
collapse-icon="mdi-close"
v-slot="{ expanded }"
density=""
>
<b>{{ expanded ? 'BaseMap' : ' ' }}</b>
Expand Down Expand Up @@ -59,12 +59,11 @@ import L from 'leaflet'
import { useDisplay } from 'vuetify'
const { smAndDown } = useDisplay()
interface Props {
interface Prop {
lmap: any
}
const props = withDefaults(defineProps<Props>(), {})
const prop = withDefaults(defineProps<Prop>(), {})
const panel = ref(null)
const selectedLayer = ref<string | null>(null)
const layers = [
{
Expand Down Expand Up @@ -145,17 +144,17 @@ const layers = [
]
const changeBaseLayer = (layerTitle) => {
if (!props.lmap) return
if (!prop.lmap) return
layers.forEach((layer) => {
if (props.lmap.leafletObject.hasLayer(layer.layer)) {
props.lmap.leafletObject.removeLayer(layer.layer)
if (prop.lmap.leafletObject.hasLayer(layer.layer)) {
prop.lmap.leafletObject.removeLayer(layer.layer)
}
})
const newLayer = layers.find((layer) => layer.title === layerTitle)
if (newLayer) {
props.lmap.leafletObject.addLayer(newLayer.layer)
prop.lmap.leafletObject.addLayer(newLayer.layer)
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/SFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</v-row>
</v-col>
<slot />
<v-col cols="12" sm="6"/>
<v-col cols="12" sm="6" />
</v-row>
</v-container>
</v-footer>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/SHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<v-card-title class="text-wrap">
<b>{{ props.title }}</b></v-card-title
>
<v-divider/>
<v-divider />

<v-list density="compact" nav>
<v-list-item
Expand Down
14 changes: 7 additions & 7 deletions src/runtime/components/SLegend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<v-expansion-panels v-model="panel" class="slegend">
<v-expansion-panel color="primary">
<v-expansion-panel-title
v-slot="{ expanded }"
expand-icon="mdi-map-legend"
collapse-icon="mdi-close"
v-slot="{ expanded }"
>
<b>{{ expanded ? props.title : ' ' }}</b>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-card :width="props.width" variant="flat">
<v-card-item color="transparent">
<v-row direction="column" noGutters>
<v-row direction="column" no-gutters>
<v-col
v-for="legend in legends"
:key="legend.name"
Expand Down Expand Up @@ -54,14 +54,14 @@ interface LegendItem {
}
interface Props {
legends: LegendItem[],
width?:string,
title?:string
legends: LegendItem[]
width?: string
title?: string
}
const props = withDefaults(defineProps<Props>(), {
width:'200px',
title:'Legend'
width: '200px',
title: 'Legend',
})
watch(
Expand Down

0 comments on commit e444157

Please sign in to comment.