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 ESLint #105

Closed
wants to merge 13 commits into from
Closed

Add ESLint #105

wants to merge 13 commits into from

Conversation

ayushmanchhabra
Copy link
Collaborator

No description provided.

@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review August 16, 2023 23:02
package.json Outdated Show resolved Hide resolved
@TheJaredWilcurt TheJaredWilcurt changed the title Add prettier and eslint Add ESLint Aug 17, 2023
package.json Outdated Show resolved Hide resolved
Co-authored-by: The Jared Wilcurt <[email protected]>
scripts/install.js Outdated Show resolved Hide resolved
bin/nw Outdated Show resolved Hide resolved
Co-authored-by: The Jared Wilcurt <[email protected]>
lib/findpath.js Outdated Show resolved Hide resolved
ayushmanchhabra and others added 2 commits August 17, 2023 14:01
Co-authored-by: The Jared Wilcurt <[email protected]>
Co-authored-by: The Jared Wilcurt <[email protected]>
extends: ['eslint:recommended'],
rules: {
quotes: ['error', 'single'],
},
Copy link
Member

@TheJaredWilcurt TheJaredWilcurt Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of stylistic rules that could be applied to make the code more consistent.

Here is my ruleset for reference:

Ones that come to mind when looking over this PR:

  • Sometimes we add an extra comma at the end, sometimes we don't. Should probably add the comma-dangle rule to enforce that one way or the other.
  • Sometimes there is a space after a function name during a declaration, other times there is not. space-before-function-paren can enforce this, and the best rule would be to always have a space, so that the parenthesis only touch the name when the code is being executed to make a clear visual distinction.

Feel free to look through that ruleset and read the comments that explain what each rule does and port over whatever parts you want.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@ayushmanchhabra
Copy link
Collaborator Author

I can open a new PR instead. There's no point in trying to revert changes made by Prettier.

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

Successfully merging this pull request may close these issues.

2 participants