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

Add linting for js and graphql #42

Closed
2 tasks
tobiasdiez opened this issue Jun 17, 2021 · 5 comments
Closed
2 tasks

Add linting for js and graphql #42

tobiasdiez opened this issue Jun 17, 2021 · 5 comments

Comments

@tobiasdiez
Copy link
Member

tobiasdiez commented Jun 17, 2021

Eslint + prettifier.

TODO:

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

k3KAW8Pnf7mkmdSMPHz27 commented Jun 30, 2021

Perhaps we can work our way towards using some of the AirBnB's ESLint configs https://mikelow.dev/blog/how-to-keep-airbnb-eslint-config-in-typescript (there is a hooks extension as well). More detailed information can be found on https://airbnb.io/javascript/react/. I believe it can work well with TypeScript, even without using the recommended babel config.
In addition to what that article states, we'll probably need to add react and react/hooks to plugins: {....
At the moment it collides with how react-hot-loader is being used, but perhaps that can be ignored on a line-by-line basis until #73 is reviewed.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

I'm not suggesting following the AirBnB configs blindly. If there is something that doesn't make sense to us we can always disable that setting.

Other configs that I'd consider interesting (but I have 0 experience with) is unicorn and recommended-requiring-type-checking and as they are not part of JabRef online configs either perhaps we should skip them?

@Siedlerchr
Copy link
Member

One thing I changed in my prettier config for another project was the "print-width". Default it's 80. I suggest something over 120 or so. Otherwise, you will have uncessary wrappings of lines. And today most screens have usually a larger width than a height.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

I'd +1 that, I think the office settings is 120 but perhaps they easily get overwritten.

@mohit038-zz mohit038-zz mentioned this issue Jun 30, 2021
4 tasks
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

k3KAW8Pnf7mkmdSMPHz27 commented Jul 10, 2021

notes to myself

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

3 participants