{"name":"eslint-plugin-qwik","version":"1.7.3","keywords":["builder.io","eslint","qwik"],"author":{"name":"Builder Team"},"license":"MIT","_id":"eslint-plugin-qwik@1.7.3","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":"c6d9146be9da0fff0026e6b8a6982e7a55a99bd5","tarball":"http://registry-npm.ywwl.com/eslint-plugin-qwik/download/eslint-plugin-qwik-1.7.3.tgz","fileCount":4,"integrity":"sha512-1PGlVFmRfo/rlFQ/ZdzFdrtK3DdxEdmeVos0W8eJqIEDh7KkhjdIP6XIStf/SEYZ8KVcvEHgeDMv+vQm5QVcGA==","signatures":[{"sig":"MEUCIFk6UuvvDMTZNdJFE/y5U/MpRMbp/8cex4f7onv7dvXIAiEA/fdPY4mw0k59NX1cqlsMtvv/Epo6cTbua1fHtVlg1FA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103159,"size":31639,"noattachment":false,"key":"/eslint-plugin-qwik/-/eslint-plugin-qwik-1.7.3.tgz"},"main":"dist/index.js","_from":"file:eslint-plugin-qwik-1.7.3.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/a25028388b5ae0faf25ce5a936e9815f/eslint-plugin-qwik-1.7.3.tgz","_integrity":"sha512-1PGlVFmRfo/rlFQ/ZdzFdrtK3DdxEdmeVos0W8eJqIEDh7KkhjdIP6XIStf/SEYZ8KVcvEHgeDMv+vQm5QVcGA==","repository":{"url":"git+https://github.com/QwikDev/qwik.git","type":"git","directory":"packages/eslint-rules"},"_npmVersion":"10.7.0","description":"An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.","directories":{},"_nodeVersion":"20.15.1","dependencies":{"jsx-ast-utils":"^3.3.5"},"_hasShrinkwrap":false,"devDependencies":{"redent":"^4.0.0","@types/eslint":"^8.56.10","@types/estree":"^1.0.2","@builder.io/qwik":"^1.7.3","@builder.io/qwik-city":"^1.7.3","@typescript-eslint/utils":"^7.7.1","@typescript-eslint/rule-tester":"^7.7.1"},"peerDependencies":{"eslint":"^8.57.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-qwik_1.7.3_1722294621617_0.14195156773618978","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":1722294621789,"_cnpm_publish_time":1722294621789,"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"}}