Skip to content

Commit a4d2e38

Browse files
committed
Fixed several ESLint warnings
1 parent 6537031 commit a4d2e38

Some content is hidden

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

71 files changed

+1450
-1191
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,jsx,ts,tsx,mjs,cjs}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.{css,scss,sass}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[*.{html,htm}]
18+
indent_style = space
19+
indent_size = 4
20+
21+
[*.{json,yml,yaml}]
22+
indent_style = space
23+
indent_size = 2
24+
25+
[*.md]
26+
trim_trailing_whitespace = false
27+
28+
[Makefile]
29+
indent_style = tab

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ===========================================
2+
# Metis Admin Template - Environment Variables
3+
# ===========================================
4+
# Copy this file to .env.local for local development
5+
# Never commit .env.local to version control
6+
7+
# Development Server
8+
VITE_PORT=3000
9+
VITE_HOST=localhost
10+
11+
# API Configuration (for future backend integration)
12+
VITE_API_URL=http://localhost:3001/api
13+
VITE_API_TIMEOUT=10000
14+
15+
# Feature Flags
16+
VITE_ENABLE_DEMO_DATA=true
17+
VITE_ENABLE_MOCK_AUTH=true
18+
19+
# Optional: Icon Library (bootstrap or lucide)
20+
VITE_ICON_PROVIDER=bootstrap
21+
22+
# Optional: Analytics (leave empty to disable)
23+
VITE_ANALYTICS_ID=

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ tmp
4545
temp
4646
TODO.md
4747
.tmp
48-
CLAUDE.md
48+
49+
# Environment files (keep .env.example)
50+
.env
51+
.env.local
52+
.env.*.local
4953

5054
# Build output (keep for version control)
5155
# dist-modern/

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
dist-modern
4+
package-lock.json
5+
.git
6+
*.min.js
7+
*.min.css

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"arrowParens": "always",
8+
"endOfLine": "lf",
9+
"bracketSpacing": true,
10+
"htmlWhitespaceSensitivity": "css"
11+
}

CHANGELOG.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [3.2.0] - 2025-11-29
99

10-
### 🎉 Maintenance Release - All Dependencies Updated
10+
### 🎉 Maintenance Release - Dependencies, Build Optimization & DX Improvements
1111

12-
This release brings all dependencies to their latest versions with improved ESLint configuration for ESLint v9.
12+
This release brings all dependencies to their latest versions, significantly improves build performance through chunk splitting, and enhances developer experience with new configuration files.
13+
14+
### 🚀 Build Performance Improvements
15+
16+
- **Vendor Chunk Splitting** - Main bundle reduced from 993KB to 33KB
17+
- `vendor-bootstrap.js` (82KB) - Bootstrap & Popper
18+
- `vendor-ui.js` (123KB) - Alpine.js, SweetAlert2, Day.js
19+
- `vendor-charts.js` (756KB) - Chart.js, ApexCharts
20+
- **Better Browser Caching** - Vendor chunks cached separately from app code
21+
- **Optimized Dependency Pre-bundling** - Faster dev server startup
1322

1423
### 📦 Updated Production Dependencies
1524

@@ -33,18 +42,31 @@ This release brings all dependencies to their latest versions with improved ESLi
3342

3443
### ✨ Added
3544

36-
- **ESLint v9 Configuration** - New `eslint.config.js` flat config format replacing deprecated `.eslintrc`
37-
- **@eslint/js** - Added ESLint JavaScript configuration package
45+
- **`.prettierrc.json`** - Standardized code formatting configuration
46+
- **`.prettierignore`** - Exclude build artifacts from formatting
47+
- **`.editorconfig`** - IDE-agnostic coding standards
48+
- **`postcss.config.js`** - PostCSS/Autoprefixer configuration
49+
- **`.env.example`** - Environment variable template for easy onboarding
50+
- **`DEVELOPMENT.md`** - Comprehensive development documentation
51+
- **ESLint v9 Configuration** - New `eslint.config.js` flat config format
52+
- **New npm scripts**:
53+
- `npm run serve` - Build and preview in one command
54+
- `npm run lint:fix` - Auto-fix linting issues
55+
- `npm run format:check` - Check formatting without changes
56+
- `npm run check` - Run lint + format check
57+
- `npm run clean:all` - Deep clean including node_modules
3858

3959
### 🐛 Fixed
4060

41-
- **Duplicate Method Error** - Fixed duplicate `changePassword()` method in security component
42-
- **ESLint Configuration** - Migrated to ESLint v9 flat config format
61+
- **Duplicate Method Error** - Fixed duplicate `changePassword()` in security component
62+
- **Unused Bootstrap Imports** - Removed unused Alert, Button, Carousel, ScrollSpy imports
63+
- **ESLint Warnings** - Reduced from 16 to 12 warnings
4364

