eslint auto fixes

This commit is contained in:
SpikeHD
2022-05-08 16:49:26 -07:00
parent 725bc1a994
commit e700cb17ce
6 changed files with 32 additions and 33 deletions

View File

@@ -1,19 +1,20 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import reportWebVitals from "./utils/reportWebVitals";
import App from "./ui/App";
import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
import reportWebVitals from './utils/reportWebVitals'
import App from './ui/App'
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
)
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
)
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
reportWebVitals()

View File

@@ -1,9 +1,7 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
import React from 'react'
import { render, screen } from '@testing-library/react'
import App from './App'
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
})

View File

@@ -1,6 +1,6 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import React from 'react'
import logo from './logo.svg'
import './App.css'
// Major Components
import Topbar from './components/TopBar'
@@ -9,9 +9,9 @@ function App() {
return (
<div className="App">
<Topbar />
<button onClick={() => console.log("cum")}>Cool button</button>
<button onClick={() => console.log('cum')}>Cool button</button>
</div>
);
)
}
export default App;
export default App

View File

@@ -1,5 +1,5 @@
import React from 'react';
import './TopBar.css';
import React from 'react'
import './TopBar.css'
export default class TopBar extends React.Component {
constructor(props: unknown[]) {

View File

@@ -1,15 +1,15 @@
import { ReportHandler } from 'web-vitals';
import { ReportHandler } from 'web-vitals'
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
})
}
};
}
export default reportWebVitals;
export default reportWebVitals

View File

@@ -2,4 +2,4 @@
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
import '@testing-library/jest-dom'