-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore: extend root eslint config in twenty-server #4781
Conversation
a3c8448
to
89f73f0
Compare
4e3a6ec
to
3e82703
Compare
3e82703
to
0c0ea3b
Compare
export function orderObjectProperties<T extends object>(data: T[]): T[]; | ||
|
||
export function orderObjectProperties<T extends object>(data: T): T; | ||
|
||
export function orderObjectProperties<T extends Array<any> | object>( | ||
export const orderObjectProperties = <T extends object[] | object>( | ||
data: T, | ||
): T { |
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.
@thaisguigon We should keep the use of function
on the server side, only use arrow function is dropping multiple signature capability
@@ -31,7 +31,7 @@ export const createApp = async ( | |||
imports: [AppModule], | |||
}); | |||
|
|||
if (!!config.moduleBuilderHook) { | |||
if (config.moduleBuilderHook) { |
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.
@thaisguigon Hmm careful with that, in this case it's not causing any issue, but when you're doing that in a react-native three it will cause error, it should not happen on react but can too:
This will cause issue (empty string is not allowed in the three):
<>
{myString && <></>}
</>
But this is not causing issue:
<>
{!!myString && <></>}
</>
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.
This custom rule (explicit-boolean-predicates-in-if
) only applies to if
statements, it won't flag conditions in JSX.
This reverts commit c80dab0.
To avoid the many conflicts, I've reopened a PR here #5101 and cherry picked the config change, will run the linter with the new folder structure and hopefully will merge today 🙏 |
Reopening @thaisguigon work from #4781 --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
Reopening @thaisguigon work from twentyhq#4781 --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
Following #4705: this is a proposal to extend the common root eslint config in twenty-server as well.