mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Merge pull request #37 from utopia-os/lint-console
feat(other): lint console
This commit is contained in:
commit
b3f3e93aa6
@ -45,7 +45,7 @@ module.exports = {
|
||||
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
|
||||
'react/react-in-jsx-scope': 'off', // Disable requirement for React import
|
||||
// 'no-catch-all/no-catch-all': 'error',
|
||||
// 'no-console': 'error',
|
||||
'no-console': 'error',
|
||||
'no-debugger': 'error',
|
||||
camelcase: 'error',
|
||||
indent: ['error', 2],
|
||||
|
||||
@ -17,6 +17,7 @@ export function SetNewPasswordPage() {
|
||||
|
||||
const onReset = async () => {
|
||||
const token = window.location.search.split('token=')[1]
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(token)
|
||||
|
||||
await toast.promise(passwordReset(token, password), {
|
||||
|
||||
@ -64,6 +64,7 @@ export const SearchControl = () => {
|
||||
const { data } = await axios.get(`https://photon.komoot.io/api/?q=${value}&limit=5`)
|
||||
setGeoResults(data.features)
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
@ -215,6 +216,7 @@ export const SearchControl = () => {
|
||||
)
|
||||
.openPopup()
|
||||
.addEventListener('popupclose', (e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e.target.remove())
|
||||
})
|
||||
if (geo.properties.extent)
|
||||
@ -284,6 +286,7 @@ export const SearchControl = () => {
|
||||
)
|
||||
.openPopup()
|
||||
.addEventListener('popupclose', (e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e.target.remove())
|
||||
})
|
||||
map.setView(
|
||||
|
||||
@ -74,6 +74,7 @@ export function ItemFormPopup(props: ItemFormPopupProps) {
|
||||
toast.error(error.toString())
|
||||
}
|
||||
if (success) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(props.item)
|
||||
|
||||
updateItem({ ...props.item, ...formItem })
|
||||
|
||||
@ -94,6 +94,7 @@ export function UtopiaMapInner({
|
||||
useMapEvents({
|
||||
click: (e) => {
|
||||
resetMetaTags()
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e.latlng.lat + ',' + e.latlng.lng)
|
||||
if (selectNewItemPosition) {
|
||||
setMapClicked({ position: e.latlng, setItemFormPopup })
|
||||
|
||||
@ -60,11 +60,13 @@ export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi<any>
|
||||
attestationApi
|
||||
.getItems()
|
||||
.then((value) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(value)
|
||||
|
||||
setAttestations(value)
|
||||
})
|
||||
.catch((error) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Error fetching items:', error)
|
||||
})
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ export const ContactInfoView = ({ item, heading }: { item: Item; heading: string
|
||||
const items = useItems()
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
'user:',
|
||||
items.find(
|
||||
|
||||
@ -30,6 +30,7 @@ export const GroupSubheaderForm = ({
|
||||
useEffect(() => {
|
||||
if (groupTypes && groupStates) {
|
||||
const groupType = groupTypes.find((gt) => gt.groupTypes_id.name === state.group_type)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(state.group_type)
|
||||
setState((prevState) => ({
|
||||
...prevState,
|
||||
|
||||
@ -17,6 +17,7 @@ const componentMap = {
|
||||
}
|
||||
|
||||
export const FlexView = ({ item }: { item: Item }) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(item)
|
||||
return (
|
||||
<div className='tw-h-full tw-overflow-y-auto fade'>
|
||||
|
||||
@ -56,6 +56,7 @@ export const MarketView = () => {
|
||||
})
|
||||
return null
|
||||
})
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(offers)
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
@ -35,6 +35,7 @@ export async function reverseGeocode(lat: number, lon: number): Promise<string>
|
||||
const formattedAddress = `${street} ${houseNumber}, ${city}`.trim()
|
||||
return formattedAddress || ''
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Error:', error)
|
||||
return ''
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user