Skip to content

Fix: Lint across the app #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/controllers/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ export default class IssuesController extends Controller {
return githubIssues.sort((issue1, issue2) => {
const date1 = dayjs(issue1.updatedAt);
const date2 = dayjs(issue2.updatedAt);

return date2.diff(date1);
});
}

@action updateKeyword(event) {
event.preventDefault();

this.keyword = event.target.value;
}

@action filterIssues(event) {
event.preventDefault();

Expand Down
3 changes: 1 addition & 2 deletions app/serializers/github-issue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
import RESTSerializer from '@ember-data/serializer/rest';
import { underscore } from '@ember/string';

Expand All @@ -17,7 +16,7 @@ export default class GithubIssueSerializer extends RESTSerializer {
primaryModelClass,
newPayload,
id,
requestType
requestType,
);
}
}
3 changes: 1 addition & 2 deletions app/serializers/github-repository.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
import RESTSerializer from '@ember-data/serializer/rest';
import { underscore } from '@ember/string';

Expand All @@ -17,7 +16,7 @@ export default class GithubRepositorySerializer extends RESTSerializer {
primaryModelClass,
newPayload,
id,
requestType
requestType,
);
}
}
3 changes: 1 addition & 2 deletions app/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* stylelint-disable shorthand-property-no-redundant-values */
.container {
background-color: var(--color-gray-900);
height: 100%;
Expand All @@ -17,7 +16,7 @@
}

.body-container {
padding: 30px 0 30px;
padding: 30px 0;
}

.link-card:focus-within,
Expand Down
38 changes: 7 additions & 31 deletions app/styles/loading.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* stylelint-disable prettier/prettier, at-rule-no-vendor-prefix, declaration-empty-line-before, function-name-case, keyframes-name-pattern, property-no-vendor-prefix, value-keyword-case */
.sk-cube-grid {
height: 40px;
margin: 100px auto;
Expand All @@ -10,76 +9,53 @@
float: left;
height: 33%;
width: 33%;

-webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
animation: sk-cube-grid-scale-delay 1.3s infinite ease-in-out;
}

.sk-cube-grid .sk-cube1 {
-webkit-animation-delay: 0.2s;
animation-delay: 0.2s;
}

.sk-cube-grid .sk-cube2 {
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}

.sk-cube-grid .sk-cube3 {
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}

.sk-cube-grid .sk-cube4 {
-webkit-animation-delay: 0.1s;
animation-delay: 0.1s;
}

.sk-cube-grid .sk-cube5 {
-webkit-animation-delay: 0.2s;
animation-delay: 0.2s;
}

.sk-cube-grid .sk-cube6 {
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}

.sk-cube-grid .sk-cube7 {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}

.sk-cube-grid .sk-cube8 {
-webkit-animation-delay: 0.1s;
animation-delay: 0.1s;
}

.sk-cube-grid .sk-cube9 {
-webkit-animation-delay: 0.2s;
animation-delay: 0.2s;
}

@-webkit-keyframes sk-cubeGridScaleDelay {
0%, 70%, 100% {
-webkit-transform: scale3D(1, 1, 1);
transform: scale3D(1, 1, 1);
}

35% {
-webkit-transform: scale3D(0, 0, 1);
transform: scale3D(0, 0, 1);
}
}

