Add sqlite3 and modify prettier config #10

Merged
j285he merged 4 commits from j285he-add-sqlite3 into main 2021-11-20 19:37:15 -05:00
Member
No description provided.
j285he added 1 commit 2021-11-13 20:44:01 -05:00
j285he requested review from n3parikh 2021-11-13 20:44:40 -05:00
j285he requested review from a258wang 2021-11-13 20:44:43 -05:00
a258wang reviewed 2021-11-14 00:42:43 -05:00
.eslintrc.yml Outdated
@ -19,6 +19,8 @@ extends:
- plugin:prettier/recommended
rules:
prettier/prettier: ['error', {semi: true}]
Owner

Is the {semi: true} necessary here?

Is the `{semi: true}` necessary here?
j285he marked this conversation as resolved
a258wang reviewed 2021-11-14 00:51:08 -05:00
.prettierrc Outdated
@ -2,3 +2,3 @@
"arrowParens": "avoid",
"singleQuote": true,
"semi": false,
"semi": true,
Owner

It looks like the default Prettier options are more or less the same as what we want, so perhaps we could delete this file entirely? The website repo doesn't even have a .prettierrc, so getting rid of this file would make the Prettier rules more similar between the two repos. (If there's a reason why we maybe shouldn't try to align the Prettier config between both projects, please leave a comment!)

It looks like the default Prettier options are more or less the same as what we want, so perhaps we could delete this file entirely? The website repo doesn't even have a `.prettierrc`, so getting rid of this file would make the Prettier rules more similar between the two repos. (If there's a reason why we maybe shouldn't try to align the Prettier config between both projects, please leave a comment!)
j285he marked this conversation as resolved
Owner

If we would like to try and align the formatting/config in this repo with the config in the website repo, then some additional things we could consider changing:

  • eslint.yml, line 24: we could remove the rules about quotes?
  • eslint.yml, line 35-37: we could change the import rules to be error instead of warn?
  • We could copy some of the config from .vscode in the website repo to this repo as well?
If we would like to try and align the formatting/config in this repo with the config in the website repo, then some additional things we could consider changing: - `eslint.yml`, line 24: we could remove the rules about quotes? - `eslint.yml`, line 35-37: we could change the import rules to be `error` instead of `warn`? - We could copy some of the config from `.vscode` in the website repo to this repo as well?
j285he added 1 commit 2021-11-16 22:18:26 -05:00
j285he added 1 commit 2021-11-16 22:23:39 -05:00
Author
Member

I copied eslintrc.js from www-new over to library and removed a few rules. Let me know and I can restore them if needed

on second thought it's probably easier to just copy over the entire file

I copied eslintrc.js from www-new over to library and removed a few rules. Let me know and I can restore them if needed on second thought it's probably easier to just copy over the entire file
j285he added 1 commit 2021-11-16 22:38:06 -05:00
Owner

Just throwing this here as a note, I realized that there are a few different node packages that we could potentially choose from for querying the SQLite database:

  • sqlite3: what we're currently planning on using, by far the most popular (487k weekly downloads on npm, 5.1k stars on Github)
  • better-sqlite3: claims to be faster than sqlite3, isn't quite as popular though (86k weekly downloads on npm, 2.7k stars on Github)
  • sqlite: basically sqlite3 but with promises instead of callbacks, not super popular (44k weekly downloads on npm, 706 stars on Github)

I'm personally happy to use sqlite3 as added in this PR, but I'll leave these findings here in case anyone wants to do a bit more research.

Just throwing this here as a note, I realized that there are a few different node packages that we could potentially choose from for querying the SQLite database: - [sqlite3](https://www.npmjs.com/package/sqlite3): what we're currently planning on using, by far the most popular (487k weekly downloads on npm, 5.1k stars on Github) - [better-sqlite3](https://www.npmjs.com/package/better-sqlite3): claims to be faster than sqlite3, isn't quite as popular though (86k weekly downloads on npm, 2.7k stars on Github) - [sqlite](https://www.npmjs.com/package/sqlite): basically sqlite3 but with promises instead of callbacks, not super popular (44k weekly downloads on npm, 706 stars on Github) I'm personally happy to use sqlite3 as added in this PR, but I'll leave these findings here in case anyone wants to do a bit more research.
a258wang approved these changes 2021-11-17 00:09:05 -05:00
a258wang left a comment
Owner

Looks good to me! We can continue to tweak things in the future as we see fit. Thank you Jared for getting this all set up! 🙂

Looks good to me! We can continue to tweak things in the future as we see fit. Thank you Jared for getting this all set up! 🙂
j285he merged commit 3ed6d703a9 into main 2021-11-20 19:37:15 -05:00
j285he deleted branch j285he-add-sqlite3 2021-11-20 19:37:20 -05:00
Sign in to join this conversation.
No reviewers
No Label
Backend
Frontend
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/library#10
No description provided.