{"_id":"@baseline-suite/eslint-plugin","_rev":"3-3e0f09dc70ca192f2197aa067a7192d7","name":"@baseline-suite/eslint-plugin","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@baseline-suite/eslint-plugin","version":"1.0.0","keywords":["eslint","eslintplugin","baseline","web-features","compatibility","lint"],"license":"MIT","_id":"@baseline-suite/eslint-plugin@1.0.0","maintainers":[{"name":"omkar598","email":"omkardongre5@gmail.com"}],"homepage":"https://github.com/omkardongre/Baseline-Developer-Suite#readme","bugs":{"url":"https://github.com/omkardongre/Baseline-Developer-Suite/issues"},"dist":{"shasum":"99513e1735f167a96b2f0e35b254982abad27f9e","tarball":"https://registry.npmjs.org/@baseline-suite/eslint-plugin/-/eslint-plugin-1.0.0.tgz","fileCount":12,"integrity":"sha512-Hmbc52p3+hIdz/6p9gs4eR05vWNuaRN0dyUnB3gIon89qT9EKYVc2PRPHQcj6FHbGnE9DleW7WHBanRjivNDxA==","signatures":[{"sig":"MEQCIE/D2SFwM6gTX9+10S/rBmAPjIjzx9JUbSDlMcA8t++PAiA9arudMxbeA1QOHGugz6gr8BDMdYruGUJe7eBzArstqQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24545},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"d5ca18adfaac888fbc29ede22af84b4a5e11c354","scripts":{"dev":"tsup src/index.ts --format cjs --dts --watch","lint":"eslint src/**/*.ts","test":"vitest run","build":"tsup src/index.ts --format cjs --dts","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"omkar598","email":"omkardongre5@gmail.com"},"repository":{"url":"git+https://github.com/omkardongre/Baseline-Developer-Suite.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"10.2.4","description":"ESLint plugin for Baseline web feature compatibility","directories":{},"_nodeVersion":"20.11.1","dependencies":{"@baseline-suite/core":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","eslint":"^8.57.1","vitest":"^1.3.1","typescript":"^5.3.3","@types/eslint":"^8.56.0","@types/estree":"^1.0.5"},"peerDependencies":{"eslint":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin_1.0.0_1759734435333_0.3771909589689051","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@baseline-suite/eslint-plugin","version":"1.0.1","keywords":["eslint","eslintplugin","baseline","web-features","compatibility","lint"],"license":"MIT","_id":"@baseline-suite/eslint-plugin@1.0.1","maintainers":[{"name":"omkar598","email":"omkardongre5@gmail.com"}],"homepage":"https://github.com/omkardongre/Baseline-Developer-Suite#readme","bugs":{"url":"https://github.com/omkardongre/Baseline-Developer-Suite/issues"},"dist":{"shasum":"ad3be21899b67a6dd2280cc3034de8cdbed6ea24","tarball":"https://registry.npmjs.org/@baseline-suite/eslint-plugin/-/eslint-plugin-1.0.1.tgz","fileCount":12,"integrity":"sha512-XkfN0JKsKvVamHPCcAcQZCzpT+LsqMLsktGuTIaBXd8AZ9Kza2O/O1xXekCr/rOPfTst6xc5rX+tDVlZBC2EKA==","signatures":[{"sig":"MEUCIQC6wMB3MwlRzE2nOCEg3Jd4X55mitR011sxw/P8rwgoMQIgCkKh4UVf/yxtcoq5P510y2E2FAH15o6qppCvSn3Dyr8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24495},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"444e624aaf77727e1317e9c725265b18dc5229bc","scripts":{"dev":"tsup src/index.ts --format cjs --dts --watch","lint":"eslint src/**/*.ts","test":"vitest run","build":"tsup src/index.ts --format cjs --dts","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"omkar598","email":"omkardongre5@gmail.com"},"repository":{"url":"git+https://github.com/omkardongre/Baseline-Developer-Suite.git","type":"git","directory":"packages/eslint-plugin"},"_npmVersion":"10.2.4","description":"ESLint plugin for Baseline web feature compatibility","directories":{},"_nodeVersion":"20.11.1","dependencies":{"@baseline-suite/core":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","eslint":"^8.57.1","vitest":"^1.3.1","typescript":"^5.3.3","@types/eslint":"^8.56.0","@types/estree":"^1.0.5"},"peerDependencies":{"eslint":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin_1.0.1_1759791314267_0.5142541570899435","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@baseline-suite/eslint-plugin","version":"1.0.2","description":"ESLint plugin for Baseline web feature compatibility","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --format cjs --dts","dev":"tsup src/index.ts --format cjs --dts --watch","test":"vitest run","test:watch":"vitest","lint":"eslint src/**/*.ts","clean":"rm -rf dist"},"keywords":["eslint","eslintplugin","baseline","web-features","compatibility","lint"],"dependencies":{"@baseline-suite/core":"^1.0.1"},"devDependencies":{"@types/eslint":"^8.56.0","@types/estree":"^1.0.5","eslint":"^8.57.1","tsup":"^8.0.2","typescript":"^5.3.3","vitest":"^1.3.1"},"peerDependencies":{"eslint":">=8.0.0"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/omkardongre/Baseline-Developer-Suite.git","directory":"packages/eslint-plugin"},"_id":"@baseline-suite/eslint-plugin@1.0.2","gitHead":"444e624aaf77727e1317e9c725265b18dc5229bc","bugs":{"url":"https://github.com/omkardongre/Baseline-Developer-Suite/issues"},"homepage":"https://github.com/omkardongre/Baseline-Developer-Suite#readme","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-YWnXZvfMF2/QlBxfdSbCS8MAsuPTGSX7hHOCXMPaug7gAMYcY8Qke9Ev4qr2BRqt2bFPbnrBfDwTA/QuE+LBRA==","shasum":"fe146174fa86ccc20d0a83445eeb6a7d03ee9fd8","tarball":"https://registry.npmjs.org/@baseline-suite/eslint-plugin/-/eslint-plugin-1.0.2.tgz","fileCount":12,"unpackedSize":24495,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBuY4kTZYsulOTiGZkHqtvvwPZT9i0WKPb9IFInNCMz1AiBSbetkQv3X6WhtiGBRzQ3lkwH5DAOP16HKpyYLrMNeQw=="}]},"_npmUser":{"name":"omkar598","email":"omkardongre5@gmail.com"},"directories":{},"maintainers":[{"name":"omkar598","email":"omkardongre5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin_1.0.2_1759792080637_0.8000047572203104"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-06T07:07:15.234Z","modified":"2025-10-06T23:08:01.014Z","1.0.0":"2025-10-06T07:07:15.514Z","1.0.1":"2025-10-06T22:55:14.460Z","1.0.2":"2025-10-06T23:08:00.828Z"},"bugs":{"url":"https://github.com/omkardongre/Baseline-Developer-Suite/issues"},"license":"MIT","homepage":"https://github.com/omkardongre/Baseline-Developer-Suite#readme","keywords":["eslint","eslintplugin","baseline","web-features","compatibility","lint"],"repository":{"type":"git","url":"git+https://github.com/omkardongre/Baseline-Developer-Suite.git","directory":"packages/eslint-plugin"},"description":"ESLint plugin for Baseline web feature compatibility","maintainers":[{"name":"omkar598","email":"omkardongre5@gmail.com"}],"readme":"# eslint-plugin-baseline\n\nESLint plugin for Baseline web feature compatibility checking.\n\n## Installation\n\n```bash\nnpm install --save-dev eslint-plugin-baseline\n# or\npnpm add -D eslint-plugin-baseline\n```\n\n## Usage\n\nAdd `baseline` to the plugins section of your `.eslintrc` configuration file:\n\n```json\n{\n  \"plugins\": [\"baseline\"]\n}\n```\n\nThen configure the rules you want to use:\n\n```json\n{\n  \"rules\": {\n    \"baseline/no-limited-features\": [\"error\", { \"year\": 2023 }],\n    \"baseline/enforce-baseline-year\": [\"error\", { \"year\": 2023 }],\n    \"baseline/require-noopener\": \"error\"\n  }\n}\n```\n\n### Using Preset Configurations\n\nThis plugin provides three preset configurations:\n\n#### Recommended (Default)\n\n```json\n{\n  \"extends\": [\"plugin:baseline/recommended\"]\n}\n```\n\n- Disallows features with limited support\n- Requires noopener on window.open\n- Allows newly available features by default\n\n#### Strict\n\n```json\n{\n  \"extends\": [\"plugin:baseline/strict\"]\n}\n```\n\n- Enforces 2022 baseline\n- No newly available features\n- Strict security rules\n\n#### Relaxed\n\n```json\n{\n  \"extends\": [\"plugin:baseline/relaxed\"]\n}\n```\n\n- Allows newly available features\n- 2024 baseline\n- Warnings instead of errors\n\n## Rules\n\n### `baseline/no-limited-features`\n\nDisallow Web APIs with limited browser support.\n\n```javascript\n// ❌ Bad (if navigator.share is not widely available)\nawait navigator.share({ title: 'Hello' });\n\n// ✅ Good\nif (navigator.share) {\n  await navigator.share({ title: 'Hello' });\n}\n```\n\n**Options:**\n\n```json\n{\n  \"year\": 2023,           // Target year for baseline\n  \"allowNewly\": false,    // Allow newly available features\n  \"allowLimited\": false,  // Allow limited support features\n  \"exceptions\": []        // Feature IDs to exclude from checks\n}\n```\n\n### `baseline/enforce-baseline-year`\n\nEnforce that only features available by a specific year are used.\n\n```javascript\n// With { \"year\": 2020 }\n\n// ❌ Bad (if feature was added after 2020)\nconst observer = new IntersectionObserver(callback);\n\n// ✅ Good (fetch available before 2020)\nawait fetch('/api/data');\n```\n\n**Options:**\n\n```json\n{\n  \"year\": 2023,       // Required: Target year\n  \"exceptions\": []    // Feature IDs to exclude\n}\n```\n\n### `baseline/require-noopener`\n\nRequire `rel=\"noopener\"` or `rel=\"noreferrer\"` when using `window.open()` for security.\n\n```javascript\n// ❌ Bad\nwindow.open('https://example.com');\n\n// ✅ Good\nwindow.open('https://example.com', '_blank', 'noopener');\n\n// ✅ Also good\nwindow.open('https://example.com', '_blank', 'noreferrer');\n```\n\nThis rule has **auto-fix** capability.\n\n## Configuration Examples\n\n### Target Modern Browsers (2023+)\n\n```json\n{\n  \"extends\": [\"plugin:baseline/recommended\"],\n  \"rules\": {\n    \"baseline/no-limited-features\": [\"error\", { \n      \"year\": 2023,\n      \"allowNewly\": true\n    }]\n  }\n}\n```\n\n### Legacy Browser Support (2020)\n\n```json\n{\n  \"extends\": [\"plugin:baseline/strict\"],\n  \"rules\": {\n    \"baseline/enforce-baseline-year\": [\"error\", { \"year\": 2020 }]\n  }\n}\n```\n\n### Allow Specific Features\n\n```json\n{\n  \"rules\": {\n    \"baseline/no-limited-features\": [\n      \"error\",\n      {\n        \"year\": 2023,\n        \"exceptions\": [\"web-share\", \"view-transitions\"]\n      }\n    ]\n  }\n}\n```\n\n## Detected Web APIs\n\nThe plugin currently detects:\n\n### Browser APIs\n- `navigator.share`\n- `navigator.geolocation`\n- `navigator.clipboard`\n- `navigator.serviceWorker`\n- `navigator.mediaDevices`\n\n### Storage APIs\n- `localStorage`\n- `sessionStorage`\n- `indexedDB`\n\n### Network APIs\n- `fetch`\n- `WebSocket`\n- `EventSource`\n\n### Observers\n- `IntersectionObserver`\n- `ResizeObserver`\n- `MutationObserver`\n- `PerformanceObserver`\n\n### Communication\n- `BroadcastChannel`\n\n### Utilities\n- `requestAnimationFrame`\n- `requestIdleCallback`\n- `queueMicrotask`\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build\npnpm build\n\n# Test\npnpm test\n\n# Watch mode\npnpm dev\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}