import-x/no-unresolved reports a false casing mismatch on macOS for a relative import with a query string suffix like ?raw.
The same import resolves successfully on Linux CI, and the same local file passes when the query string is removed.
Environment
eslint-plugin-import-x: 4.16.1
eslint: 9.39.2
- Node.js:
v24.13.0
- OS:
macOS 26.3.1
Repro
package.json
{
"name": "import-x-raw-repro",
"private": true,
"type": "module",
"devDependencies": {
"eslint": "9.39.2",
"eslint-plugin-import-x": "4.16.1"
}
}
eslint.config.js
import importX from 'eslint-plugin-import-x';
export default [
{
files: ['**/*.js'],
plugins: {
'import-x': importX,
},
rules: {
'import-x/no-unresolved': 'error',
},
languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
},
];
index.js
import example from './example.ts?raw';
console.log(example);
index-no-query.js
import example from './example.ts';
console.log(example);
example.ts
Run:
npm install
npx eslint index.js
npx eslint index-no-query.js
Actual
index.js fails with:
1:21 error Casing of ./example.ts?raw does not match the underlying filesystem import-x/no-unresolved
index-no-query.js passes.
Expected
Both files should pass.
If the resolver accepts ./example.ts?raw, no-unresolved should not report a casing mismatch for the same import.
Notes
This looks like the macOS-only case check may be using a resolved path that still includes the query string when it compares the basename against directory entries.
import-x/no-unresolvedreports a false casing mismatch on macOS for a relative import with a query string suffix like?raw.The same import resolves successfully on Linux CI, and the same local file passes when the query string is removed.
Environment
eslint-plugin-import-x:4.16.1eslint:9.39.2v24.13.0macOS 26.3.1Repro
package.json{ "name": "import-x-raw-repro", "private": true, "type": "module", "devDependencies": { "eslint": "9.39.2", "eslint-plugin-import-x": "4.16.1" } }eslint.config.jsindex.jsindex-no-query.jsexample.tsRun:
Actual
index.jsfails with:index-no-query.jspasses.Expected
Both files should pass.
If the resolver accepts
./example.ts?raw,no-unresolvedshould not report a casing mismatch for the same import.Notes
This looks like the macOS-only case check may be using a resolved path that still includes the query string when it compares the basename against directory entries.