Skip to content

Commit 6aebd5d

Browse files
committed
Setup formatting enforcement
1 parent 9c9c2a0 commit 6aebd5d

File tree

7 files changed

+22
-17
lines changed

7 files changed

+22
-17
lines changed

addon/addon/build-waiter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class NoopTestWaiter implements TestWaiter {
112112
return this;
113113
}
114114

115-
endAsync(): void { }
115+
endAsync(): void {}
116116

117117
waitUntil(): boolean {
118118
return true;
@@ -122,7 +122,7 @@ class NoopTestWaiter implements TestWaiter {
122122
return [];
123123
}
124124

125-
reset(): void { }
125+
reset(): void {}
126126
}
127127

128128
/**

addon/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"build": "ember build",
2121
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
2222
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
23+
"lint:prettier": "prettier --check .",
2324
"lint:js": "eslint --ext ts,js .",
2425
"lint:js:fix": "eslint --ext ts,js . --fix",
2526
"lint:ts": "tsc -p tsconfig.json --noEmit",

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"url": "git@github.com:emberjs/ember-test-waiters.git"
88
},
99
"scripts": {
10-
"lint": "pnpm --filter '*' lint:fix",
10+
"lint": "pnpm --filter '*' lint",
11+
"lint:fix": "pnpm --filter '*' lint:fix",
1112
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
1213
"start:addon": "pnpm --filter @ember/test-waiters start -- --no-watch.clearScreen",
1314
"start:test-app": "pnpm --filter test-app start",

test-apps/base-tests/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"lint:css": "stylelint \"**/*.css\"",
1717
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
1818
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
19+
"lint:prettier": "prettier --check .",
1920
"lint:hbs": "ember-template-lint .",
2021
"lint:hbs:fix": "ember-template-lint . --fix",
2122
"lint:js": "eslint . --cache",

test-apps/ember-concurrency-v2/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"lint:css": "stylelint \"**/*.css\"",
1717
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
1818
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
19+
"lint:prettier": "prettier --check .",
1920
"lint:hbs": "ember-template-lint .",
2021
"lint:hbs:fix": "ember-template-lint . --fix",
2122
"lint:js": "eslint . --cache",

test-apps/ember-concurrency-v2/tests/unit/wait-for-test.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ interface ModeDef {
3434
}
3535

3636
if (DEBUG) {
37-
module('wait-for', function(hooks) {
38-
hooks.afterEach(function() {
37+
module('wait-for', function (hooks) {
38+
hooks.afterEach(function () {
3939
_reset();
4040
resetError();
4141
});
4242
const generatorTestModules = [
43-
(function() {
43+
(function () {
4444
const EmberObjectThing = EmberObject.extend({
4545
doStuffTask: taskFn(
4646
waitFor(function* doTaskStuff(...args: any) {
@@ -108,7 +108,7 @@ if (DEBUG) {
108108

109109
testModules.forEach(
110110
({ name, waiterName, EmberObjectThing, NativeThing }) => {
111-
module(name, function() {
111+
module(name, function () {
112112
const invocationType = [
113113
{
114114
name: 'class function',
@@ -134,8 +134,8 @@ if (DEBUG) {
134134

135135
invocationType.forEach(
136136
({ name, createPromise, createThrowingPromise }: ModeDef) => {
137-
module(name, function() {
138-
test('waitFor wraps and registers a waiter', async function(assert) {
137+
module(name, function () {
138+
test('waitFor wraps and registers a waiter', async function (assert) {
139139
overrideError(MockStableError);
140140

141141
const promise = createPromise();
@@ -162,14 +162,14 @@ if (DEBUG) {
162162
});
163163
});
164164

165-
test('waitFor handles arguments and return value', async function(assert) {
165+
test('waitFor handles arguments and return value', async function (assert) {
166166
overrideError(MockStableError);
167167

168168
const ret = await createPromise(1, 'foo');
169169
assert.deepEqual(ret, ['foo', 1]);
170170
});
171171

172-
test('waitFor transitions waiter to not pending even if promise throws when thenable wrapped', async function(assert) {
172+
test('waitFor transitions waiter to not pending even if promise throws when thenable wrapped', async function (assert) {
173173
const promise = createThrowingPromise();
174174

175175
try {
@@ -188,7 +188,7 @@ if (DEBUG) {
188188
},
189189
);
190190

191-
module('waitFor ember-concurrency interop', function() {
191+
module('waitFor ember-concurrency interop', function () {
192192
class Deferred {
193193
promise: Promise<any>;
194194
resolve: Function = () => null;
@@ -266,7 +266,7 @@ if (DEBUG) {
266266
}
267267
}
268268

269-
test('tasks with multiple yields work', async function(assert) {
269+
test('tasks with multiple yields work', async function (assert) {
270270
const thing = new NativeThing();
271271
const task = perform(thing.doStuffTask);
272272

@@ -299,7 +299,7 @@ if (DEBUG) {
299299
];
300300

301301
cancellationCases.forEach(({ desc, taskName }) => {
302-
test(`${desc} task cancellation works`, async function(assert) {
302+
test(`${desc} task cancellation works`, async function (assert) {
303303
const thing = new NativeThing();
304304

305305
const instance = perform(get(thing, taskName));
@@ -321,7 +321,7 @@ if (DEBUG) {
321321
});
322322
});
323323

324-
module('waitFor co interop', function() {
324+
module('waitFor co interop', function () {
325325
function coDec(
326326
_target: object,
327327
_key: string,
@@ -395,7 +395,7 @@ if (DEBUG) {
395395
}
396396
}
397397

398-
test('it works', async function(assert) {
398+
test('it works', async function (assert) {
399399
const thing = new NativeThing();
400400

401401
thing.doStuffCo();
@@ -416,7 +416,7 @@ if (DEBUG) {
416416
});
417417
});
418418

419-
test('types', async function(assert) {
419+
test('types', async function (assert) {
420420
assert.expect(0);
421421

422422
async function asyncFn(a: string, b: string) {

test-apps/ember-fetch-v8/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"lint:css": "stylelint \"**/*.css\"",
1717
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
1818
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
19+
"lint:prettier": "prettier --check .",
1920
"lint:hbs": "ember-template-lint .",
2021
"lint:hbs:fix": "ember-template-lint . --fix",
2122
"lint:js": "eslint . --cache",

0 commit comments

Comments
 (0)