Files
Laca-City/frontend/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.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

3.2 KiB
Raw Blame History

import/prefer-default-export

In exporting files, this rule checks if there is default export or not.

Rule Details

rule schema

"import/prefer-default-export": [
    ( "off" | "warn" | "error" ),
    { "target": "single" | "any" } // default is "single"
]

Config Options

There are two options available: single and any. By default, if you do not specify the option, rule will assume it is single.

single

Definition: When there is only a single export from a module, prefer using default export over named export.

How to setup config file for this rule:

// you can manually specify it
"rules": {
    "import/prefer-default-export": [
        ( "off" | "warn" | "error" ),
        { "target": "single" }
    ]
}

// config setup below will also work
"rules": {
    "import/prefer-default-export": "off" | "warn" | "error"
}

The following patterns are considered warnings:

// bad.js

// There is only a single module export and it's a named export.
export const foo = 'foo';

The following patterns are not warnings:

// good1.js

// There is a default export.
export const foo = 'foo';
const bar = 'bar';
export default bar;
// good2.js

// There is more than one named export in the module.
export const foo = 'foo';
export const bar = 'bar';
// good3.js

// There is more than one named export in the module
const foo = 'foo';
const bar = 'bar';
export { foo, bar }
// good4.js

// There is a default export.
const foo = 'foo';
export { foo as default }
// export-star.js

// Any batch export will disable this rule. The remote module is not inspected.
export * from './other-module'

any

Definition: any exporting file must contain a default export.

How to setup config file for this rule:

// you have to manually specify it
"rules": {
    "import/prefer-default-export": [
        ( "off" | "warn" | "error" ),
        { "target": "any" }
    ]
}

The following patterns are not considered warnings:

// good1.js

//has default export
export default function bar() {};
// good2.js

// has default export
let foo;
export { foo as default }
// good3.js

//contains multiple exports AND default export
export const a = 5;
export function bar(){};
let foo;
export { foo as default }
// good4.js

// does not contain any exports => file is not checked by the rule
import * as foo from './foo';
// export-star.js

// Any batch export will disable this rule. The remote module is not inspected.
export * from './other-module'

The following patterns are considered warnings:

// bad1.js

//has 2 named exports, but no default export
export const foo = 'foo';
export const bar = 'bar';
// bad2.js

// does not have default export
let foo, bar;
export { foo, bar }
// bad3.js

// does not have default export
export { a, b } from "foo.js"
// bad4.js

// does not have default export
let item;
export const foo = item;
export { item };