{"name":"eslint-plugin-qwik","version":"2.0.0-alpha.2","keywords":["builder.io","eslint","qwik"],"author":{"name":"Qwik Team"},"license":"MIT","_id":"eslint-plugin-qwik@2.0.0-alpha.2","maintainers":[{"name":"mhevery","email":"misko@hevery.com"},{"name":"adamdbradley","email":"adam@builder.io"},{"name":"shairez","email":"shai@hirez.io"},{"name":"manucorporat","email":"manu.mtza@gmail.com"}],"homepage":"https://github.com/QwikDev/qwik#readme","bugs":{"url":"https://github.com/QwikDev/qwik/issues"},"dist":{"shasum":"3d879a2a1d674734f07108612d10bd7e26351b3a","tarball":"http://registry-npm.ywwl.com/eslint-plugin-qwik/download/eslint-plugin-qwik-2.0.0-alpha.2.tgz","fileCount":4,"integrity":"sha512-nere8i/DjlGZOLEOqVmtl1IPQTuQW9tDk8Z9SdErbs9pKOcyilnM1N07OlAz80evk3f3KM9dp2kd76HaauGP3w==","signatures":[{"sig":"MEUCIA2Z4Y9ssptEucjQPhb51djVRugEQZbBzvqkLZ6AgsI0AiEAz6QAIraCrkXy/sUoWrIquUQfQXmkZ7eKI2073pDWXbc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103346,"size":31656,"noattachment":false,"key":"/eslint-plugin-qwik/-/eslint-plugin-qwik-2.0.0-alpha.2.tgz"},"main":"dist/index.js","_from":"file:eslint-plugin-qwik-2.0.0-alpha.2.tgz","engines":{"node":"^18.17.0 || ^20.3.0 || >=21.0.0"},"scripts":{"test":"cd ../..; ./node_modules/.bin/vitest packages/eslint-plugin-qwik/qwik.unit.ts"},"_npmUser":{"name":"shairez","email":"shai@hirez.io"},"_resolved":"/tmp/4d903eb63c6ba41f009f1fdc386c637f/eslint-plugin-qwik-2.0.0-alpha.2.tgz","_integrity":"sha512-nere8i/DjlGZOLEOqVmtl1IPQTuQW9tDk8Z9SdErbs9pKOcyilnM1N07OlAz80evk3f3KM9dp2kd76HaauGP3w==","repository":{"url":"git+https://github.com/QwikDev/qwik.git","type":"git","directory":"packages/eslint-rules"},"_npmVersion":"10.8.2","description":"An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.","directories":{},"_nodeVersion":"20.18.1","dependencies":{"jsx-ast-utils":"^3.3.5","@typescript-eslint/utils":"^8.12.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"redent":"4.0.0","@types/eslint":"8.56.10","@types/estree":"1.0.5","@qwik.dev/core":"2.0.0-alpha.2","@qwik.dev/router":"2.0.0-alpha.2","@typescript-eslint/rule-tester":"7.8.0"},"peerDependencies":{"eslint":"^8.57.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-qwik_2.0.0-alpha.2_1733257685513_0.13501411512400452","host":"s3://npm-registry-packages"},"readme":"# eslint-plugin-qwik\n\nQwik comes with its own set of ESLint rules to help developers write better code.\n\n## Usage\n\nInstall the plugin:\n\n```bash\nnpm add -D eslint-plugin-qwik\npnpm add -D eslint-plugin-qwik\nyarn add -D eslint-plugin-qwik\n```\n\n> `eslint-plugin-qwik` uses the tsc typechecker to type information. You must include the `tsconfigRootDir` in the `parserOptions`.\n\n## Configurations\n\n### Flat config (recommended)\n\n```js\n// eslint.config.js\nimport js from '@eslint/js';\nimport globals from 'globals';\nimport tseslint from 'typescript-eslint';\nimport { globalIgnores } from 'eslint/config';\nimport { qwikEslint9Plugin } from 'eslint-plugin-qwik';\n\nexport const qwikConfig = tseslint.config(\n  globalIgnores(['node_modules/*', 'dist/*', 'server/*', 'tmp/*']),\n  js.configs.recommended,\n  tseslint.configs.recommended,\n  qwikEslint9Plugin.configs.recommended,\n  {\n    files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n    languageOptions: {\n      globals: {\n        ...globals.serviceworker,\n        ...globals.browser,\n        ...globals.node,\n      },\n      parserOptions: {\n        projectService: true,\n        tsconfigRootDir: import.meta.dirname,\n      },\n    },\n  }\n);\n```\n\n### Legacy config (`eslint < 9`)\n\n```js\n// .eslintrc.js\nmodule.exports = {\n  env: {\n    browser: true,\n    es2021: true,\n    node: true,\n  },\n  extends: [\n    'eslint:recommended',\n    'plugin:@typescript-eslint/recommended',\n    'plugin:qwik/recommended',\n  ],\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    tsconfigRootDir: __dirname,\n    project: ['./tsconfig.json'],\n    ecmaVersion: 2021,\n    sourceType: 'module',\n    ecmaFeatures: {\n      jsx: true,\n    },\n  },\n  plugins: ['@typescript-eslint'],\n};\n```\n\n> To ignore files, you must use the `.eslintignore` file.\n\n## List of supported rules\n\n- **Warn** in 'recommended' ruleset — ✔️\n- **Error** in 'recommended' ruleset — ✅\n- **Warn** in 'strict' ruleset — 🔒\n- **Error** in 'strict' ruleset — 🔐\n- **Typecheck** — 💭\n\n| Rule                                                                                     | Description                                                                                                                                                            | Ruleset  |\n| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| [`qwik/valid-lexical-scope`](https://qwik.dev/docs/advanced/eslint/#valid-lexical-scope) | Used the tsc typechecker to detect the capture of unserializable data in dollar `($)` scopes.                                                                          | ✅ 🔐 💭 |\n| [`qwik/use-method-usage`](https://qwik.dev/docs/advanced/eslint/#use-method-usage)       | Detect invalid use of use hook.                                                                                                                                        | ✅ 🔐    |\n| [`qwik/no-react-props`](https://qwik.dev/docs/advanced/eslint/#no-react-props)           | Disallow usage of React-specific `className/htmlFor` props.                                                                                                            | ✅ 🔐    |\n| [`qwik/loader-location`](https://qwik.dev/docs/advanced/eslint/#loader-location)         | Detect declaration location of `loader$`.                                                                                                                              | ✔️ 🔐    |\n| [`qwik/prefer-classlist`](https://qwik.dev/docs/advanced/eslint/#prefer-classlist)       | Enforce using the `classlist` prop over importing a `classnames` helper. The `classlist` prop accepts an object `{ [class: string]: boolean }` just like `classnames`. | ✔️ 🔐    |\n| [`qwik/jsx-no-script-url`](https://qwik.dev/docs/advanced/eslint/#jsx-no-script-url)     | Disallow javascript: URLs.                                                                                                                                             | ✔️ 🔐    |\n| [`qwik/jsx-key`](https://qwik.dev/docs/advanced/eslint/#jsx-key)                         | Disallow missing `key` props in iterators/collection literals.                                                                                                         | ✔️ 🔐    |\n| [`qwik/unused-server`](https://qwik.dev/docs/advanced/eslint/#unused-server)             | Detect unused `server$()` functions.                                                                                                                                   | ✅ 🔐    |\n| [`qwik/jsx-img`](https://qwik.dev/docs/advanced/eslint/#jsx-img)                         | For performance reasons, always provide width and height attributes for `<img>` elements, it will help to prevent layout shifts.                                       | ✔️ 🔐    |\n| [`qwik/jsx-a`](https://qwik.dev/docs/advanced/eslint/#jsx-a)                             | For a perfect SEO score, always provide href attribute for `<a>` elements.                                                                                             | ✔️ 🔐    |\n| [`qwik/no-use-visible-task`](https://qwik.dev/docs/advanced/eslint/#no-use-visible-task) | Detect `useVisibleTask$()` functions.                                                                                                                                  | ✔️ 🔒    |\n","publish_time":1733257685732,"_cnpm_publish_time":1733257685732,"dist-tags":{"alpha":"2.0.0-alpha.10","beta":"2.0.0-beta.47","dev":"1.7.0-dev20240711122353","latest":"1.20.4","next":"0.9.0","rc":"2.0.0-rc.5"}}