Fix linting errors, improve lint scripts

This commit is contained in:
2026-02-24 16:03:12 +04:00
parent 9ac4273fae
commit 845be96b71
13 changed files with 56 additions and 42 deletions

View File

@@ -508,18 +508,18 @@ export default class MapComponent extends Component {
// Top padding: 15% of the VISIBLE height (size[1] * 0.5)
const visibleHeight = size[1] * 0.5;
const topPadding = visibleHeight * 0.15;
const bottomPadding = (size[1] * 0.5) + (visibleHeight * 0.15); // Sheet + padding
const bottomPadding = size[1] * 0.5 + visibleHeight * 0.15; // Sheet + padding
padding[0] = topPadding;
padding[2] = bottomPadding;
}
// Desktop: Sidebar covers left side (approx 400px)
else if (this.args.isSidebarOpen) {
const sidebarWidth = 400;
const sidebarWidth = 400;
const visibleWidth = size[0] - sidebarWidth;
// Left padding: Sidebar + 15% of visible width
padding[3] = sidebarWidth + (visibleWidth * 0.15);
padding[3] = sidebarWidth + visibleWidth * 0.15;
// Right padding: 15% of visible width
padding[1] = visibleWidth * 0.15;
}

View File

@@ -98,7 +98,10 @@ export default class PlaceDetails extends Component {
formatMultiLine(val, type) {
if (!val) return null;
const parts = val.split(';').map((s) => s.trim()).filter(Boolean);
const parts = val
.split(';')
.map((s) => s.trim())
.filter(Boolean);
if (parts.length === 0) return null;
if (type === 'phone') {
@@ -129,7 +132,8 @@ export default class PlaceDetails extends Component {
}
get website() {
const val = this.place.url || this.tags.website || this.tags['contact:website'];
const val =
this.place.url || this.tags.website || this.tags['contact:website'];
return this.formatMultiLine(val, 'url');
}
@@ -158,7 +162,10 @@ export default class PlaceDetails extends Component {
get wikipedia() {
const val = this.tags.wikipedia;
if (!val) return null;
return val.split(';').map((s) => s.trim()).filter(Boolean)[0];
return val
.split(';')
.map((s) => s.trim())
.filter(Boolean)[0];
}
get geoLink() {

View File

@@ -45,6 +45,7 @@ export default class PlaceEditForm extends Component {
<form class="edit-form" {{on "submit" this.handleSubmit}}>
<div class="form-group">
<label for="edit-title">Title</label>
{{! template-lint-disable no-autofocus-attribute }}
<input
id="edit-title"
type="text"

View File

@@ -161,7 +161,8 @@ export default class PlacesSidebar extends Component {
><Icon @name="arrow-left" @size={{20}} @color="#333" /></button>
{{else}}
{{#if this.isNearbySearch}}
<h2><Icon @name="target" @size={{20}} @color="#ea4335" /> Nearby</h2>
<h2><Icon @name="target" @size={{20}} @color="#ea4335" />
Nearby</h2>
{{else}}
<h2><Icon @name="search" @size={{20}} @color="#333" /> Results</h2>
{{/if}}

View File

@@ -181,9 +181,11 @@ export default class SearchBoxComponent extends Component {
<div class="result-info">
<span class="result-title">{{result.title}}</span>
{{#if (eq result.source "osm")}}
<span class="result-desc">{{humanizeOsmTag result.type}}</span>
<span class="result-desc">{{humanizeOsmTag
result.type
}}</span>
{{else}}
{{#if result.description}}
{{#if result.description}}
<span class="result-desc">{{result.description}}</span>
{{/if}}
{{/if}}

View File

@@ -4,7 +4,6 @@ import { service } from '@ember/service';
import { action } from '@ember/object';
import Icon from '#components/icon';
import eq from 'ember-truth-helpers/helpers/eq';
import not from 'ember-truth-helpers/helpers/not';
export default class SettingsPane extends Component {
@service settings;