Files
Laca-City/frontend/node_modules/eslint-plugin-import/docs/rules/enforce-node-protocol-usage.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

2.1 KiB

import/enforce-node-protocol-usage

🔧 This rule is automatically fixable by the --fix CLI option.

Enforce either using, or omitting, the node: protocol when importing Node.js builtin modules.

Rule Details

This rule enforces that builtins node imports are using, or omitting, the node: protocol.

Determining whether a specifier is a core module depends on the node version being used to run eslint. This version can be specified in the configuration with the import/node-version setting.

Reasons to prefer using the protocol include:

  • the code is more explicitly and clearly referencing a Node.js built-in module

Reasons to prefer omitting the protocol include:

  • some tools don't support the node: protocol
  • the code is more portable, because import maps and automatic polyfilling can be used

Options

The rule requires a single string option which may be one of:

  • 'always' - enforces that builtins node imports are using the node: protocol.
  • 'never' - enforces that builtins node imports are not using the node: protocol.

Examples

'always'

Invalid

import fs from 'fs';
export { promises } from 'fs';
// require
const fs = require('fs/promises');

Valid

import fs from 'node:fs';
export { promises } from 'node:fs';
import * as test from 'node:test';
// require
const fs = require('node:fs/promises');

'never'

Invalid

import fs from 'node:fs';
export { promises } from 'node:fs';
// require
const fs = require('node:fs/promises');

Valid

import fs from 'fs';
export { promises } from 'fs';

// require
const fs = require('fs/promises');

// This rule will not enforce not using `node:` protocol when the module is only available under the `node:` protocol.
import * as test from 'node:test';

When Not To Use It

If you don't want to consistently enforce using, or omitting, the node: protocol when importing Node.js builtin modules.