{"name":"eslint-plugin-qwik","version":"1.17.2","keywords":["builder.io","eslint","qwik"],"author":{"name":"Builder Team"},"license":"MIT","_id":"eslint-plugin-qwik@1.17.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":"c92beb66a79c01c666b138db1c876c5cdea1e1b2","tarball":"http://registry-npm.ywwl.com/eslint-plugin-qwik/download/eslint-plugin-qwik-1.17.2.tgz","fileCount":4,"integrity":"sha512-XergDGnweL1UxdqmmanmUJSRgOu44xL6K6OKMJtpHETM835sTCQoD89cKxUklMju9Z7Ve9WJF3AI8JP0G6NYww==","signatures":[{"sig":"MEYCIQCELEQvB13Jwl65+POETZrHbIsPNl9XVzb5rU8AmE6TLgIhAJn+TtOD5RlVDKJm1ynGq3hyD8BbQsxKW+HspGkKXCDw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112554,"size":34027,"noattachment":false,"key":"/eslint-plugin-qwik/-/eslint-plugin-qwik-1.17.2.tgz"},"main":"dist/index.js","_from":"file:eslint-plugin-qwik-1.17.2.tgz","engines":{"node":">=16.8.0 <18.0.0 || >=18.11"},"scripts":{"test":"cd ../..; ./node_modules/.bin/vitest packages/eslint-plugin-qwik/qwik.unit.ts"},"_npmUser":{"name":"shairez","email":"shai@hirez.io"},"_resolved":"/tmp/de1c9d591837ca9af7ef9dbd221424df/eslint-plugin-qwik-1.17.2.tgz","_integrity":"sha512-XergDGnweL1UxdqmmanmUJSRgOu44xL6K6OKMJtpHETM835sTCQoD89cKxUklMju9Z7Ve9WJF3AI8JP0G6NYww==","repository":{"url":"git+https://github.com/QwikDev/qwik.git","type":"git","directory":"packages/eslint-rules"},"_npmVersion":"11.6.1","description":"An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jsx-ast-utils":"^3.3.5","@typescript-eslint/utils":"^8.38.0"},"_hasShrinkwrap":false,"devDependencies":{"redent":"4.0.0","@types/estree":"1.0.8","@builder.io/qwik":"^1.17.2","@builder.io/qwik-city":"^1.17.2","@typescript-eslint/rule-tester":"8.38.0"},"peerDependencies":{"eslint":"^8.57.0 || ^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-qwik_1.17.2_1762205840404_0.32691962615163916","host":"s3://npm-registry-packages-npm-production"},"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":1762205840652,"_cnpm_publish_time":1762205840652,"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"}}