Skip to content

Commit 1b2f830

Browse files
authored
chore: clean up inline eslint rules (#318)
* Types * Packages * Ch * Ch * Lint * Ch * FastBoot service * eslint * eslint * Ch * Ch
1 parent 32b420e commit 1b2f830

File tree

16 files changed

+236
-879
lines changed

16 files changed

+236
-879
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111

1212
# ember-try
1313
/.node_modules.ember-try/
14+
15+
/addon/firebase/

addon/adapters/cloud-firestore-modular.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ export default class CloudFirestoreAdapter extends Adapter {
7272
protected referenceKeyName = 'referenceTo';
7373

7474
protected get isFastBoot(): boolean {
75-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
76-
const fastboot = getOwner(this).lookup('service:fastboot') as any;
75+
const fastboot = getOwner(this).lookup('service:fastboot');
7776

7877
return fastboot && fastboot.isFastBoot;
7978
}

addon/authenticators/firebase.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { getOwner } from '@ember/application';
22

33
import { Auth, User, UserCredential } from 'firebase/auth';
44
import BaseAuthenticator from 'ember-simple-auth/authenticators/base';
5+
import type FastBoot from 'ember-cli-fastboot/services/fastboot';
56

67
import {
78
getAuth,
@@ -16,8 +17,7 @@ interface AuthenticateCallback {
1617
}
1718

1819
export default class FirebaseAuthenticator extends BaseAuthenticator {
19-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
20-
private get fastboot(): any {
20+
private get fastboot(): FastBoot | undefined {
2121
return getOwner(this)?.lookup('service:fastboot');
2222
}
2323

addon/session-stores/firebase.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { getOwner } from '@ember/application';
22

33
import LocalStorageStore from 'ember-simple-auth/session-stores/local-storage';
4+
import type FastBoot from 'ember-cli-fastboot/services/fastboot';
45

56
export default class FirebaseStore extends LocalStorageStore {
6-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7-
private get fastboot(): any {
7+
private get fastboot(): FastBoot | undefined {
88
return getOwner(this)?.lookup('service:fastboot');
99
}
1010

lib/config.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable */
2-
31
const Plugin = require('broccoli-plugin');
42
const fs = require('fs');
53
const path = require('path');

package-lock.json

-758
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070
"@types/ember-data__model": "^4.0.5",
7171
"@types/ember-data__serializer": "^4.0.6",
7272
"@types/ember-data__store": "^4.0.7",
73-
"@types/ember-qunit": "^4.0.1",
74-
"@types/ember-resolver": "^5.0.10",
7573
"@types/node": "^20.14.2",
7674
"@types/qunit": "^2.19.10",
7775
"@types/rsvp": "^4.0.9",

scripts/build-wrappers.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// eslint-disable
2-
31
import * as fs from 'fs';
42

53
import { keys } from 'ts-transformer-keys';
@@ -11,8 +9,7 @@ function createFile(
119
): void {
1210
fs.writeFile(
1311
`./addon/firebase/${outputFileName}.ts`,
14-
`/* eslint-disable max-len */
15-
// DO NOT MODIFY. THIS IS AUTO GENERATED.
12+
`// DO NOT MODIFY. THIS IS AUTO GENERATED.
1613
import {
1714
${outputExports.map((api) => `${api} as _${api}`).join(',\n ')},
1815
} from '${moduleName}';

tests/helpers/index.js tests/helpers/index.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2-
31
import {
42
setupApplicationTest as upstreamSetupApplicationTest,
53
setupRenderingTest as upstreamSetupRenderingTest,
64
setupTest as upstreamSetupTest,
5+
type SetupTestOptions,
76
} from 'ember-qunit';
87

98
// This file exists to provide wrappers around ember-qunit's
109
// test setup functions. This way, you can easily extend the setup that is
1110
// needed per test type.
1211

13-
function setupApplicationTest(hooks, options) {
12+
function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) {
1413
upstreamSetupApplicationTest(hooks, options);
1514

1615
// Additional setup for application tests can be done here.
@@ -29,13 +28,13 @@ function setupApplicationTest(hooks, options) {
2928
// setupMirage(hooks); // ember-cli-mirage
3029
}
3130

32-
function setupRenderingTest(hooks, options) {
31+
function setupRenderingTest(hooks: NestedHooks, options?: SetupTestOptions) {
3332
upstreamSetupRenderingTest(hooks, options);
3433

3534
// Additional setup for rendering tests can be done here.
3635
}
3736

38-
function setupTest(hooks, options) {
37+
function setupTest(hooks: NestedHooks, options?: SetupTestOptions) {
3938
upstreamSetupTest(hooks, options);
4039

4140
// Additional setup for unit tests can be done here.

0 commit comments

Comments
 (0)