Skip to content

chore(lint): Fix lint errors + Run lint pre-commit and In Travis #2431

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 37 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
25acb6f
chore(tests): Fix broken tests
NothingEverHappens Apr 28, 2020
7df1608
chore(lint): Fix some lint errors
NothingEverHappens Apr 28, 2020
752d176
Merge branch 'fix-tests' into fix-lint
NothingEverHappens Apr 28, 2020
18d0c03
Merge branch 'master' into fix-lint
NothingEverHappens Apr 28, 2020
949c496
chore(): Optimize imports - remove unused, organize alphabetically
NothingEverHappens Apr 28, 2020
7c2dca5
chore(): Drop emptye @param annotations
NothingEverHappens Apr 28, 2020
1274627
chore(): Reorder test data to be before everything else
NothingEverHappens Apr 28, 2020
930af1e
chore(lint): Clean up storage.spec
NothingEverHappens Apr 28, 2020
6291533
chore(lint): Clean up deploy tests
NothingEverHappens Apr 28, 2020
e68a7d9
chore(lint): Clean up functions tests
NothingEverHappens Apr 28, 2020
f35dcbc
chore(lint): Clean up messaging tests
NothingEverHappens Apr 28, 2020
d76c4a7
chore(lint): Clean up firestore tests
NothingEverHappens Apr 28, 2020
23e2f1e
chore(lint): Clean up analytics
NothingEverHappens Apr 28, 2020
8ec82a3
chore(lint): Clean up auth
NothingEverHappens Apr 28, 2020
4d8707d
chore(lint): Clean analytics + auth guard
NothingEverHappens Apr 28, 2020
5462c36
chore(lint): Clean angularfire2.ts
NothingEverHappens Apr 28, 2020
22c62f6
chore(lint): Clean database + utils
NothingEverHappens Apr 28, 2020
439b93b
chore(lint): Clean database list files
NothingEverHappens Apr 28, 2020
1318921
chore(lint): Clean the rest of database files
NothingEverHappens Apr 28, 2020
ae0ef48
chore(lint): Clean perf files
NothingEverHappens Apr 28, 2020
6a5d400
chore(lint): Clean up remote config
NothingEverHappens Apr 28, 2020
a9eec3d
chore(lint): Clean up schematics
NothingEverHappens Apr 28, 2020
7cf0804
chore(lint): Clean up deploy stuff
NothingEverHappens Apr 28, 2020
6246b16
chore(lint): Use EMPTY for rxjs
NothingEverHappens Apr 28, 2020
7921520
chore(lint): Misc fixes
NothingEverHappens Apr 28, 2020
4890bcb
chore(lint): Fix line breaks
NothingEverHappens Apr 29, 2020
da06ce4
chore(lint): Fix remaining lint errors
NothingEverHappens Apr 29, 2020
9428fd9
chore(lint): Add husky pre-submit hook to run lint
NothingEverHappens Apr 29, 2020
11f3221
chore(lint): Run lint in travis
NothingEverHappens Apr 29, 2020
5485bb5
chore(lint): Undo accidental type change
NothingEverHappens Apr 29, 2020
25d3049
chore(lint): Import jasmine
NothingEverHappens Apr 29, 2020
41b74a1
chore(lint): Fix the build
NothingEverHappens Apr 29, 2020
ef2fafc
chore(lint): Optimize imports
NothingEverHappens Apr 29, 2020
16f23d6
Merge branch 'master' into fix-lint
NothingEverHappens May 21, 2020
9c8d361
Merge branch 'master' into fix-lint
jamesdaniels Jun 2, 2020
1025f30
Merge branch 'master' into fix-lint
NothingEverHappens Jun 2, 2020
1a57717
Merge branch 'master' into fix-lint
NothingEverHappens Jun 2, 2020
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ branches:

install: yarn

