Skip to content

Commit b2544fa

Browse files
committed
Add linting to project
1 parent bf5f0d6 commit b2544fa

File tree

5 files changed

+422
-39
lines changed

5 files changed

+422
-39
lines changed

frontend/build/build-common.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { config } from "dotenv";
2+
23
config();
34

45
const define = {

frontend/build/server.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import * as esbuild from "esbuild";
22
import { buildOptions } from "./build-common.mjs";
33
import http from "node:http";
44

5-
const watchDirectories = ["src/*.{ts,tsx}"];
6-
75
const runServer = async () => {
86
const ctx = await esbuild.context(buildOptions);
97

frontend/eslint.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import tseslint from "typescript-eslint";
44
import pluginReact from "eslint-plugin-react";
55

66
export default [
7-
87
{
9-
languageOptions: { globals: globals.browser }
8+
languageOptions: { globals: {...globals.browser, ...globals.node}, },
109
},
1110
pluginJs.configs.recommended,
1211
...tseslint.configs.recommended,
1312
pluginReact.configs.flat.recommended,
1413
{
15-
files: ["src/**/*.js"],
16-
ignores: ["**/*.tsx"],
14+
rules: {"unused-imports/no-unused-imports": "error"}
15+
},
16+
{
17+
ignores: ["public/bundle.js"],
1718
},
1819
];

0 commit comments

Comments
 (0)