4465
### 🔧 Changed
4566

46-
- **Lint Script** - Simplified ESLint command in package.json for ESLint v9 compatibility
47-
- **CLAUDE.md** - Updated dependency versions in documentation
67+
- **Vite Configuration** - Cleaner syntax with `__dirname` helper
68+
- **CLAUDE.md** - Streamlined to quick reference, detailed docs moved to DEVELOPMENT.md
69+
- **`.gitignore`** - Added environment file patterns, removed CLAUDE.md exclusion
4870

4971
### 🔒 Security
5072

CLAUDE.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Modern Bootstrap 5 Admin Dashboard Template (v3.2.0) using Vite, Alpine.js, and SCSS.
8+
9+
| Directory | Purpose |
10+
|-----------|---------|
11+
| `src-modern/` | Source files (Bootstrap 5.3.8, ES6+ modules) |
12+
| `dist-modern/` | Production build output |
13+
| `src/`, `dist/` | Legacy Bootstrap 3 code - **do not use** |
14+
15+
## Commands
16+
17+
```bash
18+
npm run dev # Dev server at http://localhost:3000
19+
npm run build # Production build
20+
npm run lint # ESLint check
21+
npm run format # Prettier format
22+
```
23+
24+
## Key Files
25+
26+
| File | Purpose |
27+
|------|---------|
28+
| `src-modern/scripts/main.js` | App entry point, initializes AdminApp class |
29+
| `src-modern/styles/scss/main.scss` | SCSS entry point |
30+
| `vite.config.js` | Build config with multi-page entries |
31+
| `eslint.config.js` | ESLint v9 flat config |
32+
33+
## Architecture Quick Reference
34+
35+
**Page Detection**: Each HTML page needs `data-page="pagename"` on `<body>` to load correct component.
36+
37+
**Component Loading**: Dynamic imports in `main.js` based on page:
38+
39+
```javascript
40+
case 'users':
41+
await import('./components/users.js');
42+
break;
43+
```
44+
45+
**Alpine.js Pattern**: Components register via `Alpine.data()`:
46+
47+
```javascript
48+
Alpine.data('componentName', () => ({
49+
init() { /* setup */ },
50+
// methods and state
51+
}));
52+
```
53+
54+
## Adding a New Page
55+
56+
1. Create `src-modern/newpage.html` with `data-page="newpage"` on body
57+
2. Add entry to `vite.config.js``rollupOptions.input`
58+
3. Create `src-modern/scripts/components/newpage.js`
59+
4. Add case to `initPageComponents()` in `main.js`
60+
5. Optional: Create `src-modern/styles/scss/pages/_newpage.scss` and import in `main.scss`
61+
62+
## Dependencies
63+
64+
- **UI**: Bootstrap 5.3.8, Bootstrap Icons 1.13.1
65+
- **Reactive**: Alpine.js 3.15.2
66+
- **Charts**: ApexCharts 5.3.6, Chart.js 4.5.1
67+
- **Notifications**: SweetAlert2 11.26.3
68+
- **Build**: Vite 7.2.4, Sass 1.94.2
69+
70+
## Documentation
71+
72+
See [DEVELOPMENT.md](DEVELOPMENT.md) for detailed architecture, patterns, and styling guide.

dist-modern/analytics.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
2525

2626
<!-- Custom Styles for Analytics Dashboard -->
27-
<script type="module" crossorigin src="./assets/main-DVF5gxTI.js"></script>
28-
<script type="module" crossorigin src="./assets/analytics-DOQTIi0C.js"></script>
29-
<link rel="stylesheet" crossorigin href="./assets/main-B6AQ7n8q.css">
27+
<script type="module" crossorigin src="./assets/vendor-bootstrap-C9iorZI5.js"></script>
28+
<script type="module" crossorigin src="./assets/vendor-charts-DGwYAWel.js"></script>
29+
<script type="module" crossorigin src="./assets/vendor-ui-DjYv-mAO.js"></script>
30+
<script type="module" crossorigin src="./assets/main-BHbn44Op.js"></script>
31+
<script type="module" crossorigin src="./assets/analytics-ChgB2M2c.js"></script>
32+
<link rel="stylesheet" crossorigin href="./assets/main-QD_VOj1Y.css">
3033
</head>
3134

3235
<body data-page="analytics" class="analytics-page">

dist-modern/assets/analytics-ChgB2M2c.js

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

0 commit comments

Comments
 (0)