eslint for typescript and react!

This commit is contained in:
Michael Peters 2024-07-21 13:05:49 -07:00
parent 7e945d27ca
commit d013d7d5a1
2 changed files with 4 additions and 2 deletions

View File

@ -1,11 +1,13 @@
// @ts-check
// import eslint from '@eslint/js';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import unusedImports from 'eslint-plugin-unused-imports';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ["src/**/*.ts", "src/**/*.tsx"],
plugins: {

View File

@ -5,7 +5,7 @@ import App from './components/app';
import './index.scss';
const main = document.querySelector('main');
if (main == null) {
if (main === null) {
throw new Error('unable to find main!');
}
const root = createRoot(main);