fix linting

This commit is contained in:
Anton Tranelis 2025-01-23 13:02:34 +00:00
parent b1e6db5d1f
commit 5f48f4e645
14 changed files with 5218 additions and 162 deletions

View File

@ -1,8 +1,8 @@
import js from '@eslint/js' import js from '@eslint/js'
import globals from 'globals' import { configs } from 'eslint-plugin-react'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks' import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh' import reactRefresh from 'eslint-plugin-react-refresh'
import globals from 'globals'
export default [ export default [
{ ignores: ['dist'] }, { ignores: ['dist'] },
@ -19,20 +19,17 @@ export default [
}, },
settings: { react: { version: '18.3' } }, settings: { react: { version: '18.3' } },
plugins: { plugins: {
react, configs,
'react-hooks': reactHooks, 'react-hooks': reactHooks,
'react-refresh': reactRefresh, 'react-refresh': reactRefresh,
}, },
rules: { rules: {
...js.configs.recommended.rules, ...js.configs.recommended.rules,
...react.configs.recommended.rules, ...configs.recommended.rules,
...react.configs['jsx-runtime'].rules, ...configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules, ...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off', 'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [ 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'warn',
{ allowConstantExport: true },
],
}, },
}, },
] ]

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,8 @@
}, },
"dependencies": { "dependencies": {
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1" "react-dom": "^18.3.1",
"utopia-ui": "^3.0.35"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.11.1", "@eslint/js": "^9.11.1",

View File

@ -1,11 +1,7 @@
import { UtopiaMap } from "utopia-ui" import { UtopiaMap } from 'utopia-ui'
function App() { function App() {
return <UtopiaMap center={[50.6, 15.5]} zoom={6} height='100dvh' width='100dvw'></UtopiaMap>
return (
<UtopiaMap center={[50.6, 15.5]} zoom={6} height='100dvh' width="100dvw">
</UtopiaMap>
)
} }
export default App export default App

View File

@ -1,5 +1,6 @@
import { StrictMode } from 'react' import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import App from './App.jsx' import App from './App.jsx'
import './index.css' import './index.css'

View File

@ -1,5 +1,5 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({

View File

@ -1,8 +1,8 @@
import js from '@eslint/js' import js from '@eslint/js'
import globals from 'globals' import { configs } from 'eslint-plugin-react'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks' import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh' import reactRefresh from 'eslint-plugin-react-refresh'
import globals from 'globals'
export default [ export default [
{ ignores: ['dist'] }, { ignores: ['dist'] },
@ -19,20 +19,17 @@ export default [
}, },
settings: { react: { version: '18.3' } }, settings: { react: { version: '18.3' } },
plugins: { plugins: {
react, configs,
'react-hooks': reactHooks, 'react-hooks': reactHooks,
'react-refresh': reactRefresh, 'react-refresh': reactRefresh,
}, },
rules: { rules: {
...js.configs.recommended.rules, ...js.configs.recommended.rules,
...react.configs.recommended.rules, ...configs.recommended.rules,
...react.configs['jsx-runtime'].rules, ...configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules, ...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off', 'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [ 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'warn',
{ allowConstantExport: true },
],
}, },
}, },
] ]

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,8 @@
}, },
"dependencies": { "dependencies": {
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1" "react-dom": "^18.3.1",
"utopia-ui": "^3.0.35"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.11.1", "@eslint/js": "^9.11.1",

View File

@ -1,25 +1,25 @@
import { UtopiaMap, Layer } from "utopia-ui" import { UtopiaMap, Layer } from 'utopia-ui'
import { events, places } from "./sample-data"
import { events, places } from './sample-data'
function App() { function App() {
return ( return (
<UtopiaMap center={[50.6, 9.5]} zoom={5} height='100dvh' width='100dvw'>
<UtopiaMap center={[50.6, 9.5]} zoom={5} height='100dvh' width="100dvw">
<Layer <Layer
name='events' name='events'
markerIcon='calendar' markerIcon='calendar'
markerShape='square' markerShape='square'
markerDefaultColor='#700' markerDefaultColor='#700'
data={events} /> data={events}
/>
<Layer <Layer
name='places' name='places'
markerIcon='point' markerIcon='point'
markerShape='circle' markerShape='circle'
markerDefaultColor='#007' markerDefaultColor='#007'
data={places} /> data={places}
/>
</UtopiaMap> </UtopiaMap>
) )
} }

View File

@ -1,5 +1,6 @@
import { StrictMode } from 'react' import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import App from './App.jsx' import App from './App.jsx'
import './index.css' import './index.css'

View File

@ -1,23 +1,25 @@
export const places = [{ export const places = [
"id": 51, {
"name": "Stadtgemüse", id: 51,
"text": "Stadtgemüse Fulda ist eine Gemüsegärtnerei in Maberzell, die es sich zur Aufgabe gemacht hat, die Stadt und seine Bewohner:innen mit regionalem, frischem und natürlich angebautem Gemüse mittels Gemüsekisten zu versorgen. Es gibt also jede Woche, von Frühjahr bis Herbst, angepasst an die Saison eine Kiste mit schmackhaftem und frischem Gemüse für euch, welche ihr direkt vor Ort abholen könnt. \r\n\r\nhttps://stadtgemuese-fulda.de", name: 'Stadtgemüse',
"position": { "type": "Point", "coordinates": [9.632435, 50.560342] }, text: 'Stadtgemüse Fulda ist eine Gemüsegärtnerei in Maberzell, die es sich zur Aufgabe gemacht hat, die Stadt und seine Bewohner:innen mit regionalem, frischem und natürlich angebautem Gemüse mittels Gemüsekisten zu versorgen. Es gibt also jede Woche, von Frühjahr bis Herbst, angepasst an die Saison eine Kiste mit schmackhaftem und frischem Gemüse für euch, welche ihr direkt vor Ort abholen könnt. \r\n\r\nhttps://stadtgemuese-fulda.de',
}, position: { type: 'Point', coordinates: [9.632435, 50.560342] },
{ },
"id": 166, {
"name": "Weidendom", id: 166,
"text": "free camping", name: 'Weidendom',
"position": { "type": "Point", "coordinates": [9.438793, 50.560112] }, text: 'free camping',
}]; position: { type: 'Point', coordinates: [9.438793, 50.560112] },
},
]
export const events = [ export const events = [
{ {
"id": 423, id: 423,
"name": "Hackathon", name: 'Hackathon',
"text": "still in progress", text: 'still in progress',
"position": { "type": "Point", "coordinates": [10.5, 52.62] }, position: { type: 'Point', coordinates: [10.5, 52.62] },
"start": "2022-03-25T12:00:00", start: '2022-03-25T12:00:00',
"end": "2022-05-12T12:00:00", end: '2022-05-12T12:00:00',
} },
] ]

View File

@ -1,5 +1,5 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({

70
package-lock.json generated
View File

@ -27,7 +27,8 @@
"react-toastify": "^9.1.3", "react-toastify": "^9.1.3",
"remark-breaks": "^4.0.0", "remark-breaks": "^4.0.0",
"tributejs": "^5.1.3", "tributejs": "^5.1.3",
"tw-elements": "^1.0.0" "tw-elements": "^1.0.0",
"utopia-ui": "^3.0.35"
}, },
"devDependencies": { "devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
@ -4787,9 +4788,9 @@
} }
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.6", "version": "3.3.8",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -6043,6 +6044,23 @@
"react": ">=18" "react": ">=18"
} }
}, },
"node_modules/react-photo-album": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/react-photo-album/-/react-photo-album-3.0.2.tgz",
"integrity": "sha512-w3+8i6aj9l1jRfcubgVbAlBGSdtiXcqWdcwZcH4/Bavc+v7X7h+S3TkQ723pvDABjhaaxS168g9ECEBP6xnKrQ==",
"engines": {
"node": ">=18"
},
"peerDependencies": {
"@types/react": ">=18",
"react": ">=18"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/react-router": { "node_modules/react-router": {
"version": "6.16.0", "version": "6.16.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz",
@ -7352,6 +7370,38 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
}, },
"node_modules/utopia-ui": {
"version": "3.0.35",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.35.tgz",
"integrity": "sha512-PtXvwskYuS4ro/gRWoNkKvn/lC0vW6m9ipwnXb7a4u/95wGWDXajhTh70MbAujTszxSH2iBRY6ZTsSFuREHCJQ==",
"dependencies": {
"@heroicons/react": "^2.0.17",
"@tanstack/react-query": "^5.17.8",
"@types/offscreencanvas": "^2019.7.1",
"axios": "^1.6.5",
"date-fns": "^3.3.1",
"leaflet": "^1.9.4",
"leaflet.locatecontrol": "^0.79.0",
"prop-types": "^15.8.1",
"react-colorful": "^5.6.1",
"react-image-crop": "^10.1.8",
"react-leaflet": "^4.2.1",
"react-leaflet-cluster": "^2.1.0",
"react-markdown": "^9.0.1",
"react-photo-album": "^3.0.2",
"react-router-dom": "^6.16.0",
"react-string-replace": "^1.1.1",
"react-toastify": "^9.1.3",
"remark-breaks": "^4.0.0",
"tributejs": "^5.1.3",
"tw-elements": "^1.0.0",
"yet-another-react-lightbox": "^3.21.7"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/vfile": { "node_modules/vfile": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz",
@ -7531,6 +7581,18 @@
"node": ">= 14" "node": ">= 14"
} }
}, },
"node_modules/yet-another-react-lightbox": {
"version": "3.21.7",
"resolved": "https://registry.npmjs.org/yet-another-react-lightbox/-/yet-another-react-lightbox-3.21.7.tgz",
"integrity": "sha512-dcdokNuCIl92f0Vl+uzeKULnQhztIGpoZFUMvtVNUPmtwsQWpqWufeieDPeg9JtFyVCcbj4vYw3V00DS0QNoWA==",
"engines": {
"node": ">=14"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
},
"node_modules/yocto-queue": { "node_modules/yocto-queue": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",