@keyframes sk-cubeGridScaleDelay {
0%, 70%, 100% {
-webkit-transform: scale3D(1, 1, 1);
transform: scale3D(1, 1, 1);
@keyframes sk-cube-grid-scale-delay {
0%,
70%,
100% {
transform: scale3d(1, 1, 1);
}

35% {
-webkit-transform: scale3D(0, 0, 1);
transform: scale3D(0, 0, 1);
transform: scale3d(0, 0, 1);
}
}
8 changes: 1 addition & 7 deletions app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{{! template-lint-disable no-redundant-role }}
<div class="bg-shape-boxes pt-5" local-class="container">
<div class="mb-4 pt-4" local-class="header-container">
<img
alt=""
role="presentation"
src="../images/ember-help-wanted-logo.svg"
>

<img alt="" src="../images/ember-help-wanted-logo.svg">
<h1 class="text-hero-xl" local-class="header">
Ember Help Wanted
</h1>
Expand Down
7 changes: 4 additions & 3 deletions app/templates/issues.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{! template-lint-disable no-builtin-form-components }}
{{page-title "Issues"}}
<section class="container" local-class="header-container">
<FilterMenu />
Expand All @@ -11,11 +10,13 @@
Keyword
</label>

<Input
<input
id="search-input-issues"
data-test-field="Keyword"
local-class="search-input"
@value={{this.keyword}}
type="text"
value={{this.keyword}}
{{on "input" this.updateKeyword}}
/>

<EsButton
Expand Down
3 changes: 1 addition & 2 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
'use strict';

// To use it create some files under `mocks/`
Expand All @@ -14,7 +13,7 @@ module.exports = function (app) {
const globSync = require('glob').sync;
const mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
const proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(
require
require,
);

// Log proxy requests
Expand Down
5 changes: 2 additions & 3 deletions tests/acceptance/index-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier, qunit/require-expect */
import { click, currentURL, visit } from '@ember/test-helpers';
import percySnapshot from '@percy/ember';
import FakeTimers from '@sinonjs/fake-timers';
Expand Down Expand Up @@ -54,7 +53,7 @@ module('Acceptance | index', function (hooks) {
.hasAttribute(
'href',
'https://github.com/ember-learn/guides-source/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22+sort%3Acreate-date',
'The redirect URL is correct.'
'The redirect URL is correct.',
);
});

Expand All @@ -65,7 +64,7 @@ module('Acceptance | index', function (hooks) {
assert.strictEqual(
currentURL(),
'/adopted-ember-addons',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand Down
13 changes: 6 additions & 7 deletions tests/acceptance/issues-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier, qunit/require-expect */
import { click, currentURL, fillIn, visit } from '@ember/test-helpers';
import percySnapshot from '@percy/ember';
import FakeTimers from '@sinonjs/fake-timers';
Expand Down Expand Up @@ -51,7 +50,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?label=good%20first%20issue',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand All @@ -69,7 +68,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?query=guides',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand All @@ -87,7 +86,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?label=good%20first%20issue&query=guides',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand Down Expand Up @@ -121,7 +120,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?label=good%20first%20issue',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand Down Expand Up @@ -159,7 +158,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?query=guides',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand Down Expand Up @@ -200,7 +199,7 @@ module('Acceptance | issues', function (hooks) {
assert.strictEqual(
currentURL(),
'/ember-learn?label=good%20first%20issue&query=guides',
'The URL is correct.'
'The URL is correct.',
);

assert
Expand Down
3 changes: 1 addition & 2 deletions tests/acceptance/pr-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier, qunit/require-expect */
import { currentURL, visit, findAll } from '@ember/test-helpers';
import percySnapshot from '@percy/ember';
import FakeTimers from '@sinonjs/fake-timers';
Expand Down Expand Up @@ -48,7 +47,7 @@ module('Acceptance | pull-requests', function (hooks) {
assert
.dom(last)
.hasText(
'Update editor plugin information for VSCode, neovim, and Atom guides-source 4 months ago 19 hours ago'
'Update editor plugin information for VSCode, neovim, and Atom guides-source 4 months ago 19 hours ago',
);
});

Expand Down
1 change: 0 additions & 1 deletion tests/integration/helpers/remove-emoji-shortcode-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* template-lint-disable no-implicit-this */
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { module, test } from 'qunit';
Expand Down
9 changes: 4 additions & 5 deletions tests/unit/controllers/issues-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
import { setupTest } from 'ember-qunit';
import { module, test } from 'qunit';

Expand All @@ -14,15 +13,15 @@ module('Unit | Controller | issues', function (hooks) {
assert.strictEqual(
this.controller.clearMessage,
'Clear search filter ',
'We get the correct value. (1)'
'We get the correct value. (1)',
);

this.controller.label = 'help wanted';

assert.strictEqual(
this.controller.clearMessage,
'Clear search filter help wanted',
'We get the correct value. (2)'
'We get the correct value. (2)',
);
});
});
Expand All @@ -32,7 +31,7 @@ module('Unit | Controller | issues', function (hooks) {
assert.deepEqual(
this.controller.githubIssuesSorted.map(({ id }) => id),
[],
'We get the correct value. (1)'
'We get the correct value. (1)',
);

this.controller.model = [
Expand All @@ -53,7 +52,7 @@ module('Unit | Controller | issues', function (hooks) {
assert.deepEqual(
this.controller.githubIssuesSorted.map(({ id }) => id),
['3', '1', '2'],
'We get the correct value. (2)'
'We get the correct value. (2)',
);
});
});
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/models/github-issue-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
import { setupTest } from 'ember-qunit';
import { module, test } from 'qunit';

Expand All @@ -16,7 +15,7 @@ module('Unit | Model | github issue', function (hooks) {
assert.strictEqual(
model.repositoryHtml,
'https://github.com/ember-learn/ember-help-wanted',
'We get the correct value.'
'We get the correct value.',
);
});

Expand All @@ -31,7 +30,7 @@ module('Unit | Model | github issue', function (hooks) {
assert.strictEqual(
model.repositoryName,
'ember-learn/ember-help-wanted',
'We get the correct value.'
'We get the correct value.',
);
});
});