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

Broken ESLint setup #166

Closed
monesidn opened this issue Aug 13, 2022 · 0 comments
Closed

Broken ESLint setup #166

monesidn opened this issue Aug 13, 2022 · 0 comments

Comments

@monesidn
Copy link
Collaborator

NOTE: This is part of a series of issues I'm creating to keep track of the work I've done, and that will be submitted, across multiple PRs

After cloning the repository and running yarn eslint won't work as expected. Using it from VSCode will result in multiple "syntax errors" and other errors that are not wrong at all.

Examples of "bad" syntax errors:
image
image

All these problems are caused by a .eslintrc file that needs to be updated to:

  • Use the recommended typescript rules
  • Use the right parser for Typescript files.

Additionally when invoking it from the cli using yarn lint will result in the following error:

Oops! Something went wrong! :(

ESLint: 5.16.0.
No files matching the pattern "src" were found.
Please check for typing mistakes in the pattern.

Which is caused again by a bad parser configuration in .eslintrc.

The ESLint configuration needs to be updated to fix the above problems.

Additionally, to better integrate with VSCode I think that the configuration about semicolon should be changed to "always". This will solve some syntax highlighting problems (and also I personally prefer the semicolon to be there 😁 )
Example of bad syntax highlighting without semicolon:
image

Same snippet with semicolon:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant