Skip to content

Commit

Permalink
Apply prettier to the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
dkozickis committed May 20, 2024
1 parent 54c2b48 commit 0c7efa2
Show file tree
Hide file tree
Showing 158 changed files with 5,272 additions and 3,151 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-walls-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': patch
---

Apply Prettier to the codebase
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# CI/CD
.changeset/
.github/
.woodpecker/
pnpm-lock.yaml

# Docs
*.md

# E2E HTML
e2e/files/*.html
9 changes: 1 addition & 8 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
'use strict';

module.exports = {
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
singleQuote: true,
};
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"ignoreVersion": true,
"allowSameVersion": true
}
}
}
16 changes: 13 additions & 3 deletions .woodpecker/.test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@ steps:
image: danlynn/ember-cli:4.12.1
commands:
- npm ci
lint:
image: danlynn/ember-cli:4.12.1
lint-js:
image: node:20-slim
group: lint
commands:
- npm run lint:js
lint-hbs:
image: node:20-slim
group: lint
commands:
- npm run lint:hbs
lint-prettier:
image: node:20-slim
group: lint
commands:
- npm run lint
- npm run lint:prettier
dependency-lint:
image: danlynn/ember-cli:4.12.1
group: lint
Expand Down
12 changes: 7 additions & 5 deletions app/components/administrative-body-select.hbs
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<div class={{if @error "ember-power-select--error"}}>
<div class={{if @error 'ember-power-select--error'}}>
<PowerSelect
@placeholder={{t "manage-zittings-data.select-placeholder"}}
@placeholder={{t 'manage-zittings-data.select-placeholder'}}
@selected={{@selected}}
@options={{this.administrativeBodyOptions}}
@onChange={{@onChange}}
@triggerId={{@id}}
as |administrativeBody|
>
{{administrativeBody.isTijdsspecialisatieVan.naam}}
({{t "administrative-body-select.period"}}: {{plain-date administrativeBody.bindingStart}} -
({{t 'administrative-body-select.period'}}:
{{plain-date administrativeBody.bindingStart}}
-
{{#if administrativeBody.bindingEinde~}}
{{plain-date administrativeBody.bindingEinde}}
{{else}}
{{t "administrative-body-select.not-applicable"}}
{{t 'administrative-body-select.not-applicable'}}
{{/if}})
</PowerSelect>
</div>
</div>
20 changes: 11 additions & 9 deletions app/components/agenda-manager/agenda-context.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{{yield (hash
items=this.items
loadItemsTask=this.loadItemsTask
deleteItemTask=this.deleteItemTask
onSort=(perform this.onSortTask)
saveItemTask=this.updateItemTask
createAgendaItem=this.createAgendaItem
onCancel=(perform this.resetItemTask)
)}}
{{yield
(hash
items=this.items
loadItemsTask=this.loadItemsTask
deleteItemTask=this.deleteItemTask
onSort=(perform this.onSortTask)
saveItemTask=this.updateItemTask
createAgendaItem=this.createAgendaItem
onCancel=(perform this.resetItemTask)
)
}}
26 changes: 19 additions & 7 deletions app/components/agenda-manager/agenda-item-form/index.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{{yield (hash
Textarea=(component "agenda-manager/agenda-item-form/text-area" model=@model)
Radio=(component "agenda-manager/agenda-item-form/radio" model=@model)
Submit=(component "agenda-manager/agenda-item-form/submit" submit=this.submit loading=this.submitTask.isRunning)
SelectDraft=(component "agenda-manager/agenda-item-form/select-draft" model=@model)
SelectLocation=(component "agenda-manager/agenda-item-form/select-location" model=@model)
)}}
{{yield
(hash
Textarea=(component
'agenda-manager/agenda-item-form/text-area' model=@model
)
Radio=(component 'agenda-manager/agenda-item-form/radio' model=@model)
Submit=(component
'agenda-manager/agenda-item-form/submit'
submit=this.submit
loading=this.submitTask.isRunning
)
SelectDraft=(component
'agenda-manager/agenda-item-form/select-draft' model=@model
)
SelectLocation=(component
'agenda-manager/agenda-item-form/select-location' model=@model
)
)
}}
15 changes: 10 additions & 5 deletions app/components/agenda-manager/agenda-item-form/radio/index.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{{yield (hash Option=(component "agenda-manager/agenda-item-form/radio/option"
selectedOption=this.selectedOption
selectOption=this.selectOption
name=@name))
}}
{{yield
(hash
Option=(component
'agenda-manager/agenda-item-form/radio/option'
selectedOption=this.selectedOption
selectOption=this.selectOption
name=@name
)
)
}}
17 changes: 11 additions & 6 deletions app/components/agenda-manager/agenda-item-form/radio/option.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<label class="au-c-control au-c-control--radio">
<input class="au-c-control__input" type="radio" name={{@name}}
checked={{eq @selectedOption @value}} value={{@value}}
{{on "click" (fn @selectOption @value)}}/>
<span class="au-c-control__indicator"></span>
<label class='au-c-control au-c-control--radio'>
<input
class='au-c-control__input'
type='radio'
name={{@name}}
checked={{eq @selectedOption @value}}
value={{@value}}
{{on 'click' (fn @selectOption @value)}}
/>
<span class='au-c-control__indicator'></span>
{{yield}}
</label>
</label>
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
@renderInPlace={{true}}
@placeholder={{@placeholder}}
@options={{this.options}}
@verticalPosition="below"
@verticalPosition='below'
@searchEnabled={{true}}
@selected={{this.selected}}
@allowClear={{true}}
@search={{perform this.getDrafts}}
@onChange={{this.select}}
as |option|>
as |option|
>
{{option.currentVersion.title}}
</PowerSelect>
</div>
</div>
35 changes: 22 additions & 13 deletions app/components/agenda-manager/agenda-item-form/select-location.hbs
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
<div class="au-u-margin-bottom">
<div class='au-u-margin-bottom'>
<AuLabel>
{{yield}}
</AuLabel>
<div class="au-o-grid au-o-grid--tiny">
<div class="au-o-grid__item au-u-1-2">
<div class='au-o-grid au-o-grid--tiny'>
<div class='au-o-grid__item au-u-1-2'>
<PowerSelect
@renderInPlace={{true}}
@placeholder={{t "manage-agenda-zitting-modal-move.position-select-placeholder"}}
@placeholder={{t
'manage-agenda-zitting-modal-move.position-select-placeholder'
}}
@options={{this.locationOptions}}
@verticalPosition="above"
@verticalPosition='above'
@selected={{this.selectedLocation}}
@allowClear={{true}}
@onChange={{this.selectLocation}}
as |location|>
as |location|
>
{{location.name}}
</PowerSelect>
</div>
{{#if this.showAfterItemOptions}}
<div class="au-o-grid__item au-u-1-2">
<div class='au-o-grid__item au-u-1-2'>
<PowerSelect
@renderInPlace={{true}}
@placeholder={{t "manage-agenda-zitting-modal-move.agendapunt-select-placeholder"}}
@placeholder={{t
'manage-agenda-zitting-modal-move.agendapunt-select-placeholder'
}}
@searchEnabled={{true}}
@searchPlaceholder={{t "manage-agenda-zitting-modal-move.search-placeholder"}}
@verticalPosition="above"
@searchPlaceholder={{t
'manage-agenda-zitting-modal-move.search-placeholder'
}}
@verticalPosition='above'
@options={{this.afterItemOptions}}
@selected={{this.selectedAfterItem}}
@onChange={{this.selectAfterItem}}
@matcher={{this.searchMatcher}}
as |a|>
{{add a.position 1}}. {{a.titel}}
as |a|
>
{{add a.position 1}}.
{{a.titel}}
</PowerSelect>
</div>
{{/if}}
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions app/components/agenda-manager/agenda-item-form/submit.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<AuButton @loading={{@loading}} {{on "click" @submit}}>
<AuButton @loading={{@loading}} {{on 'click' @submit}}>
{{yield}}
</AuButton>
</AuButton>
4 changes: 2 additions & 2 deletions app/components/agenda-manager/agenda-item-form/text-area.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AuTextarea
id={{@for}}
value={{this.value}}
{{on "input" this.handleValueChange}}
@width="block"
{{on 'input' this.handleValueChange}}
@width='block'
/>
</p>
24 changes: 14 additions & 10 deletions app/components/agenda-manager/agenda-table/body.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<SortableObjects @tagName={{"tbody"}}
@sortEndAction={{@onSort}}
@sortableObjectList={{@items}}
@enableSort={{true}}
@useSwap={{true}}
@inPlace={{true}}>
{{yield (hash
Row=(component "agenda-manager/agenda-table/row" readOnly=@readOnly)
Empty=(component "agenda-manager/agenda-table/empty" onCreate=@onCreate)
)}}
<SortableObjects
@tagName={{'tbody'}}
@sortEndAction={{@onSort}}
@sortableObjectList={{@items}}
@enableSort={{true}}
@useSwap={{true}}
@inPlace={{true}}
>
{{yield
(hash
Row=(component 'agenda-manager/agenda-table/row' readOnly=@readOnly)
Empty=(component 'agenda-manager/agenda-table/empty' onCreate=@onCreate)
)
}}
</SortableObjects>
6 changes: 3 additions & 3 deletions app/components/agenda-manager/agenda-table/empty.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td colspan="4">
<AuHelpText @size="normal" @skin="link">
{{t "manage-agenda-zitting-modal.no-data-message"}}
<td colspan='4'>
<AuHelpText @size='normal' @skin='link'>
{{t 'manage-agenda-zitting-modal.no-data-message'}}
</AuHelpText>
</td>
</tr>
20 changes: 12 additions & 8 deletions app/components/agenda-manager/agenda-table/header.hbs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<thead>
<tr>
<th>{{t "manage-agenda-zitting-modal.order-label"}}</th>
<th>{{t 'manage-agenda-zitting-modal.order-label'}}</th>
{{!template-lint-disable no-inline-styles}}
<th style="width: 400px;">{{t "manage-agenda-zitting-modal.title-label"}}</th>
<th>{{t "manage-agenda-zitting-modal.gepland-openbaar"}}</th>
<th class="au-u-table-right">
<span class="au-u-hidden-visually">{{t "manage-agenda-zitting-modal.actions-label"}}</span>
<th style='width: 400px;'>{{t
'manage-agenda-zitting-modal.title-label'
}}</th>
<th>{{t 'manage-agenda-zitting-modal.gepland-openbaar'}}</th>
<th class='au-u-table-right'>
<span class='au-u-hidden-visually'>{{t
'manage-agenda-zitting-modal.actions-label'
}}</span>
{{#unless @readOnly}}
<AuButton {{on "click" @onCreate}} @icon="add" @iconAlignment="left">
{{t "manage-agenda-zitting-modal.create-item-button"}}
<AuButton {{on 'click' @onCreate}} @icon='add' @iconAlignment='left'>
{{t 'manage-agenda-zitting-modal.create-item-button'}}
</AuButton>
{{/unless}}
</th>
</tr>
</thead>
</thead>
24 changes: 18 additions & 6 deletions app/components/agenda-manager/agenda-table/index.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<table class="au-c-meeting-chrome-table">
{{yield (hash
Header=(component "agenda-manager/agenda-table/header" onCreate=@onCreate readOnly=@readOnly)
Body=(component "agenda-manager/agenda-table/body" items=@items onSort=@onSort onCreate=@onCreate readOnly=@readOnly)
)}}
</table>
<table class='au-c-meeting-chrome-table'>
{{yield
(hash
Header=(component
'agenda-manager/agenda-table/header'
onCreate=@onCreate
readOnly=@readOnly
)
Body=(component
'agenda-manager/agenda-table/body'
items=@items
onSort=@onSort
onCreate=@onCreate
readOnly=@readOnly
)
)
}}
</table>
Loading

0 comments on commit 0c7efa2

Please sign in to comment.