{"id":27217,"library":"oxlint-plugin-query","title":"oxlint-plugin-query","description":"Oxlint plugin providing TanStack Query v5 lint rules, ported to Oxlint's JS plugin API and compatible with ESLint flat config. Current stable version is 0.1.1, released monthly. It offers six rules (exhaustive-deps, no-rest-destructuring, stable-query-client, no-unstable-deps, infinite-query-property-order, mutation-property-order) to catch common TanStack Query anti-patterns earlier. Unlike tslint-plugin-react-query or eslint-plugin-query, it works natively with Oxlint (>=1.0.0) for fast linting, but also exports an ESLint compat plugin for flat config users. Requires Node >=18.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/takinprofit/biome-plugins","tags":["javascript","oxlint","eslint","tanstack","query","tanstack-query","react-query","lint"],"install":[{"cmd":"npm install oxlint-plugin-query","lang":"bash","label":"npm"},{"cmd":"yarn add oxlint-plugin-query","lang":"bash","label":"yarn"},{"cmd":"pnpm add oxlint-plugin-query","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required runtime peer: the plugin is loaded as an Oxlint JS plugin. Oxlint must be >=1.0.0 to support jsPlugins.","package":"oxlint","optional":false}],"imports":[{"note":"The package is ESM-only. The default export is the Oxlint plugin object. For ESLint flat config, import the same path and pass to plugins.","wrong":"const plugin = require('oxlint-plugin-query')","symbol":"default","correct":"import plugin from 'oxlint-plugin-query/dist/index.js'"},{"note":"configs is not a named export; it is a property on the default export. No direct named import for configs.","wrong":"import { configs } from 'oxlint-plugin-query/dist/index.js'","symbol":"configs","correct":"import plugin from 'oxlint-plugin-query/dist/index.js'; plugin.configs.recommended"},{"note":"The README only shows the default export for ESLint. There is no separate eslintCompatPlugin named export in the main entry. Use the default export directly in ESLint flat config.","wrong":"import { eslintCompatPlugin } from 'oxlint-plugin-query/dist/index.js'","symbol":"eslintCompatPlugin","correct":"import { plugin as eslintCompatPlugin } from './path/to/oxlint-plugin-query/eslint.cjs' // if available"}],"quickstart":{"code":"// 1. Install: npm add -D oxlint-plugin-query\n// 2. Create .oxlintrc.json:\n{\n  \"jsPlugins\": [\"./node_modules/oxlint-plugin-query/dist/index.js\"],\n  \"rules\": {\n    \"oxlint-plugin-query/exhaustive-deps\": \"error\",\n    \"oxlint-plugin-query/stable-query-client\": \"error\",\n    \"oxlint-plugin-query/no-rest-destructuring\": \"warn\"\n  }\n}\n// 3. Run oxlint (>=1.0.0).\n\n// ESLint flat config alternative:\n// eslint.config.mjs\nimport queryPlugin from 'oxlint-plugin-query/dist/index.js';\n\nexport default [\n  {\n    plugins: { query: queryPlugin },\n    rules: queryPlugin.configs.recommended.rules,\n  },\n];","lang":"typescript","description":"Shows Oxlint and ESLint configuration for activating the plugin with recommended rules."},"warnings":[{"fix":"Use `./node_modules/oxlint-plugin-query/dist/index.js` or equivalent absolute path.","message":"Plugin must be loaded via absolute path or relative path in `jsPlugins`. Oxlint does not resolve bare package names like 'oxlint-plugin-query'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always prefix rule names with 'oxlint-plugin-query/' (e.g., 'oxlint-plugin-query/exhaustive-deps').","message":"The rule prefix 'oxlint-plugin-query/' is required in .oxlintrc.json rules. Omitting the prefix causes the rule to be ignored.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use eslint.config.mjs with flat config and import the default export directly.","message":"Compatibility with ESLint flat config only: the plugin does not support legacy eslintrc format.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin exact version or test upgrades in CI.","message":"The package is in early release (0.x). API may change in minor versions without major bump.","severity":"deprecated","affected_versions":">=0.0.0 <1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace bare import with a relative path from node_modules: './node_modules/oxlint-plugin-query/dist/index.js' or use `--module-resolution=node` if supported.","cause":"Node cannot resolve the package to an ES module when using bare specifier import in Oxlint or elsewhere.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'oxlint-plugin-query'"},{"fix":"Check that the file exists, is readable, and you are using Oxlint >=1.0.0. Reinstall the package.","cause":"The plugin file is corrupted or permissions issue, or the Oxlint version is below 1.0.0.","error":"OxlintError: Plugin at './node_modules/oxlint-plugin-query/dist/index.js' is not a valid JS plugin"},{"fix":"Migrate to ESLint flat config (eslint.config.mjs) and import as shown in quickstart.","cause":"Using legacy eslintrc config which does not support the default ESM export from this package.","error":"ESLint: Failed to load plugin 'query': Cannot find module 'oxlint-plugin-query'"},{"fix":"Use `import plugin from 'oxlint-plugin-query/dist/index.js'` then access `plugin.configs.recommended`.","cause":"Trying to use .configs on a named import rather than the default export.","error":"TypeError: plugin.configs is undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}