Skip to content

Commit

Permalink
chore: update eslint deps + apply new lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Sep 19, 2024
1 parent 0b574a5 commit 3737ecd
Show file tree
Hide file tree
Showing 13 changed files with 666 additions and 213 deletions.
4 changes: 2 additions & 2 deletions components/Diff.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import type { PropType } from 'vue'
import _ from 'underscore'
import type { Change } from 'diff'
import type { PropType } from 'vue'
import { diffChars } from 'diff'
import _ from 'underscore'
import type { Actions, Key } from '~/libs/types'
import { maxActionPriority } from '~/libs/types'
Expand Down
8 changes: 4 additions & 4 deletions components/DiffMap.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script lang="ts">
import type { PropType } from 'vue'
import { shallowRef } from 'vue'
import type { Geometry } from 'geojson'
import type {
CircleLayerSpecification,
LineLayerSpecification,
LngLatLike,
} from 'maplibre-gl'
import type { PropType } from 'vue'
import bbox from '@turf/bbox'
import booleanEqual from '@turf/boolean-equal'
import {
FullscreenControl,
LngLatBounds,
Map,
} from 'maplibre-gl'
import bbox from '@turf/bbox'
import booleanEqual from '@turf/boolean-equal'
import { shallowRef } from 'vue'
export default defineNuxtComponent({
name: 'DiffMap',
Expand Down
2 changes: 1 addition & 1 deletion components/LogFilters.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { countBy, indexBy, sortBy, uniq } from 'underscore'
import type { LocationQuery } from 'vue-router'
import { countBy, indexBy, sortBy, uniq } from 'underscore'
const route = useRoute()
const filters = ref<LocationQuery>()
Expand Down
2 changes: 1 addition & 1 deletion components/LogItem.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import LazyComponent from 'v-lazy-component'
import { compact, uniq } from 'underscore'
import LazyComponent from 'v-lazy-component'
import type { Log, ObjType } from '~/libs/types'
import { objTypeFull } from '~/libs/types'
Expand Down
6 changes: 3 additions & 3 deletions components/ProjectStats.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import localizedFormat from 'dayjs/plugin/localizedFormat'
import relativeTime from 'dayjs/plugin/relativeTime'
import en from 'dayjs/locale/en-gb'
import fr from 'dayjs/locale/fr'
import es from 'dayjs/locale/es'
import fr from 'dayjs/locale/fr'
import localizedFormat from 'dayjs/plugin/localizedFormat'
import relativeTime from 'dayjs/plugin/relativeTime'
const props = defineProps<{
lastUpdate: string
Expand Down
4 changes: 2 additions & 2 deletions components/UserGroups.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts">
import type { Feature, FeatureCollection, MultiPolygon, Polygon } from 'geojson'
import type {
FillLayerSpecification,
LineLayerSpecification,
} from 'maplibre-gl'
import bbox from '@turf/bbox'
import {
LngLatBounds,
Map,
} from 'maplibre-gl'
import type { Feature, FeatureCollection, MultiPolygon, Polygon } from 'geojson'
import bbox from '@turf/bbox'
import _ from 'underscore'
import type { UserGroup } from '~/libs/types'
Expand Down
2 changes: 1 addition & 1 deletion components/UserProfile.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { PropType } from 'vue'
import type { User } from '~/libs/types'
import { userLogout } from '~/libs/apiTypes'
import type { User } from '~/libs/types'
export default defineNuxtComponent({
name: 'User',
Expand Down
4 changes: 2 additions & 2 deletions libs/getAsyncData.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { AsyncData, AsyncDataOptions } from 'nuxt/app'
import type {
KeysOf,
_AsyncData,
_Transform,
KeysOf,
} from '#app/composables/asyncData'
import type { NuxtApp } from '#app/nuxt'
import type { AsyncData, AsyncDataOptions } from 'nuxt/app'

import { useAsyncData } from '#imports'

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
"vue": "^3.4.22"
},
"devDependencies": {
"@antfu/eslint-config": "^2.25.1",
"@antfu/eslint-config": "^3.6.2",
"@babel/core": "^7.24.4",
"@commitlint/cli": "^19.2.2",
"@commitlint/config-conventional": "^19.2.2",
"@nuxt/eslint": "^0.5.0",
"@nuxt/eslint": "^0.5.7",
"@nuxtjs/i18n": "^8.3.0",
"@types/eslint": "^9.6.0",
"@types/node": "^20.12.7",
"@types/underscore": "^1.11.15",
"babel-jest": "^29.7.0",
Expand Down
40 changes: 20 additions & 20 deletions pages/[project]/changes_logs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,26 @@ const loChasWithFilter = computed(() => {
)
return (
(route.query.filterByAction === undefined
|| Object.values(log.diff_attribs || {})
.concat(Object.values(log.diff_tags || {}))
.some(
(actions) =>
actions?.some(
(action) => action[0] === route.query.filterByAction,
) || false,
))
&& (route.query.filterByUserGroups === undefined
|| log.matches.some((match) =>
match.user_groups.includes(route.query.filterByUserGroups as string),
))
&& (route.query.filterBySelectors === undefined
|| log.matches.some((match) =>
matchFilterBySelectors(match.selectors),
))
&& (route.query.filterByUsers === undefined
|| (changesetsUsers && changesetsUsers.includes(route.query.filterByUsers as string)))
&& (route.query.filterByDate === undefined
|| log.change.created.substring(0, 10) === route.query.filterByDate)
|| Object.values(log.diff_attribs || {})
.concat(Object.values(log.diff_tags || {}))
.some(
(actions) =>
actions?.some(
(action) => action[0] === route.query.filterByAction,
) || false,
))
&& (route.query.filterByUserGroups === undefined
|| log.matches.some((match) =>
match.user_groups.includes(route.query.filterByUserGroups as string),
))
&& (route.query.filterBySelectors === undefined
|| log.matches.some((match) =>
matchFilterBySelectors(match.selectors),
))
&& (route.query.filterByUsers === undefined
|| (changesetsUsers && changesetsUsers.includes(route.query.filterByUsers as string)))
&& (route.query.filterByDate === undefined
|| log.change.created.substring(0, 10) === route.query.filterByDate)
)
}),
)
Expand Down
2 changes: 1 addition & 1 deletion pages/[project]/index.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import ProjectCompo from '~/components/Project.vue'
import {
getAsyncDataOrThrows,
setAsyncRef,
} from '~/libs/getAsyncData'
import ProjectCompo from '~/components/Project.vue'
import type { Project } from '~/libs/types'
import { getProject } from '~/libs/types'
Expand Down
2 changes: 1 addition & 1 deletion test/Logs.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it, mount } from '@vue/test-utils'
import Logs from '@/components/Logs.vue'
import { describe, expect, it, mount } from '@vue/test-utils'

describe('logs', () => {
it('is a Vue instance', () => {
Expand Down
Loading

0 comments on commit 3737ecd

Please sign in to comment.