1.0.1 • Published 5 months ago

eslint-plugin-phosphor-icons-import v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

eslint-plugin-phosphor-icons-import

šŸŽØ ESLint plugin to enforce optimized imports for Phosphor Icons.
This plugin helps standardize imports, reducing bundle size and improving consistency.

šŸš€ Installation

Install the package via npm:

npm install --save-dev eslint-plugin-phosphor-icons-import

šŸ“Œ Usage

module.exports = {
  plugins: ['phosphor-icons-import'],
  rules: {
    'phosphor-icons-import/import-pattern': 'error',
  },
}

šŸ”§ What It Does

This plugin enforces optimized imports for Phosphor Icons. It transforms imports like:

import { ShieldCheck } from '@phosphor-icons/react'

Into more efficient, tree-shakable imports:

import { ShieldCheck } from '@phosphor-icons/react/ShieldCheck'

šŸ›  Rule: phosphor-icons-import/import-pattern

RuleDescriptionFixableDefault
phosphor-icons-import/import-patternEnforces optimized imports for Phosphor Iconsāœ… Yes"error"

šŸ† Benefits

  • Reduces bundle size by only importing what's needed.
  • Ensures consistent imports across the project.
  • Works with React, Next.js, and other frameworks.
1.0.1

5 months ago

1.0.0

5 months ago