chore: 🤖 Add eol-last rule (#1296)

* chore: 🤖 Add eol-last rule

* style: 💄 Add newlines for core

* style: 💄 Add newlines to EOF in rose

* style: 💄 Add newlines for admin

* style: 💄 Add newlines in desktop templates
This commit is contained in:
Zhihe Li authored and GitHub committed 2022-09-01 17:43:30 -04:00
1 parent a69d01c9fc
commit ccf462019b
332 files changed
+362 -328

No files matched your search

+1
View File
@@ -4,5 +4,6 @@ module.exports = {
extends: ['recommended'],
rules: {
quotes: 'single',
'eol-last': 'editorconfig',
},
};
@@ -6,4 +6,4 @@
title={{t 'actions.get-topic-help'}}
>
<Rose::Icon @name='flight-icons/svg/help-24' @size={{@iconSize}} />
</a>
</a>
@@ -10,4 +10,4 @@
{{#if this.helpRoute}}
<message.link @route={{this.helpRoute}}>{{t 'actions.help'}}</message.link>
{{/if}}
</Rose::Message>
</Rose::Message>
@@ -7,4 +7,4 @@
cancel=false
disabled=@disabled
}}
{{/if}}
{{/if}}
@@ -11,4 +11,4 @@
@showCancel={{false}}
/>
</Rose::Form>
</Rose::Form>
@@ -29,4 +29,4 @@
@showCancel={{false}}
/>
</Rose::Form>
</Rose::Form>
+1 -1
View File
@@ -1,3 +1,3 @@
<span ...attributes class='image-container'>
{{inline-svg @name}}
</span>
</span>
@@ -11,4 +11,4 @@
{{on 'click' this.toggleRefresh}}
>
{{yield}}
</Rose::Button>
</Rose::Button>
@@ -4,4 +4,4 @@
(fn this.accept confirmation)
(fn this.deny confirmation)
}}
{{/each}}
{{/each}}
@@ -6,4 +6,4 @@
<LoadingButton @onClick={{this.onClick}}>
{{t 'actions.refresh'}}
</LoadingButton>
</LoadingButton>
@@ -1,2 +1,2 @@
<h2 id='title'>Welcome to Ember</h2>
<p>{{relative-datetime-live this.now}}</p>
<p>{{relative-datetime-live this.now}}</p>
+1
View File
@@ -4,6 +4,7 @@ module.exports = {
extends: ['recommended'],
rules: {
quotes: 'single',
'eol-last': 'editorconfig',
},
overrides: [
{
@@ -1 +1 @@
{{yield}}
{{yield}}
@@ -9,4 +9,4 @@
<span class='rose-badge-body'>
{{yield}}
</span>
</span>
</span>
@@ -25,4 +25,4 @@
<Rose::Icon @name={{@iconRight}} @size='medium' />
{{/if}}
</span>
</button>
</button>
@@ -29,4 +29,4 @@
</LinkTo>
{{yield}}
</article>
</article>
@@ -1,3 +1,3 @@
<div ...attributes class='rose-cards'>
{{yield (hash link=(component 'rose/card/link'))}}
</div>
</div>
@@ -3,4 +3,4 @@
...attributes
class='rose-codemirror-container'
{{code-mirror value=@value onInput=@onInput options=@options}}
></div>
></div>
@@ -5,4 +5,4 @@
toolbar=(component 'rose/code-editor/toolbar' copyText=@codeValue)
)
}}
</div>
</div>
@@ -26,4 +26,4 @@
Copy code
</CopyButton>
</div>
</div>
</div>
@@ -1,3 +1,3 @@
<div class='rose-dialog-body' tabindex='0'>
{{yield}}
</div>
</div>
@@ -18,4 +18,4 @@
<div class='rose-dialog-cover-body'>
{{yield to='body'}}
</div>
</section>
</section>
@@ -84,4 +84,4 @@
</section>
{{/if}}
{{/if}}
@@ -15,4 +15,4 @@
<Rose::Icon @name={{@iconOnly}} @size='medium' />
{{/if}}
</span>
</button>
</button>
@@ -58,4 +58,4 @@
</div>
{{/if}}
</details>
</details>
@@ -6,4 +6,4 @@
<dd class='rose-dropdown-value'>
{{yield to='value'}}
</dd>
</dl>
</dl>
@@ -47,4 +47,4 @@
{{yield}}
</LinkTo>
{{/if}}
{{/if}}
{{/if}}
@@ -12,4 +12,4 @@
{{/if}}
{{yield}}
</section>
</section>
@@ -9,4 +9,4 @@
{{inline-svg @logo}}
{{/if}}
</LinkTo>
</LinkTo>
@@ -8,4 +8,4 @@
<span class='rose-footer-copyright-text'>
{{@text}}
</span>
</span>
</span>
@@ -6,4 +6,4 @@
text=(component 'rose/anonymous' class='rose-footer-text')
)
}}
</footer>
</footer>
@@ -1,3 +1,3 @@
<nav class='rose-footer-nav' aria-label='footer-nav'>
{{yield (hash link=(component 'rose/footer/nav/link'))}}
</nav>
</nav>
@@ -18,4 +18,4 @@
>
{{yield}}
</LinkTo>
{{/if}}
{{/if}}
@@ -8,4 +8,4 @@
v{{@version}}
</span>
{{/if}}
</span>
</span>
@@ -2,4 +2,4 @@
<Rose::Button @style='secondary' {{on 'click' @enableEdit}}>
{{@enableEditText}}
</Rose::Button>
</div>
</div>
@@ -12,4 +12,4 @@
{{@cancelText}}
</Rose::Button>
{{/if}}
</div>
</div>
@@ -12,4 +12,4 @@
)
)
}}
{{/each}}
{{/each}}
@@ -32,4 +32,4 @@
(hash errors=(component 'rose/form/errors' id=(concat 'errors-' this.id)))
}}
</div>
</div>
@@ -1,3 +1,3 @@
<div class='rose-form-errors' id={{@id}} ...attributes>
{{yield (hash message=(component 'rose/form/errors/message'))}}
</div>
</div>
@@ -1,4 +1,4 @@
<p class='rose-form-error-message' ...attributes>
<Rose::Icon @name='flight-icons/svg/x-square-16' @size='medium' />
{{yield}}
</p>
</p>
@@ -22,4 +22,4 @@
<div class='rose-form-fieldset-body'>
{{yield to='body'}}
</div>
</fieldset>
</fieldset>
@@ -13,4 +13,4 @@
>{{@linkText}}</a>
{{/if}}
{{/if}}
</span>
</span>
@@ -39,4 +39,4 @@
isEditable=this.isEditable
)
}}
</form>
</form>
@@ -62,4 +62,4 @@
}}
</div>
{{/if}}
{{/if}}
@@ -7,4 +7,4 @@
@type={{@type}}
@value={{@value}}
aria-describedby={{@aria-describedby}}
/>
/>
@@ -1,3 +1,3 @@
<label class='rose-form-label{{if @error ' error'}}' for={{@for}} ...attributes>
{{yield}}
</label>
</label>
@@ -17,4 +17,4 @@
layout=@layout
)
)
}}
}}
@@ -35,4 +35,4 @@
{{yield}}
</div>
</div>
@@ -54,4 +54,4 @@
}}
</div>
{{/if}}
{{/if}}
@@ -10,4 +10,4 @@
as |xs|
>
{{yield xs}}
</XSelect>
</XSelect>
@@ -56,4 +56,4 @@
}}
</div>
{{/if}}
{{/if}}
@@ -6,4 +6,4 @@
disabled={{@disabled}}
@value={{@value}}
aria-describedby={{@aria-describedby}}
/>
/>
@@ -8,4 +8,4 @@
{{yield to='body'}}
</div>
</section>
</section>
@@ -13,4 +13,4 @@
<h1 class='rose-header-brand-text'>{{@text}}</h1>
{{/if}}
</LinkTo>
</LinkTo>
@@ -6,4 +6,4 @@
nav=(component 'rose/header/nav')
)
}}
</div>
</div>
@@ -5,4 +5,4 @@
dropdown=(component 'rose/dropdown')
)
}}
</nav>
</nav>
@@ -1,3 +1,3 @@
<div class='rose-header-utilities'>
{{yield (hash dropdown=(component 'rose/dropdown' dropdownRight=true))}}
</div>
</div>
@@ -1,3 +1,3 @@
<span ...attributes class='rose-icon {{@size}}'>
{{inline-svg @name}}
</span>
</span>
@@ -1,3 +1,3 @@
<section ...attributes class='rose-layout-centered'>
{{yield}}
</section>
</section>
@@ -8,4 +8,4 @@
footer=(component 'rose/anonymous' class='rose-layout-global-footer')
)
}}
</section>
</section>
@@ -12,4 +12,4 @@
body=(component 'rose/anonymous' class='rose-layout-page-body')
)
}}
</div>
</div>
@@ -7,4 +7,4 @@
)
)
}}
</div>
</div>
@@ -24,4 +24,4 @@
<Rose::Icon @name={{@iconRight}} @size='medium' />
{{/if}}
</span>
</LinkTo>
</LinkTo>
@@ -1,3 +1,3 @@
<ul class='rose-list-key-value'>
{{yield (hash item=(component 'rose/list/key-value/item'))}}
</ul>
</ul>
@@ -17,4 +17,4 @@
)
)
}}
</li>
</li>
@@ -25,4 +25,4 @@
}}
</section>
</article>
</article>
@@ -1,3 +1,3 @@
<nav ...attributes class='rose-nav-breadcrumbs' aria-label='breadcrumbs'>
{{yield (hash link=(component 'rose/nav/link'))}}
</nav>
</nav>
@@ -6,4 +6,4 @@
<LinkTo @route={{@route}} class='rose-nav-link'>
{{yield}}
</LinkTo>
{{/if}}
{{/if}}
@@ -14,4 +14,4 @@
{{yield (hash link=(component 'rose/nav/link'))}}
</nav>
</nav>
@@ -2,4 +2,4 @@
{{yield (hash link=(component 'rose/nav/link'))}}
</nav>
</nav>
@@ -33,4 +33,4 @@
</button>
{{/if}}
</section>
</section>
@@ -1 +1 @@
<hr class='rose-separator' />
<hr class='rose-separator' />
@@ -19,4 +19,4 @@
)
)
}}
</table>
</table>
@@ -1 +1 @@
{{yield}}
{{yield}}
@@ -10,4 +10,4 @@
headerCell=(component 'rose/table/row/cell' tagName='th')
)
}}
</tr>
</tr>
@@ -1 +1 @@
{{yield (hash row=(component 'rose/table/row'))}}
{{yield (hash row=(component 'rose/table/row'))}}
@@ -9,4 +9,4 @@
)
)
}}
</div>
</div>
@@ -1,3 +1,3 @@
<span class='rose-toolbar-info'>
{{yield}}
</span>
</span>
@@ -1 +1 @@
{{outlet}}
{{outlet}}
@@ -23,4 +23,4 @@
>Refresh</Rose::Button>
</Rose::Form>
</toolbar.secondary>
</Rose::Toolbar>
</Rose::Toolbar>
@@ -98,4 +98,4 @@
</Rose::Layout::Sidebar>
</layout.body>
</Rose::Layout::Global>
</Rose::Layout::Global>
@@ -13,7 +13,10 @@ module('Integration | Component | rose/badge', function (hooks) {
test('it renders with content', async function (assert) {
await render(hbs`<Rose::Badge>host-catalog-1</Rose::Badge>`);
assert.strictEqual(find('.rose-badge').textContent.trim(), 'host-catalog-1');
assert.strictEqual(
find('.rose-badge').textContent.trim(),
'host-catalog-1'
);
});
test('it renders an icon using @icon', async function (assert) {
@@ -20,7 +20,10 @@ module('Integration | Component | rose/dropdown', function (hooks) {
test('it renders with trigger', async function (assert) {
await render(hbs`<Rose::Dropdown @text="Click me" />`);
assert.strictEqual(find('.rose-dropdown-trigger').textContent.trim(), 'Click me');
assert.strictEqual(
find('.rose-dropdown-trigger').textContent.trim(),
'Click me'
);
});
test('it supports a count', async function (assert) {
@@ -15,6 +15,9 @@ module('Integration | Component | rose/dropdown/key-value', function (hooks) {
`);
assert.strictEqual(find('.rose-dropdown-key').textContent.trim(), 'key');
assert.strictEqual(find('.rose-dropdown-value').textContent.trim(), 'value');
assert.strictEqual(
find('.rose-dropdown-value').textContent.trim(),
'value'
);
});
});
@@ -21,7 +21,10 @@ module('Integration | Component | rose/dropdown/link', function (hooks) {
await render(hbs`<Rose::Dropdown::Link>
content
</Rose::Dropdown::Link>`);
assert.strictEqual(find('.rose-dropdown-link').textContent.trim(), 'content');
assert.strictEqual(
find('.rose-dropdown-link').textContent.trim(),
'content'
);
});
test('it supports style', async function (assert) {
@@ -55,7 +55,10 @@ module('Integration | Component | rose/form/checkbox', function (hooks) {
const errorMessageEl = find('.rose-form-errors');
assert.strictEqual(errorMessageEl.id, errorsId);
assert.strictEqual(errorMessageEl.textContent.trim(), 'An error occurred.');
assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), errorsId);
assert.strictEqual(
fieldEl.getAttribute('aria-describedby').trim(),
errorsId
);
});
test('it is not checked by default', async function (assert) {
@@ -20,7 +20,10 @@ module('Integration | Component | rose/form/input', function (hooks) {
const helperTextEl = find('.rose-form-helper-text');
assert.strictEqual(helperTextEl.textContent.trim(), 'Help me');
assert.strictEqual(helperTextEl.id, helperId);
assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId);
assert.strictEqual(
fieldEl.getAttribute('aria-describedby').trim(),
helperId
);
});
test('it displays optional errors', async function (assert) {
@@ -14,6 +14,9 @@ module('Integration | Component | rose/form/label', function (hooks) {
<//Rose::Form::Label>
`);
assert.ok(find('.rose-form-label'));
assert.strictEqual(find('.rose-form-label').textContent.trim(), 'Form Label');
assert.strictEqual(
find('.rose-form-label').textContent.trim(),
'Form Label'
);
});
});
@@ -47,7 +47,10 @@ module('Integration | Component | rose/form/select', function (hooks) {
const helperTextEl = find('.rose-form-helper-text');
assert.strictEqual(helperTextEl.textContent.trim(), 'Help me');
assert.strictEqual(helperTextEl.id, helperId);
assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId);
assert.strictEqual(
fieldEl.getAttribute('aria-describedby').trim(),
helperId
);
});
test('it displays optional errors', async function (assert) {
@@ -20,7 +20,10 @@ module('Integration | Component | rose/form/textarea', function (hooks) {
const helperTextEl = find('.rose-form-helper-text');
assert.strictEqual(helperTextEl.textContent.trim(), 'Help me');
assert.strictEqual(helperTextEl.id, helperId);
assert.strictEqual(fieldEl.getAttribute('aria-describedby').trim(), helperId);
assert.strictEqual(
fieldEl.getAttribute('aria-describedby').trim(),
helperId
);
});
test('it displays optional errors', async function (assert) {
@@ -16,7 +16,10 @@ module('Integration | Component | rose/message', function (hooks) {
`);
assert.ok(find('.rose-message'));
assert.strictEqual(find('.rose-message-title').textContent.trim(), 'Title');
assert.strictEqual(find('.rose-message-subtitle').textContent.trim(), 'Subtitle');
assert.strictEqual(
find('.rose-message-subtitle').textContent.trim(),
'Subtitle'
);
assert.strictEqual(
find('.rose-message-description').textContent.trim(),
'Description'
+1
View File
@@ -19,5 +19,6 @@ module.exports = {
],
},
quotes: 'single',
'eol-last': 'editorconfig',
},
};
@@ -12,4 +12,4 @@
{{t 'resources.account.actions.delete'}}
</dropdown.button>
</Rose::Dropdown>
{{/if}}
{{/if}}
@@ -9,4 +9,4 @@
@acknowledgeText={{t 'states.copied'}}
>
<code>{{@model.id}}</code>
</Copyable>
</Copyable>
@@ -13,4 +13,4 @@
</nav.link>
{{/if}}
{{/if}}
</Rose::Nav::Tabs>
</Rose::Nav::Tabs>
@@ -86,4 +86,4 @@
{{t 'resources.auth-method.actions.delete'}}
</dropdown.button>
{{/if}}
</Rose::Dropdown>
</Rose::Dropdown>
@@ -16,4 +16,4 @@
@acknowledgeText={{t 'states.copied'}}
>
<code>{{@model.id}}</code>
</Copyable>
</Copyable>
@@ -12,4 +12,4 @@
{{t 'resources.managed-group.actions.delete'}}
</dropdown.button>
</Rose::Dropdown>
{{/if}}
{{/if}}
@@ -9,4 +9,4 @@
@acknowledgeText={{t 'states.copied'}}
>
<code>{{@model.id}}</code>
</Copyable>
</Copyable>
@@ -9,4 +9,4 @@
>
{{t 'resources.managed-group.member.title_plural'}}
</nav.link>
</Rose::Nav::Tabs>
</Rose::Nav::Tabs>
Loaded 100 of 332 files, more files were not shown because too many files have changed in this diff. Show more