script: yarn build && yarn test:all
script: yarn build && yarn test:all && yarn lint
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"build": "tsc tools/build.ts; node ./tools/build.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"schematics": "./dist/packages-dist/collection.json",
"builders": "./dist/packages-dist/builders.json",
"keywords": [
Expand Down Expand Up @@ -49,6 +54,7 @@
"firebase-tools": "^8.0.0",
"fs-extra": "^8.0.1",
"fuzzy": "^0.1.3",
"husky": "^4.2.5",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"rxfire": "^3.9.7",
Expand Down
6 changes: 4 additions & 2 deletions sample/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// Polyfill XMLHttpRequest and WS for Firebase
global['XMLHttpRequest'] = require("xhr2");
global['WebSocket'] = require("ws");
/* tslint:disable:no-string-literal */
global['XMLHttpRequest'] = require('xhr2');
global['WebSocket'] = require('ws');
/* tslint:enable:no-string-literal */

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RouterModule, Routes } from '@angular/router';


const routes: Routes = [];
Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async } from '@angular/core/testing';
import { async, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ApplicationRef } from '@angular/core';
import { ApplicationRef, Component } from '@angular/core';
import { FirebaseApp } from '@angular/fire';

@Component({
Expand Down
30 changes: 21 additions & 9 deletions sample/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
import { NgModule, isDevMode } from '@angular/core';
import { isDevMode, NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand All @@ -9,7 +9,12 @@ import { environment } from '../environments/environment';
import { AngularFireModule } from '@angular/fire';
import { AngularFireStorageModule } from '@angular/fire/storage';

import { AngularFireAnalyticsModule, UserTrackingService, ScreenTrackingService, DEBUG_MODE as ANALYTICS_DEBUG_MODE } from '@angular/fire/analytics';
import {
AngularFireAnalyticsModule,
DEBUG_MODE as ANALYTICS_DEBUG_MODE,
ScreenTrackingService,
UserTrackingService
} from '@angular/fire/analytics';

import { FirestoreComponent } from './firestore/firestore.component';

Expand All @@ -28,7 +33,7 @@ import { RemoteConfigComponent } from './remote-config/remote-config.component';
const shouldUseEmulator = () => false;

@NgModule({
declarations: [ AppComponent, StorageComponent, FirestoreComponent, DatabaseComponent, RemoteConfigComponent ],
declarations: [AppComponent, StorageComponent, FirestoreComponent, DatabaseComponent, RemoteConfigComponent],
imports: [
BrowserModule.withServerTransition({ appId: 'serverApp' }),
BrowserTransferStateModule,
Expand All @@ -50,12 +55,19 @@ const shouldUseEmulator = () => false;
UserTrackingService,
ScreenTrackingService,
PerformanceMonitoringService,
{ provide: ANALYTICS_DEBUG_MODE, useFactory: () => isDevMode() },
{ provide: DATABASE_URL, useFactory: () => shouldUseEmulator() ? `http://localhost:9000?ns=${environment.firebase.projectId}` : undefined },
{ provide: FIRESTORE_SETTINGS, useFactory: () => shouldUseEmulator() ? { host: 'localhost:8080', ssl: false } : {} },
{ provide: FUNCTIONS_ORIGIN, useFactory: () => shouldUseEmulator() ? 'http://localhost:9999' : undefined },
{
provide: ANALYTICS_DEBUG_MODE,
useFactory: () => isDevMode()
},
{
provide: DATABASE_URL,
useFactory: () => shouldUseEmulator() ? `http://localhost:9000?ns=${environment.firebase.projectId}` : undefined
},
{ provide: FIRESTORE_SETTINGS, useFactory: () => shouldUseEmulator() ? { host: 'localhost:8080', ssl: false } : {} },
{ provide: FUNCTIONS_ORIGIN, useFactory: () => shouldUseEmulator() ? 'http://localhost:9999' : undefined },
{ provide: REMOTE_CONFIG_SETTINGS, useFactory: () => isDevMode() ? { minimumFetchIntervalMillis: 10_000 } : {} }
],
bootstrap: [ AppComponent ]
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {
}
2 changes: 1 addition & 1 deletion sample/src/app/database/database.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { startWith, tap } from 'rxjs/operators';
import { trace } from '@angular/fire/performance';

Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/firestore/firestore.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
import { tap, startWith } from 'rxjs/operators';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import { startWith, tap } from 'rxjs/operators';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { trace } from '@angular/fire/performance';

@Component({
Expand Down
5 changes: 3 additions & 2 deletions sample/src/app/storage/storage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import { startWith, tap } from 'rxjs/operators';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { trace } from '@angular/fire/performance';

const TRANSPARENT_PNG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='
const TRANSPARENT_PNG
= 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';

@Component({
selector: 'app-storage',
template: `
<p>
Storage!
<img [src]="downloadUrl$ | async" width="64" height="64" />
<img [src]="downloadUrl$ | async" width="64" height="64"/>
</p>
`,
styles: []
Expand Down
16 changes: 8 additions & 8 deletions sample/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export const environment = {
production: true,
firebase: {
apiKey: "AIzaSyA7CNE9aHbcSEbt9y03QReJ-Xr0nwKg7Yg",
authDomain: "aftest-94085.firebaseapp.com",
databaseURL: "https://aftest-94085.firebaseio.com",
projectId: "aftest-94085",
storageBucket: "aftest-94085.appspot.com",
messagingSenderId: "480362569154",
appId: "1:480362569154:web:2fe6f75104cdfb82f50a5b",
measurementId: "G-CBRYER9PJR"
apiKey: 'AIzaSyA7CNE9aHbcSEbt9y03QReJ-Xr0nwKg7Yg',
authDomain: 'aftest-94085.firebaseapp.com',
databaseURL: 'https://aftest-94085.firebaseio.com',
projectId: 'aftest-94085',
storageBucket: 'aftest-94085.appspot.com',
messagingSenderId: '480362569154',
appId: '1:480362569154:web:2fe6f75104cdfb82f50a5b',
measurementId: 'G-CBRYER9PJR'
}
};
18 changes: 9 additions & 9 deletions sample/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
export const environment = {
production: false,
firebase: {
apiKey: "AIzaSyA7CNE9aHbcSEbt9y03QReJ-Xr0nwKg7Yg",
authDomain: "aftest-94085.firebaseapp.com",
databaseURL: "https://aftest-94085.firebaseio.com",
projectId: "aftest-94085",
storageBucket: "aftest-94085.appspot.com",
messagingSenderId: "480362569154",
appId: "1:480362569154:web:2fe6f75104cdfb82f50a5b",
measurementId: "G-CBRYER9PJR"
apiKey: 'AIzaSyA7CNE9aHbcSEbt9y03QReJ-Xr0nwKg7Yg',
authDomain: 'aftest-94085.firebaseapp.com',
databaseURL: 'https://aftest-94085.firebaseio.com',
projectId: 'aftest-94085',
storageBucket: 'aftest-94085.appspot.com',
messagingSenderId: '480362569154',
appId: '1:480362569154:web:2fe6f75104cdfb82f50a5b',
measurementId: 'G-CBRYER9PJR'
}
};

Expand All @@ -23,4 +23,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion sample/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js/dist/zone'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
5 changes: 1 addition & 4 deletions sample/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
Expand Down
3 changes: 2 additions & 1 deletion src/analytics/analytics.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule, Optional } from '@angular/core';
import { UserTrackingService, ScreenTrackingService } from './analytics.service';
import { ScreenTrackingService, UserTrackingService } from './analytics.service';
import { AngularFireAnalytics } from './analytics';

@NgModule({
Expand All @@ -12,6 +12,7 @@ export class AngularFireAnalyticsModule {
@Optional() userTracking: UserTrackingService
) {
// calling anything on analytics will eagerly load the SDK
// tslint:disable-next-line:no-unused-expression
analytics.app;
}
}
Loading