Files
Laca-City/frontend/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

1.8 KiB

import/max-dependencies

Forbid modules to have too many dependencies (import or require statements).

This is a useful rule because a module with too many dependencies is a code smell, and usually indicates the module is doing too much and/or should be broken up into smaller modules.

Importing multiple named exports from a single module will only count once (e.g. import {x, y, z} from './foo' will only count as a single dependency).

Options

This rule has the following options, with these defaults:

"import/max-dependencies": ["error", {
  "max": 10,
  "ignoreTypeImports": false,
}]

max

This option sets the maximum number of dependencies allowed. Anything over will trigger the rule. Default is 10 if the rule is enabled and no max is specified.

Given a max value of {"max": 2}:

Fail

import a from './a'; // 1
const b = require('./b'); // 2
import c from './c'; // 3 - exceeds max!

Pass

import a from './a'; // 1
const anotherA = require('./a'); // still 1
import {x, y, z} from './foo'; // 2

ignoreTypeImports

Ignores type imports. Type imports are a feature released in TypeScript 3.8, you can read more here. Defaults to false.

Given {"max": 2, "ignoreTypeImports": true}:

Fail

import a from './a';
import b from './b';
import c from './c';

Pass

import a from './a';
import b from './b';
import type c from './c'; // Doesn't count against max

When Not To Use It

If you don't care how many dependencies a module has.