eslint for typescript and react!
This commit is contained in:
parent
7e945d27ca
commit
d013d7d5a1
@ -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: {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user