Closed loriswit closed 3 months ago
can you make a pr to include jsx. it might be because some of the lint might require types but we can fix them as we run into them
you probably can make a pr to be
const isLayout = /\/layout(|!|-.+)\.(t|j)sx?$/.test(path);
const isIndex = /\/index(|!|@.+)\.(t|j)sx?$/.test(path);
const isPlugin = /\/plugin(|@.+)\.(t|j)sx?$/.test(path);
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
I've been trying out a few things with Qwik, and I didn't bother to use TypeScript, so my routes are just
.jsx
source files. Because of this, Vite is printing warnings aboutrouteLoader$
not being located in the correct place, even though it's located insrc/routes/index.jsx
which seems like it should be allowed.I suppose this happens because of these regexes: https://github.com/QwikDev/qwik/blob/cae4e5bc3b77637264651ec6537b8c72fb75bb28/packages/eslint-plugin-qwik/src/loaderLocation.ts#L59-L61
Is there any reason why
.jsx
files would be considered invalid locations? If not, this should be an easy fix.Reproduction
https://github.com/loriswit/eslint-plugin-qwik-bug
Steps to reproduce
Clone the repo, then run
npm install
andnpm start
(ornpm run preview
).System Info
Additional Information
Full console output: