Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

71 changes: 71 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import next from 'eslint-config-next/core-web-vitals';
import prettierRecommended from 'eslint-plugin-prettier/recommended';

export default tseslint.config(
{
ignores: [
'dist/',
'build/',
'out/',
'node_modules/',
'.next/',
'coverage/',
'**/*.config.js',
'**/*.config.mjs',
'next-env.d.ts',
],
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked.map((c) => ({ ...c, files: ['**/*.{ts,tsx}'] })),
// next[1] (next/typescript) is skipped — it re-declares @typescript-eslint,
// conflicting with tseslint.configs.recommended above, which we use instead
// for TypeScript 6 compatibility and the full recommended ruleset.
(({ languageOptions: _lang, ...rest }) => rest)(next[0]),
next[3], // core-web-vitals: promotes no-html-link-for-pages + no-sync-scripts to errors
{
files: ['**/*.{ts,tsx,js,jsx}'],
languageOptions: {
parserOptions: { projectService: true },
},
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
varsIgnorePattern: '^_',
caughtErrors: 'none',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
// TODO: hooks called inside render callbacks, incorrect hook usage patterns,
// and missing/extra effect dependencies — to be fixed in a separate ticket.
'react-hooks/rules-of-hooks': 'off',
'react-hooks/refs': 'off',
'react-hooks/set-state-in-render': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/immutability': 'off',
'react-hooks/exhaustive-deps': 'off',
// TypeScript handles these; disable the core JS versions.
'no-undef': 'off',
'no-unused-vars': 'off',
// Type-checked rules from recommendedTypeChecked that are too noisy
// for the current codebase — kept off to preserve parity with the
// previous eslint-config-standard-with-typescript baseline.
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-misused-promises': 'off',
},
},
prettierRecommended,
);
30 changes: 5 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"start:dev": "next dev",
"start:dev:mock": "NEXT_PUBLIC_API_MOCKING=enabled next dev -p 3001",
"start:prod": "next build && next start",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx",
"lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx --fix",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "CI=true jest",
Expand All @@ -76,19 +76,6 @@
"resolutions": {
"tar": "^7.5.7"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
]
},
"devDependencies": {
"@react-firebase/auth": "^0.2.10",
"@swc/core": "^1.15.8",
Expand All @@ -107,22 +94,14 @@
"@types/react-redux": "^7.1.27",
"@types/react-window": "^2.0.0",
"@types/redux-saga": "^0.10.5",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"concurrently": "^9.2.1",
"cypress": "^13.2.0",
"dotenv": "^16.4.5",
"env-cmd": "^10.1.0",
"eslint": "^8.49.0",
"eslint": "^9.35.0",
"eslint-config-next": "^16.1.2",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^39.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^16.1.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-unused-imports": "^3.0.0",
"firebase-tools": "^15.3.1",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
Expand All @@ -132,7 +111,8 @@
"prettier": "^3.0.3",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"typescript": "6.0.3",
"typescript-eslint": "^8.58.1",
"wait-on": "^7.0.1"
},
"engines": {
Expand Down
14 changes: 6 additions & 8 deletions src/app/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@ declare module '@mui/material/styles' {
interface TypeText {
lightContrast?: string;
}
}

declare module '@mui/material/Typography' {
interface TypographyPropsVariantOverrides {
sectionTitle: true;
}
}

declare module '@mui/material/styles/createMixins' {
// Allow for custom mixins to be added
interface Mixins {
code: Partial<PaletteColor> & {
Expand All @@ -32,6 +24,12 @@ declare module '@mui/material/styles/createMixins' {
}
}

declare module '@mui/material/Typography' {
interface TypographyPropsVariantOverrides {
sectionTitle: true;
}
}

export enum ThemeModeEnum {
light = 'light',
dark = 'dark',
Expand Down
3 changes: 3 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This helps Typescript understand that we can import CSS files
// ex: maplibre-gl/dist/maplibre-gl.css
declare module '*.css';
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "ES2022",
"lib": [
"dom",
"dom.iterable",
Expand All @@ -14,7 +14,7 @@
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
Expand Down
Loading
Loading