Skip to content

eslint parserOptions config issue #2188

@marcellmueller

Description

@marcellmueller

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!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions