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

all .eslintrc.json rules are not getting evaluated for typescript project #1742

Closed
6 tasks
ajaysuwalka opened this issue Jun 30, 2023 · 2 comments
Closed
6 tasks
Labels

Comments

@ajaysuwalka
Copy link

ajaysuwalka commented Jun 30, 2023

  • summary of problem - All .eslintrc.json rules are not getting evaluated, There're different results when I run npm run lint vs ./gradlew spotlessCheck and I want to know what's preventing this. I want to specifically emphasise on the rule @typescript-eslint/no-floating-promises
  • gradle version - 8.1.1
  • spotless version - 6.14.1
  • operating system and version - MacOS 13.3.1 (a) (22E772610a)
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible - Demo project
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace - Easily reproducible using the commands mentioned in #1
@ajaysuwalka ajaysuwalka changed the title all .eslintrc.json rules are not getting evaluated all .eslintrc.json rules are not getting evaluated for typescript project Jun 30, 2023
@simschla
Copy link
Contributor

simschla commented Jul 4, 2023

Thanks for raising the issue @ajaysuwalka. I hope I can clarify some things.

You need to understand that spotless - as of now - is not a linter, but a formatter. So running gradlew spotlessCheck is not the same as running npm run lint. Spotless uses eslint with the --fix parameter to fix eslint issues, that can automatically be fixed by eslint. That being said, it is clear why the @typescript-eslint/no-floating-promises rule is not respected in spotlessCheck: it is not a rule that can be automatically fixed by eslint, so it does not show up in spotlessCheck.

If you're interested in seeing spotless being able to act as a linter, I suggest you follow the corresponding issue #1097

@simschla
Copy link
Contributor

simschla commented Jul 4, 2023

Closing as answered for now. Please don't hesitate to reopen if I missed anything.

@simschla simschla closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants