Skip to content

Commit f725787

Browse files
committed
dashboard: re-add eslint
1 parent 049954a commit f725787

File tree

5 files changed

+13586
-8974
lines changed

5 files changed

+13586
-8974
lines changed

dashboard/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "react-app"
3+
}

dashboard/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
},
3030
"scripts": {
3131
"start": "vite",
32-
"build": "tsc && vite build",
32+
"lint": "eslint --max-warnings=0 src",
33+
"build": "npm run lint && tsc && vite build",
3334
"analyze": "vite-bundle-visualizer"
3435
},
3536
"eslintConfig": {
@@ -57,6 +58,8 @@
5758
"@types/react-router-dom": "^5.3.3",
5859
"@types/react-timeago": "^4.1.3",
5960
"@vitejs/plugin-react": "^4.2.1",
61+
"eslint": "^8.57.0",
62+
"eslint-config-react-app": "^7.0.1",
6063
"prettier": "^2.3.2",
6164
"typescript": "^5.4.5",
6265
"vite": "^5.2.11",

dashboard/src/index.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Buffer } from 'buffer';
2-
globalThis.Buffer = Buffer;
1+
import './utils/globalBuffer';
32
import React from 'react';
43
import ReactDOM from 'react-dom/client';
54
import App from './App';

dashboard/src/utils/globalBuffer.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { Buffer } from 'buffer';
2+
globalThis.Buffer = Buffer;

0 commit comments

Comments
 (0)