Update Angular and React-Redux templates for default eslint config changes

This commit is contained in:
Rachel Shaffer 2019-11-04 14:21:20 -08:00
parent bd917f690d
commit 44df10b6a6
7 changed files with 20 additions and 14 deletions

View File

@ -1,7 +1,11 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
////#if (IndividualLocalAuth)
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
////#else
import { HttpClientModule } from '@angular/common/http';
////#endif
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';

View File

@ -3,7 +3,6 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CounterComponent } from './counter.component';
describe('CounterComponent', () => {
let component: CounterComponent;
let fixture: ComponentFixture<CounterComponent>;
beforeEach(async(() => {
@ -15,7 +14,6 @@ describe('CounterComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(CounterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

View File

@ -7,7 +7,7 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
declare const require;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(

View File

@ -81,4 +81,4 @@ class FetchData extends React.PureComponent<WeatherForecastProps> {
export default connect(
(state: ApplicationState) => state.weatherForecasts, // Selects which state properties are merged into the component's props
WeatherForecastsStore.actionCreators // Selects which action creators are merged into the component's props
)(FetchData as any);
)(FetchData as any); // eslint-disable-line @typescript-eslint/no-explicit-any

View File

@ -10,7 +10,7 @@ const Home = () => (
<li><a href='https://facebook.github.io/react/'>React</a> and <a href='https://redux.js.org/'>Redux</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<p>To help you get started, we have also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Development server integration</strong>. In development mode, the development server from <code>create-react-app</code> runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>

View File

@ -2,11 +2,15 @@ import * as React from 'react';
import { Container } from 'reactstrap';
import NavMenu from './NavMenu';
export default (props: { children?: React.ReactNode }) => (
<React.Fragment>
<NavMenu/>
<Container>
{props.children}
</Container>
</React.Fragment>
);
export default class Layout extends React.PureComponent<{}, { children?: React.ReactNode }> {
public render() {
return (
<React.Fragment>
<NavMenu />
<Container>
{this.props.children}
</Container>
</React.Fragment>
);
}
}

View File

@ -16,7 +16,7 @@ export default function configureStore(history: History, initialState?: Applicat
});
const enhancers = [];
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
const windowIfDefined = typeof window === 'undefined' ? null : window as any; // eslint-disable-line @typescript-eslint/no-explicit-any
if (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__) {
enhancers.push(windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__());
}