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

Update eslint dependencies #157

Merged
merged 2 commits into from
Sep 17, 2020
Merged

Update eslint dependencies #157

merged 2 commits into from
Sep 17, 2020

Conversation

joachimvh
Copy link
Member

Resolves #4.

I made a separate commit for the naming-convention rule since that one can still cause some discussion. This was the original rule in the config we're using.

Using the original rule as it was written required us to have all our boolean parameters/variables start with has/is/etc. This caused issues with many external calls such as enabling quad mode for SparqlAlgebra.js, setting objectMode for Node streams, etc. There were several files where I needed to disable the rule for multiple lines (and there were still 150 errors remaining when I gave up). It also would require us to change our permissions object from read/write/append to canRead/canWrite/canAppend which is less clean imo.

I then tried using a combination of the default settings and the config by still using strictCamelCase and StrictPascalCase, but that has as disadvantage that we for example can never use URI as part of a variable. E.g, can't have a variable called childURIs, would have to be childUris. Same for baseIRI, etc.

So I just used normal camel case/Pascal case rules since URIs/IRIs are sort of important for Solid. But this one is a separate commit so it can still easily be changed.

Still have to disable the rule in the URI constants file but that was to be expected.

@joachimvh joachimvh added the ☀️ enhancement New feature or request label Sep 17, 2020
Copy link
Contributor

@rubensworks rubensworks left a comment

Choose a reason for hiding this comment

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

E.g, can't have a variable called childURIs, would have to be childUris

I would actually be fine with that though :-)
But no strong opinion.

@joachimvh
Copy link
Member Author

I have no strong opinion about it either so I just picked the one where I didn't have to rename a bunch of functions and variables 😄

@joachimvh joachimvh merged commit e349e04 into master Sep 17, 2020
@joachimvh joachimvh deleted the eslint branch September 17, 2020 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☀️ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't update @typescript-eslint
3 participants