Registry / testing / oxlint-plugin-query

oxlint-plugin-query

JSON →
library0.1.1jsnpmunverified

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.

npm install oxlint-plugin-query
INSTALL
IMPORT
SIG · OXLINT-PLUGIN-QUER
O
oxlint-plugin-query
testingjavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from 'oxlint-plugin-query/dist/index.js'
const plugin = require('oxlint-plugin-query')
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.
configs
import plugin from 'oxlint-plugin-query/dist/index.js'; plugin.configs.recommended
import { configs } from 'oxlint-plugin-query/dist/index.js'
configs is not a named export; it is a property on the default export. No direct named import for configs.
eslintCompatPlugin
import { plugin as eslintCompatPlugin } from './path/to/oxlint-plugin-query/eslint.cjs' // if available
import { eslintCompatPlugin } from 'oxlint-plugin-query/dist/index.js'
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.

Shows Oxlint and ESLint configuration for activating the plugin with recommended rules.

// 1. Install: npm add -D oxlint-plugin-query // 2. Create .oxlintrc.json: { "jsPlugins": ["./node_modules/oxlint-plugin-query/dist/index.js"], "rules": { "oxlint-plugin-query/exhaustive-deps": "error", "oxlint-plugin-query/stable-query-client": "error", "oxlint-plugin-query/no-rest-destructuring": "warn" } } // 3. Run oxlint (>=1.0.0). // ESLint flat config alternative: // eslint.config.mjs import queryPlugin from 'oxlint-plugin-query/dist/index.js'; export default [ { plugins: { query: queryPlugin }, rules: queryPlugin.configs.recommended.rules, }, ];
Debug
Known issues
gotchaPlugin must be loaded via absolute path or relative path in `jsPlugins`. Oxlint does not resolve bare package names like 'oxlint-plugin-query'.
fix
Use `./node_modules/oxlint-plugin-query/dist/index.js` or equivalent absolute path.
affects: >=0.0.0
gotchaThe rule prefix 'oxlint-plugin-query/' is required in .oxlintrc.json rules. Omitting the prefix causes the rule to be ignored.
fix
Always prefix rule names with 'oxlint-plugin-query/' (e.g., 'oxlint-plugin-query/exhaustive-deps').
affects: >=0.0.0
gotchaCompatibility with ESLint flat config only: the plugin does not support legacy eslintrc format.
fix
Use eslint.config.mjs with flat config and import the default export directly.
affects: >=0.0.0
deprecatedThe package is in early release (0.x). API may change in minor versions without major bump.
fix
Pin exact version or test upgrades in CI.
affects: >=0.0.0 <1.0.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'oxlint-plugin-query'
Node cannot resolve the package to an ES module when using bare specifier import in Oxlint or elsewhere.
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.
OxlintError: Plugin at './node_modules/oxlint-plugin-query/dist/index.js' is not a valid JS plugin
The plugin file is corrupted or permissions issue, or the Oxlint version is below 1.0.0.
fix
Check that the file exists, is readable, and you are using Oxlint >=1.0.0. Reinstall the package.
ESLint: Failed to load plugin 'query': Cannot find module 'oxlint-plugin-query'
Using legacy eslintrc config which does not support the default ESM export from this package.
fix
Migrate to ESLint flat config (eslint.config.mjs) and import as shown in quickstart.
TypeError: plugin.configs is undefined
Trying to use .configs on a named import rather than the default export.
fix
Use `import plugin from 'oxlint-plugin-query/dist/index.js'` then access `plugin.configs.recommended`.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
oxlintrequiredRequired runtime peer: the plugin is loaded as an Oxlint JS plugin. Oxlint must be >=1.0.0 to support jsPlugins.
Agent activity
2 hits · last 30 days
node
2
Resources
oxlint-plugin-query — npm install oxlint-plugin-query · libregistry