-
Notifications
You must be signed in to change notification settings - Fork 406
DEV - Add eslint integrated prettier #4273
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
Conversation
I'm all for this change, but it's going to cause a lot of problems if we try to do this while maintaining two separate long-lived branches that we constantly merge into one another |
parser: '@typescript-eslint/parser', | ||
rules: { | ||
semi: ['error', 'never'], | ||
semi: ['error', 'always'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this? It will probably cause a lot of changes, that could be avoided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because I needed to override it. Currently we don't put ;
on .ts
files, which is OK. However, it's not the best practice for .js
files as there are cases where problems may occur:
function test() {
return
{
message: "Hello, world!"
}
}
console.log(test())
So, below in this file are the override settings.
I agree that this change could introduce some challenges, but once we merge and rebase the branches, I believe things will stabilize moving forward. Could you share more about your specific concerns or scenarios where you foresee issues? That way, we can address them proactively. |
because of this warning: WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
6f01d6c
to
252ed81
Compare
Description
Well, I noticed few files with no formatting, random code style issues, so here's a solution to the problems.
In this PR you're going to see prettier + configuration for it.
In addition I'm adding a VSCode configuration to trigger the prettier rules when formatting files. (if you haven't changed your binding it should be
cmd + shift + f
.How to test?
yarn lint
and
yarn prettier
oryarn prettier:update