{"_id":"@brionmario-experimental/eslint-plugin-oxygen-ui","name":"@brionmario-experimental/eslint-plugin-oxygen-ui","dist-tags":{"alpha":"0.0.1-alpha.0","latest":"0.0.1-alpha.0"},"versions":{"0.0.1-alpha.0":{"name":"@brionmario-experimental/eslint-plugin-oxygen-ui","version":"0.0.1-alpha.0","description":"ESLint plugin to prevent @mui and lucide-react direct imports in Oxygen UI based projects.","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"keywords":["eslint","plugin","oxygen-ui","material-ui","lucide-react","imports"],"author":{"name":"WSO2 LLC"},"license":"Apache-2.0","peerDependencies":{"eslint":"^8.0.0 || ^9.0.0"},"devDependencies":{"@types/eslint":"^9.6.1","@types/estree":"^1.0.6","esbuild":"^0.25.12","rimraf":"^6.1.0","typescript":"^5.9.3"},"nx":{"targets":{"build":{"dependsOn":[]}}},"scripts":{"build":"rm -rf dist && node esbuild.config.js && tsc --emitDeclarationOnly --outDir dist","clean":"rm -rf dist"},"_id":"@brionmario-experimental/eslint-plugin-oxygen-ui@0.0.1-alpha.0","_integrity":"sha512-NhG39ImQ+J1nyRczi/w7YDGyLrQ91qIKbkVtDm/LOpYfTzp6q+RyHN9VVksiyNr5GFEBVUnNuKFgfAqaD+GBrQ==","_resolved":"/tmp/eb2979af12cf8c6552649bd715c6b8f0/brionmario-experimental-eslint-plugin-oxygen-ui-0.0.1-alpha.0.tgz","_from":"file:brionmario-experimental-eslint-plugin-oxygen-ui-0.0.1-alpha.0.tgz","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-NhG39ImQ+J1nyRczi/w7YDGyLrQ91qIKbkVtDm/LOpYfTzp6q+RyHN9VVksiyNr5GFEBVUnNuKFgfAqaD+GBrQ==","shasum":"850e55bf92623eaba532f07602a23aca4b45dabc","tarball":"https://registry.npmjs.org/@brionmario-experimental/eslint-plugin-oxygen-ui/-/eslint-plugin-oxygen-ui-0.0.1-alpha.0.tgz","fileCount":13,"unpackedSize":52326,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcebGHYr80Rw1Yf/4RqMUn8CksIEQbb7ngy3zZwDXAJQIhAL7YuNgF/i1H9wwUttoKtn+kai/xTZo8ZqmNwbFPWGOO"}]},"_npmUser":{"name":"brionmario","email":"brionbmp@gmail.com"},"directories":{},"maintainers":[{"name":"brionmario","email":"brionbmp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-oxygen-ui_0.0.1-alpha.0_1762973643565_0.6922084918225597"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-12T18:54:03.456Z","0.0.1-alpha.0":"2025-11-12T18:54:03.743Z","modified":"2025-11-12T18:54:04.050Z"},"maintainers":[{"name":"brionmario","email":"brionbmp@gmail.com"}],"description":"ESLint plugin to prevent @mui and lucide-react direct imports in Oxygen UI based projects.","keywords":["eslint","plugin","oxygen-ui","material-ui","lucide-react","imports"],"author":{"name":"WSO2 LLC"},"license":"Apache-2.0","readme":"# @brionmario-experimental/eslint-plugin-oxygen-ui\n\nESLint plugin to enforce Oxygen UI best practices by preventing direct imports from `@mui/*` packages and `lucide-react`.\n\n## Installation\n\n```bash\nnpm install --save-dev @brionmario-experimental/eslint-plugin-oxygen-ui\n# or\npnpm add -D @brionmario-experimental/eslint-plugin-oxygen-ui\n# or\nyarn add -D @brionmario-experimental/eslint-plugin-oxygen-ui\n```\n\n## Usage\n\n### Flat Config (ESLint 9+)\n\n```javascript\nimport oxygenUIPlugin from '@brionmario-experimental/eslint-plugin-oxygen-ui';\n\nexport default [\n  {\n    plugins: {\n      '@brionmario-experimental/oxygen-ui': oxygenUIPlugin,\n    },\n    rules: {\n      '@brionmario-experimental/oxygen-ui/no-direct-mui-imports': 'error',\n      '@brionmario-experimental/oxygen-ui/no-direct-lucide-imports': 'error',\n    },\n  },\n];\n```\n\nOr use the recommended config:\n\n```javascript\nimport oxygenUIPlugin from '@brionmario-experimental/eslint-plugin-oxygen-ui';\n\nexport default [\n  oxygenUIPlugin.configs.recommended,\n];\n```\n\n## Rules\n\n### `no-direct-mui-imports`\n\nPrevents direct imports from all MUI packages (`@mui/*`) and suggests using `@oxygen-ui/react` instead.\n\n❌ **Incorrect:**\n```javascript\nimport { Box, Stack } from '@mui/material';\nimport Button from '@mui/material/Button';\nimport { DataGrid } from '@mui/x-data-grid';\nimport { DatePicker } from '@mui/x-date-pickers';\n```\n\n✅ **Correct:**\n```javascript\n// Standard Material-UI components\nimport { Box, Stack, Button } from '@brionmario-experimental/oxygen-ui';\n\n// MUI X Data Grid components (namespace export)\nimport { DataGrid } from '@brionmario-experimental/oxygen-ui';\n// Then destructure specific components:\nconst { DataGrid: DataGridComponent, GridColDef } = DataGrid;\n\n// MUI X Date Pickers components (namespace export)\nimport { DatePickers } from '@brionmario-experimental/oxygen-ui';\n// Then destructure specific components:\nconst { DatePicker, LocalizationProvider } = DatePickers;\n```\n\n**Options:**\n- `suggestedPackage` (string): The package to suggest instead of @mui/* (default: '@brionmario-experimental/oxygen-ui')\n- `allowedPackages` (array): List of MUI packages that are allowed (default: [])\n\n### `no-direct-lucide-imports`\n\nPrevents direct imports from `lucide-react` and suggests using `@brionmario-experimental/oxygen-ui-icons-react` instead.\n\n❌ **Incorrect:**\n```javascript\nimport { Settings, Home, User } from 'lucide-react';\n```\n\n✅ **Correct:**\n```javascript\nimport { Settings, Home, User } from '@brionmario-experimental/oxygen-ui-icons-react';\n```\n\n**Options:**\n- `suggestedPackage` (string): The package to suggest instead of lucide-react (default: '@brionmario-experimental/oxygen-ui-icons-react')\n\n## Auto-fixing\n\nBoth rules support auto-fixing with `eslint --fix`.\n\n## License\n\nApache-2.0 © WSO2 LLC\n","readmeFilename":"README.md","_rev":"1-db3376cbc49cae3012257403ce3eed82"}