Compare commits

..

2 Commits

Author SHA1 Message Date
James Brunton
bdda24d9be
Merge branch 'V2' into V2-eslint-no-undef 2025-09-04 15:15:05 +01:00
James Brunton
295e682e03
Add linting to frontend (#4341)
# Description of Changes
There's no current linter running over our TypeScript code, which means
we've got a bunch of dead code and other code smells around with nothing
notifying us. This PR adds ESLint with the typescript-eslint plugin and
enables the recommended settings as a starting point for us.

I've disabled all of the failing rules for the scope of this PR, just to
get linting running without causing a massive diff. I'll follow up with
future PRs that enable the failing rules one by one.

Also updates our version of TypeScript, which introduces a new type
error in the code (which I've had to fix)
2025-09-04 14:08:28 +01:00

View File

@ -9,13 +9,13 @@ export default defineConfig(
eslint.configs.recommended,
tseslint.configs.recommended,
{
"ignores": [
ignores: [
"dist", // Contains 3rd party code
"public", // Contains 3rd party code
],
},
{
"rules": {
rules: {
"no-empty": "off", // Temporarily disabled until codebase conformant
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
"no-useless-escape": "off", // Temporarily disabled until codebase conformant
@ -37,8 +37,8 @@ export default defineConfig(
languageOptions: {
globals: {
...globals.browser,
}
}
},
},
},
// Config for node scripts
{
@ -50,7 +50,7 @@ export default defineConfig(
languageOptions: {
globals: {
...globals.node,
}
}
},
},
},
);