Skip to content
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

eslint parserOptions config issue #2188

Open
marcellmueller opened this issue Nov 27, 2024 · 1 comment · May be fixed by #2205
Open

eslint parserOptions config issue #2188

marcellmueller opened this issue Nov 27, 2024 · 1 comment · May be fixed by #2205
Assignees
Labels
bug Something isn't working

Comments

@marcellmueller
Copy link
Collaborator

marcellmueller commented Nov 27, 2024

Describe the Bug
The path to tsconfig.json in frontend/.eslintrc.yml is pointing to ./frontend/tsconfig.json, so linting typescript files isn't working.

** Steps To Reproduce**
Steps to reproduce the behaviour:

  1. Clone repo
  2. cd frontend && npm install
  3. Open frontend/src/App.tsx
  4. Look at the first import, there will be an error since it can't find tsconfig.json (tested in neovim and vscode)
    Image

Image

To fix:

  • Remove ./frontend from parserOptions/project in .eslintrc.yml
  • Once fixed if you open frontend/e2e/pages/dashboard.ts there will be an error since eslint is working now, but /e2e/ isn't included in .tsconfig so add the e2e directory to the include in .tsconfig
  • Since linting was broken there are some basic lint errors in some files such as App.tsx, though just saving the files seems to fix most that I found so either:
cd frontend && npx prettier . --write
cd frontend && npx eslint --fix .

Some other considerations:

  • The backend and tests folder don't have a prettier config. Perhaps create new ones or move .pretterrc.yml up one directory along with a .prettierignore that ignores folders like .git, .github, charts, migrations would be nice.
  • Backend and tests folder don't have an eslint config, it would be nice if the whole project had a base eslint config to extend and share some rules.

Thanks for your consideration and your hard work on this helpful repo!

@marcellmueller marcellmueller added the bug Something isn't working label Nov 27, 2024
@DerekRoberts DerekRoberts moved this from New to Active in DevOps (NR) Nov 27, 2024
@DerekRoberts
Copy link
Member

Hey, thanks @marcellmueller! This could be the best issue I've ever recieved. Please expect it to be actioned on soon. :D

@DerekRoberts DerekRoberts self-assigned this Dec 11, 2024
@DerekRoberts DerekRoberts linked a pull request Dec 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Active
Development

Successfully merging a pull request may close this issue.

2 participants