Skip to content

Commit 282605d

Browse files
committed
feat: Update event data and UI components across multiple years and perform general site maintenance.
1 parent 644acc8 commit 282605d

224 files changed

Lines changed: 8265 additions & 5743 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/eslint-fix-summary.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# ESLint Configuration Fix - Summary
2+
3+
## What Was Fixed
4+
5+
### 1. **Created ESLint Configuration File**
6+
7+
- Created `eslint.config.js` using the new ESLint v9 flat config format
8+
- Configured TypeScript, React, and import plugins
9+
- Added proper parser and plugin configurations
10+
11+
### 2. **Updated package.json**
12+
13+
- Added `"type": "module"` to support ES module syntax
14+
- This eliminates the module type warning from ESLint
15+
16+
### 3. **Installed Missing Dependencies**
17+
18+
- Installed `eslint-plugin-react-refresh` for Vite/React fast refresh support
19+
20+
### 4. **Added Test Globals**
21+
22+
- Added Vitest globals (describe, it, test, expect, beforeEach, etc.) to ESLint config
23+
- This resolves "not defined" errors in test files
24+
25+
### 5. **Configured Rules**
26+
27+
- Disabled `no-undef` (TypeScript handles this better)
28+
- Disabled `no-unused-expressions` (for styled-components compatibility)
29+
- Configured import order rules with automatic fixing
30+
- Set up TypeScript-specific rules including:
31+
- `@typescript-eslint/no-explicit-any`: error
32+
- `@typescript-eslint/consistent-type-imports`: error
33+
- `@typescript-eslint/no-unused-vars`: error with ignore patterns
34+
35+
### 6. **Auto-Fixed Issues**
36+
37+
- Ran `npm run lint:fix` which automatically fixed 108 import order issues
38+
- Reduced total problems from 198 to 90
39+
40+
## Current Status
41+
42+
**Build**: Passing
43+
**Tests**: All 245 tests passing (5 skipped)
44+
**Prettier**: Code formatted
45+
⚠️ **Linting**: 90 problems remaining (82 errors, 8 warnings)
46+
47+
## Remaining Issues (90 problems)
48+
49+
### Import Order Issues (75 errors)
50+
51+
These are mostly import order violations that couldn't be auto-fixed. They follow this pattern:
52+
53+
- Type imports should be ordered correctly
54+
- Internal imports should follow a specific order
55+
- Empty lines between import groups
56+
57+
**Examples:**
58+
59+
- `react` type import should occur after import of `@styles/colors`
60+
- `styled-components` import should occur after import of `react-use`
61+
- There should be no empty line within import group
62+
63+
### Code Quality Issues (7 errors)
64+
65+
1. **SessionFeedback.tsx**: 1 `any` type usage (line 48)
66+
2. **Speakers.test.tsx**: 2 duplicate `super()` calls (lines 107, 143)
67+
3. **VenueWTC.tsx**: 1 unused variable `StyledTrainLine` (line 66)
68+
69+
### Warnings (8 warnings)
70+
71+
- React refresh warnings about exporting non-components
72+
- Accessibility warnings (missing alt text, etc.)
73+
74+
## Recommendations
75+
76+
### Priority 1: Fix Code Quality Issues
77+
78+
These are actual bugs or code smells:
79+
80+
1. Remove duplicate `super()` calls in `Speakers.test.tsx`
81+
2. Replace `any` type in `SessionFeedback.tsx` with proper type
82+
3. Remove or prefix unused `StyledTrainLine` variable with `_`
83+
84+
### Priority 2: Fix Import Order
85+
86+
The import order issues can be fixed by:
87+
88+
1. Manually reordering imports to match the configured order
89+
2. Or adjusting the import order rules to be less strict
90+
3. Or disabling specific import order rules that are too restrictive
91+
92+
### Priority 3: Address Warnings
93+
94+
- Add alt text to images
95+
- Move non-component exports to separate files
96+
97+
## Configuration Details
98+
99+
### ESLint Config Location
100+
101+
`/Users/anyulled/IdeaProjects/dev-bcn.github.io/eslint.config.js`
102+
103+
### Key Rules Configured
104+
105+
- TypeScript: Strict type checking, no `any`, consistent type imports
106+
- React: JSX runtime, hooks rules, fast refresh
107+
- Import: Ordered imports, no duplicates, proper resolution
108+
- Code Quality: No console (warn), prefer const, eqeqeq
109+
110+
### Import Order Configuration
111+
112+
```javascript
113+
groups: [
114+
'builtin', // Node.js built-ins
115+
'external', // npm packages
116+
'internal', // @alias imports
117+
['parent', 'sibling'], // relative imports
118+
'index',
119+
'object',
120+
'type', // type imports
121+
]
122+
```
123+
124+
## Next Steps
125+
126+
To achieve 0 linting errors:
127+
128+
1. Fix the 7 code quality errors (highest priority)
129+
2. Decide on import order strategy (manual fix vs. rule adjustment)
130+
3. Address accessibility warnings
131+
4. Consider adding pre-commit hooks to enforce linting

eslint.config.js

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from '@typescript-eslint/eslint-plugin';
6+
import tsparser from '@typescript-eslint/parser';
7+
import react from 'eslint-plugin-react';
8+
import jsxA11y from 'eslint-plugin-jsx-a11y';
9+
import importPlugin from 'eslint-plugin-import';
10+
11+
export default [
12+
{
13+
ignores: [
14+
'dist',
15+
'build',
16+
'node_modules',
17+
'coverage',
18+
'*.config.js',
19+
'*.config.ts',
20+
'public',
21+
'scripts',
22+
],
23+
},
24+
{
25+
files: ['**/*.{ts,tsx}'],
26+
languageOptions: {
27+
ecmaVersion: 2020,
28+
globals: {
29+
...globals.browser,
30+
...globals.node,
31+
// Vitest globals
32+
describe: 'readonly',
33+
it: 'readonly',
34+
test: 'readonly',
35+
expect: 'readonly',
36+
beforeEach: 'readonly',
37+
afterEach: 'readonly',
38+
beforeAll: 'readonly',
39+
afterAll: 'readonly',
40+
vi: 'readonly',
41+
},
42+
parser: tsparser,
43+
parserOptions: {
44+
ecmaVersion: 'latest',
45+
ecmaFeatures: { jsx: true },
46+
sourceType: 'module',
47+
},
48+
},
49+
settings: {
50+
react: { version: '18.3' },
51+
'import/resolver': {
52+
typescript: {
53+
alwaysTryTypes: true,
54+
project: './tsconfig.json',
55+
},
56+
alias: {
57+
map: [
58+
['@', './src'],
59+
['@components', './src/components'],
60+
['@views', './src/views'],
61+
['@utils', './src/utils'],
62+
['@hooks', './src/hooks'],
63+
['@types', './src/types'],
64+
['@assets', './src/assets'],
65+
],
66+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
67+
},
68+
},
69+
},
70+
plugins: {
71+
react,
72+
'react-hooks': reactHooks,
73+
'react-refresh': reactRefresh,
74+
'@typescript-eslint': tseslint,
75+
'jsx-a11y': jsxA11y,
76+
import: importPlugin,
77+
},
78+
rules: {
79+
...js.configs.recommended.rules,
80+
...tseslint.configs.recommended.rules,
81+
...react.configs.recommended.rules,
82+
...react.configs['jsx-runtime'].rules,
83+
...reactHooks.configs.recommended.rules,
84+
85+
// TypeScript specific rules
86+
'@typescript-eslint/no-explicit-any': 'error',
87+
'@typescript-eslint/explicit-function-return-type': 'off',
88+
'@typescript-eslint/explicit-module-boundary-types': 'off',
89+
'@typescript-eslint/no-unused-vars': [
90+
'error',
91+
{
92+
argsIgnorePattern: '^_',
93+
varsIgnorePattern: '^_',
94+
caughtErrorsIgnorePattern: '^_',
95+
},
96+
],
97+
'@typescript-eslint/no-non-null-assertion': 'warn',
98+
'@typescript-eslint/consistent-type-imports': [
99+
'error',
100+
{
101+
prefer: 'type-imports',
102+
disallowTypeAnnotations: false,
103+
},
104+
],
105+
106+
// React specific rules
107+
'react/react-in-jsx-scope': 'off',
108+
'react/prop-types': 'off',
109+
'react/jsx-uses-react': 'off',
110+
'react-refresh/only-export-components': [
111+
'warn',
112+
{ allowConstantExport: true },
113+
],
114+
115+
// Import rules
116+
'import/order': [
117+
'error',
118+
{
119+
groups: [
120+
'builtin',
121+
'external',
122+
'internal',
123+
['parent', 'sibling'],
124+
'index',
125+
'object',
126+
'type',
127+
],
128+
'newlines-between': 'always',
129+
alphabetize: {
130+
order: 'asc',
131+
caseInsensitive: true,
132+
},
133+
},
134+
],
135+
'import/no-duplicates': 'error',
136+
'import/no-unresolved': 'error',
137+
'import/named': 'error',
138+
'import/default': 'error',
139+
140+
// General code quality rules
141+
'no-console': ['warn', { allow: ['warn', 'error'] }],
142+
'no-debugger': 'warn',
143+
'prefer-const': 'error',
144+
'no-var': 'error',
145+
'object-shorthand': 'error',
146+
'quote-props': ['error', 'as-needed'],
147+
eqeqeq: ['error', 'always', { null: 'ignore' }],
148+
'no-unused-expressions': 'off', // Disabled for styled-components
149+
'no-undef': 'off', // TypeScript handles this better
150+
151+
// Accessibility rules
152+
'jsx-a11y/alt-text': 'warn',
153+
'jsx-a11y/anchor-is-valid': 'warn',
154+
'jsx-a11y/click-events-have-key-events': 'warn',
155+
'jsx-a11y/no-static-element-interactions': 'warn',
156+
},
157+
},
158+
];

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "devbcn",
3+
"type": "module",
34
"homepage": "https://www.devbcn.com",
45
"version": "1.5.0",
56
"private": true,
@@ -93,6 +94,7 @@
9394
"eslint-plugin-jsx-a11y": "^6.10.2",
9495
"eslint-plugin-react": "^7.37.5",
9596
"eslint-plugin-react-hooks": "^5.2.0",
97+
"eslint-plugin-react-refresh": "^0.4.26",
9698
"gh-pages": "^6.3.0",
9799
"globals": "^16.4.0",
98100
"jsdom": "^27.3.0",
@@ -109,4 +111,4 @@
109111
"bundleDependencies": [
110112
"clsx"
111113
]
112-
}
114+
}

src/2023/Attendee/AttendeeInformation2023.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { FC } from "react";
2-
import { Color } from "@styles/colors";
31
import { styled } from "styled-components";
2+
43
import { BIG_BREAKPOINT } from "@constants/BreakPoints";
4+
import { Color } from "@styles/colors";
5+
6+
import type { FC } from "react";
57

68
const PrePartyImg = styled.img`
79
{

src/2023/Cfp/CfpSectionWrapper.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import React, { FC } from "react";
2-
import CfpSection from "@views/Cfp/CfpSection";
1+
import React from "react";
2+
33
import data2023 from "@data/2023.json";
4+
import CfpSection from "@views/Cfp/CfpSection";
5+
46
import { data } from "./CfpData";
57

8+
import type { FC } from "react";
9+
610
export const CfpSectionWrapper: FC = () => {
7-
return <CfpSection conferenceConfig={data2023} cfpData={data} />;
11+
return <CfpSection conferenceConfig={data2023} cfpData={data} />;
812
};
913

1014
export default CfpSectionWrapper;

src/2023/Communities/Communities2023.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import React, { FC } from "react";
1+
import React from "react";
22
import { styled } from "styled-components";
3+
34
import TwitterIcon from "@components/Icons/Twitter";
4-
import { Color } from "@styles/colors";
55
import WebsiteIcon from "@components/Icons/website";
66
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
7+
import { Color } from "@styles/colors";
8+
9+
import type { FC } from "react";
710

811
const Heading = styled.h1`
912
padding-top: 10rem;

src/2023/Diversity/Diversity.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import React from "react";
21
import { render, screen } from "@testing-library/react";
3-
import Diversity2023 from "./Diversity2023";
2+
import React from "react";
43
import { BrowserRouter, Route, Routes } from "react-router";
54

5+
import Diversity2023 from "./Diversity2023";
6+
67
describe("Diversity component", () => {
78
it("renders heading correctly", () => {
89
render(

0 commit comments

Comments
 (0)