Skip to content

Commit

Permalink
chore: clean up inline eslint rules (#318)
Browse files Browse the repository at this point in the history
* Types

* Packages

* Ch

* Ch

* Lint

* Ch

* FastBoot service

* eslint

* eslint

* Ch

* Ch
  • Loading branch information
charlesfries authored Jun 20, 2024
1 parent 32b420e commit 1b2f830
Show file tree
Hide file tree
Showing 16 changed files with 236 additions and 879 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

# ember-try
/.node_modules.ember-try/

/addon/firebase/
3 changes: 1 addition & 2 deletions addon/adapters/cloud-firestore-modular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export default class CloudFirestoreAdapter extends Adapter {
protected referenceKeyName = 'referenceTo';

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

return fastboot && fastboot.isFastBoot;
}
Expand Down
4 changes: 2 additions & 2 deletions addon/authenticators/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getOwner } from '@ember/application';

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

import {
getAuth,
Expand All @@ -16,8 +17,7 @@ interface AuthenticateCallback {
}

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

Expand Down
4 changes: 2 additions & 2 deletions addon/session-stores/firebase.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getOwner } from '@ember/application';

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

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

Expand Down
2 changes: 0 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

const Plugin = require('broccoli-plugin');
const fs = require('fs');
const path = require('path');
Expand Down
758 changes: 0 additions & 758 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
"@types/ember-data__model": "^4.0.5",
"@types/ember-data__serializer": "^4.0.6",
"@types/ember-data__store": "^4.0.7",
"@types/ember-qunit": "^4.0.1",
"@types/ember-resolver": "^5.0.10",
"@types/node": "^20.14.2",
"@types/qunit": "^2.19.10",
"@types/rsvp": "^4.0.9",
Expand Down
5 changes: 1 addition & 4 deletions scripts/build-wrappers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// eslint-disable

import * as fs from 'fs';

import { keys } from 'ts-transformer-keys';
Expand All @@ -11,8 +9,7 @@ function createFile(
): void {
fs.writeFile(
`./addon/firebase/${outputFileName}.ts`,
`/* eslint-disable max-len */
// DO NOT MODIFY. THIS IS AUTO GENERATED.
`// DO NOT MODIFY. THIS IS AUTO GENERATED.
import {
${outputExports.map((api) => `${api} as _${api}`).join(',\n ')},
} from '${moduleName}';
Expand Down
9 changes: 4 additions & 5 deletions tests/helpers/index.js → tests/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */

import {
setupApplicationTest as upstreamSetupApplicationTest,
setupRenderingTest as upstreamSetupRenderingTest,
setupTest as upstreamSetupTest,
type SetupTestOptions,
} from 'ember-qunit';

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

function setupApplicationTest(hooks, options) {
function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) {
upstreamSetupApplicationTest(hooks, options);

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

function setupRenderingTest(hooks, options) {
function setupRenderingTest(hooks: NestedHooks, options?: SetupTestOptions) {
upstreamSetupRenderingTest(hooks, options);

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

function setupTest(hooks, options) {
function setupTest(hooks: NestedHooks, options?: SetupTestOptions) {
upstreamSetupTest(hooks, options);

// Additional setup for unit tests can be done here.
Expand Down
Loading

0 comments on commit 1b2f830

Please sign in to comment.