Skip to content

Commit

Permalink
chore(ember): linted
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Oct 4, 2023
1 parent 3d04a0f commit 85fdc8a
Show file tree
Hide file tree
Showing 34 changed files with 133 additions and 109 deletions.
8 changes: 4 additions & 4 deletions ember/app/components/dependency-compact/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{{(if
@version
(modifier
'uk-tooltip'
(concat 'EOL: ' (format-date @version.endOfLife))
pos='bottom'
"uk-tooltip"
(concat "EOL: " (format-date @version.endOfLife))
pos="bottom"
)
)}}
>
{{or @version.requirements 'No dependencies yet'}}
{{or @version.requirements "No dependencies yet"}}
</span>
4 changes: 2 additions & 2 deletions ember/app/components/dependency-detailed/template.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<tr class='{{status-to-class @version.status}}'>
<tr class="{{status-to-class @version.status}}">
<td data-test-version-dependency-name>
{{@version.name}}
</td>
<td data-test-version-version>
{{@version.version}}
</td>
<td data-test-version-end-of-life>
{{or (format-date @version.endOfLife) 'missing'}}
{{or (format-date @version.endOfLife) "missing"}}
</td>
<td data-test-version-release-date>
{{format-date @version.releaseDate}}
Expand Down
4 changes: 2 additions & 2 deletions ember/app/components/dependency-table/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h2 class="table-header">Dependencies</h2>
<hr class='seperator' />
<hr class="seperator" />
{{#if @versionedDependencies}}
<table>
<thead>
Expand All @@ -18,7 +18,7 @@
</tbody>
</table>
{{else}}
<div class='none-yet' data-test-versioned-dependencies-none>
<div class="none-yet" data-test-versioned-dependencies-none>
<span>No dependencies yet</span>
</div>
{{/if}}
10 changes: 5 additions & 5 deletions ember/app/components/form.hbs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<form class='uk-form' autocomplete='off' {{on 'submit' this.submit}}>
<form class="uk-form" autocomplete="off" {{on "submit" this.submit}}>

<fieldset class='uk-fieldset'>
<legend class='uk-legend'>{{@name}}</legend>
<fieldset class="uk-fieldset">
<legend class="uk-legend">{{@name}}</legend>

{{yield
(hash
model=@model
loading=this.loading
input=(component
'validated-input' model=@model submitted=this.submitted
"validated-input" model=@model submitted=this.submitted
)
button=(component 'uk-button' label='Save' type='submit')
button=(component "uk-button" label="Save" type="submit")
)
}}
</fieldset>
Expand Down
30 changes: 15 additions & 15 deletions ember/app/components/maintainer-table/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h2 class="table-header">Maintainers</h2>
<hr class='seperator' />
<hr class="seperator" />
{{#if @maintainers}}
<table>
<thead>
Expand All @@ -10,22 +10,22 @@
</thead>
<tbody>
{{#each (sort-by "isPrimary:desc" this.maintainers) as |maintainer|}}
<tr>
<td>
{{#if maintainer.isPrimary}}
<UkIcon @icon="star" @ratio={{0.5}} />
{{/if}}
{{maintainer.user.username}}
</td>
<td>
{{maintainer.user.email}}
</td>
</tr>
{{/each}}
<tr>
<td>
{{#if maintainer.isPrimary}}
<UkIcon @icon="star" @ratio={{0.5}} />
{{/if}}
{{maintainer.user.username}}
</td>
<td>
{{maintainer.user.email}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<div class='none-yet' data-test-versioned-dependencies-none>
<div class="none-yet" data-test-versioned-dependencies-none>
<span>No maintainers yet</span>
</div>
{{/if}}
{{/if}}
4 changes: 2 additions & 2 deletions ember/app/components/modal/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
as |modal|
>
<modal.header>
<h2 class='uk-modal-title'>{{@title}}</h2>
<h2 class="uk-modal-title">{{@title}}</h2>
</modal.header>
{{#if @visible}}
{{yield
(hash
body=(component 'uk-modal/body') footer=(component 'uk-modal/footer')
body=(component "uk-modal/body") footer=(component "uk-modal/footer")
)
}}
{{/if}}
Expand Down
12 changes: 6 additions & 6 deletions ember/app/components/project-compact/template.hbs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<div class='project-compact'>
<div class="project-compact">

<UkCard as |card|>

<LinkTo
@route='projects.detailed'
data-test-project-link='{{@project.id}}'
@route="projects.detailed"
data-test-project-link="{{@project.id}}"
@model={{@project}}
>
<h3 data-test-project-name class='title-compact'>
<h3 data-test-project-name class="title-compact">
{{@project.name}}
</h3>
</LinkTo>

<card.body class='{{status-to-class @project.status}}'>
<card.body class="{{status-to-class @project.status}}">

<UkIcon @icon='{{this.icon}}' @ratio={{4}} />
<UkIcon @icon="{{this.icon}}" @ratio={{4}} />
<DependencyCompact @version={{this.version}} />

</card.body>
Expand Down
39 changes: 31 additions & 8 deletions ember/app/components/project-form/template.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
{{page-title @project.name}}

<Form @name={{if @project (concat 'Edit project ' @project.name) 'Track new Project'}} @model={{this.project}} @onSubmit={{perform this.saveProject}} as |f|>
<f.input @name='name' />
<f.input @name='repo' />
<Form
@name={{if
@project
(concat "Edit project " @project.name)
"Track new Project"
}}
@model={{this.project}}
@onSubmit={{perform this.saveProject}}
as |f|
>
<f.input @name="name" />
<f.input @name="repo" />

<f.input @name='users' @type='select' @label='Maintainers' @multiple={{true}} @value={{this.project.users}}
@options={{this.users}} @searchField='searchField' @visibleField='fullName' />
<f.input
@name="users"
@type="select"
@label="Maintainers"
@multiple={{true}}
@value={{this.project.users}}
@options={{this.users}}
@searchField="searchField"
@visibleField="fullName"
/>
{{#if (gt this.project.users.length 1)}}
<f.input @name='primaryMaintainer' @type='select' @options={{this.project.users}} @value={{this.primaryMaintainer}}
@searchField='searchField' @visibleField='fullName' />
<f.input
@name="primaryMaintainer"
@type="select"
@options={{this.project.users}}
@value={{this.primaryMaintainer}}
@searchField="searchField"
@visibleField="fullName"
/>
{{/if}}
<f.button @loading={{this.saveProject.isRunning}} />
</Form>
</Form>
6 changes: 3 additions & 3 deletions ember/app/components/select-button.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<UkButton
@onClick={{@on-click}}
class='select-button'
@label='+'
@width='1-1'
class="select-button"
@label="+"
@width="1-1"
/>
27 changes: 15 additions & 12 deletions ember/app/components/top-nav/template.hbs
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<div
class='navbar'
uk-sticky='sel-target: .navbar-container; cls-active: uk-navbar-sticky'
class="navbar"
uk-sticky="sel-target: .navbar-container; cls-active: uk-navbar-sticky"
>
<nav class='navbar-container' uk-navbar>
<div class='uk-navbar-left'>
<LinkTo @route='projects' class='uk-navbar-item uk-logo'>
<nav class="navbar-container" uk-navbar>
<div class="uk-navbar-left">
<LinkTo @route="projects" class="uk-navbar-item uk-logo">
Outdated
</LinkTo>
</div>
<div class='uk-navbar-right'>
<ul class='button-nav'>
<li>
<LinkTo @route="projects.index" @current-when="projects.index projects.detailed not-found">Overview</LinkTo>
</li>
<li>
<LinkTo @route="projects.add">Add</LinkTo>
<div class="uk-navbar-right">
<ul class="button-nav">
<li>
<LinkTo
@route="projects.index"
@current-when="projects.index projects.detailed not-found"
>Overview</LinkTo>
</li>
<li>
<LinkTo @route="projects.add">Add</LinkTo>
</li>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ember/app/components/validated-input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
@noMatchesMessageComponent={{@noMatchesMessageComponent}}
@errorComponent={{if
(and this.showValidity this.errors)
(component 'validated-input/error' errors=this.errors id=this.errorId)
(component "validated-input/error" errors=this.errors id=this.errorId)
}}
@labelComponent={{component 'validated-input/label' inputId=@inputId}}
@labelComponent={{component "validated-input/label" inputId=@inputId}}
...attributes
/>
2 changes: 1 addition & 1 deletion ember/app/components/validated-input/error/template.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<small data-test-error id={{@id}} class='uk-text-danger' ...attributes>
<small data-test-error id={{@id}} class="uk-text-danger" ...attributes>
{{yield}}{{this.errorsAsString}}
</small>
2 changes: 1 addition & 1 deletion ember/app/components/validated-input/label/template.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<label data-test-label class='uk-form-label' for={{@inputId}}>
<label data-test-label class="uk-form-label" for={{@inputId}}>
{{@label}}
</label>
8 changes: 4 additions & 4 deletions ember/app/components/validated-input/render/template.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class='uk-margin'>
<div class="uk-margin">
{{#if (or @label (not @placeholder))}}
<@labelComponent @label={{or @label this.name}} />
{{/if}}
<div class='uk-form-controls'>
<div class="uk-form-controls">

{{#if (eq @type 'select')}}
{{#if (eq @type "select")}}
<ValidatedInput::Types::Select
@id={{@inputId}}
@disabled={{@disabled}}
Expand All @@ -26,7 +26,7 @@
@selectComponent={{this.selectComponent}}
...attributes
/>
{{else if (eq @type 'date')}}
{{else if (eq @type "date")}}
<ValidatedInput::Types::Date
@id={{@inputId}}
@disabled={{@disabled}}
Expand Down
4 changes: 2 additions & 2 deletions ember/app/components/validated-input/types/date/template.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<EmberFlatpickr
placeholder={{@placeholder}}
@dateFormat={{or @dateFormat 'Y-m-d'}}
@dateFormat={{or @dateFormat "Y-m-d"}}
@date={{or @value null}}
@onChange={{this.onUpdate}}
@onClose={{@setDirty}}
@allowInput={{or @allowInput true}}
class='uk-input {{if @isValid "is-valid"}} {{if @isInvalid "is-invalid"}}'
class="uk-input {{if @isValid 'is-valid'}} {{if @isInvalid 'is-invalid'}}"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@noMatchesMessage={{@noMatchesMessage}}
@noMatchesMessageComponent={{@noMatchesMessageComponent}}
id={{@inputId}}
class='{{if @isValid "is-valid "}} {{if @isInvalid "is-invalid"}}'
class="{{if @isValid 'is-valid '}} {{if @isInvalid 'is-invalid'}}"
as |name|
>
{{or (get name (or @visibleField @searchField)) name}}
Expand Down
6 changes: 3 additions & 3 deletions ember/app/components/validated-input/types/text/template.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{! template-lint-disable require-input-label}}
<input
{{on 'input' this.onUpdate}}
{{on 'blur' @setDirty}}
class='uk-input {{if @isValid "is-valid"}} {{if @isInvalid "is-invalid"}}'
{{on "input" this.onUpdate}}
{{on "blur" @setDirty}}
class="uk-input {{if @isValid 'is-valid'}} {{if @isInvalid 'is-invalid'}}"
...attributes
/>
2 changes: 1 addition & 1 deletion ember/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{page-title 'Outdated'}}
{{page-title "Outdated"}}

<Top-Nav />
{{outlet}}
2 changes: 1 addition & 1 deletion ember/app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{outlet}}
{{outlet}}
2 changes: 1 addition & 1 deletion ember/app/templates/not-found.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="uk-text-center" data-test-not-found>
<h1 class="uk-heading-2xlarge">404</h1>
<p>The site you requested does not exist</p>
</div>
</div>
2 changes: 1 addition & 1 deletion ember/app/templates/projects.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content-container'>{{outlet}}</div>
<div class="content-container">{{outlet}}</div>
2 changes: 1 addition & 1 deletion ember/app/templates/projects/add.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{page-title 'Add new project to tracking'}}
{{page-title "Add new project to tracking"}}

<ProjectForm />
2 changes: 1 addition & 1 deletion ember/app/templates/projects/detailed/edit.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{page-title "Edit"}}

<ProjectForm @project={{@model}}/>
<ProjectForm @project={{@model}} />
2 changes: 1 addition & 1 deletion ember/app/templates/projects/detailed/index.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{{page-title @model.name}}
<ProjectDetailed @project={{@model}} />
<ProjectDetailed @project={{@model}} />
4 changes: 2 additions & 2 deletions ember/app/templates/projects/index.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{page-title 'Overview'}}
<div class='compact-projects'>
{{page-title "Overview"}}
<div class="compact-projects">
{{#each @model as |project|}}
<ProjectCompact @project={{project}} />
{{/each}}
Expand Down
2 changes: 1 addition & 1 deletion ember/app/templates/protected.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{outlet}}
{{outlet}}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module('Integration | Component | dependency-compact', function (hooks) {
},
);

await render(hbs`<DependencyCompact @version={{this.version}}/>`);
await render(hbs`<DependencyCompact @version={{this.version}} />`);

assert
.dom('[data-test-dependency-compact]')
Expand Down
Loading

0 comments on commit 85fdc8a

Please sign in to comment.