-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filename starting with '$' causes ESLint / Prettier to fail #3339
Comments
I think this is more of an NX problem tbh, as I don't have any linting problems when using one of the default templates/stacks. 🤔 |
Thanks for the quick answer! |
@lildesert that's shell substituion getting in your way. You need to escape the dollar sign when using command line:
(in a shell, you declare a variable like this: |
Closing this as invalid. |
Yeah I know the substitution is the root cause. But even by running |
Quick update on this, we've found a workaround by using pretty-quick https://www.npmjs.com/package/pretty-quick |
What version of Remix are you using?
1.5.1
Steps to Reproduce
Create a new Remix project with
npx create-remix@latest
and choose theBlues
stack.Run
npx eslint ./app/routes/notes/$noteId.tsx
You will get the following error:
Expected Behavior
No error is thrown and the file gets parsed by ESLint.
Actual Behavior
I'm using Remix inside an
Nx
monorepo. When I run the commandnx format:check
I get this error and the command fails (which also affects the CI).It's happening because
$noteId
is considered a variable. I think this issue belongs here since it's a Remix convention to add$
in the filename.The only workaround I found for now is to have a path like
./app/routes/notes/$noteId/index.tsx
The text was updated successfully, but these errors were encountered: