Skip to content

Commit

Permalink
Dev (#2089)
Browse files Browse the repository at this point in the history
* Refactor/redis graphql restructure/draft/0 (#2084)

* Chore/restructure/draft/0 (#2073)

* chore: update makefile

[1] Simplify make target for 'dev' setup and correct npm script target update. Includes comments
clean up.

* chore: update vite.config.ts (+misc)

[1]
Apply use of direct pacakge.json parsing and 'define' global variables respectively via vite-js.
[2]
Clean up console logs, comments and JsDoc.
[3]
Update d.ts for envrionment variables.
[4]
Update hooks.client.ts for latest logs and vite 'define' variables.

* chore: update .eslintrc.yaml

[1]
Add 'no-var' and 'require-jsdoc' rules.
[2]
Clean up comments and JsDoc.

* chore: update vscode settings

[1]
Update settings.json for VsCode instance with (1) cleaner comments
and (2) file/directory tree-view exclusion.
[2]
Update debug vscode 'snippets'.
[3]
Add vscode extension config for 'terminals' auto-start,
along with a complete config example.

* chore: update .gitignore

[1]
Clean up comments and JsDoc.
[2]
Update for 'debug.log' exclusion.

* chore: update codespace setup

[1]
Removing use of NVM due to some setup issues with Codespace.
[2]
Updating 'dev' script for 'scores-lib' loading over 'npm link' only. Caused errors due to absesnce of 'ad-widget'.

* fix: vite hot-reload blockage

[1]
Update layout.svelte + package.json to remove recently pushed ad-engine widget.

* refactor(connection): migrate redis + graphql logic to scores-lib (+misc)

[1] -----
Update all logic to remove use of 'GraphQL' instance argument passed along to 'scores-lib' logic for entry methods. Scores-Lib will house the logic for 'GraphQL' connection instance creation.
[2] -----
Update all logic to remove main use of 'Redis' client methods, such as: 'HMSET', 'SADD', etc. This logic has now been off-loaded to 'scores-lib'.

* refactor(import): update module import path

[1] -----
Update import paths for modules from 'scores-lib' to the correct ones.

* feat(article): update author-article endpoint

[1] -----
New example structure for the 'author.article.ts' data endpoint as part of the 'V8' standard. Includes 'scores-lib' import update.

* chore(eslint): update ignore paths

[1] -----
Update to ignore 'api/**' routes from 'EsLint'.

* chore(debug): remove debug.log

[1] -----
Update removal of 'debug.log' file.

* refactor(misc): update key import (+misc)

[1] -----
Update missing import value for one of the 'RedisKeys'.
[2] -----
Code clean, commenting and format.

* chore(makefile): update makefile target to use dotenv_vault secrets

[1] -----
Update Makefile with the key secrets injection step.

* build(scores-lib): bump to 3.0.0

* chore(graphql): update missing variable

[1] -----
Update instance of target 'GraphQL' instance declaration.

* Feature.Tags Section/draft/0 (#2088)

* fix script error when filter returns empty mapTags (#2092)

Co-authored-by: Ivan Izobov <[email protected]>

---------

Co-authored-by: Ivan Izobov <[email protected]>
  • Loading branch information
migbash and Izobov authored May 1, 2024
1 parent 56dde4d commit 55ad773
Show file tree
Hide file tree
Showing 114 changed files with 17,483 additions and 25,200 deletions.
83 changes: 56 additions & 27 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# ▓ > 🔗 read-more :|: https://github.com/sveltejs/eslint-plugin-svelte

root: true

env:
Expand All @@ -11,16 +9,23 @@ extends:
- eslint:recommended
- plugin:svelte/recommended
- plugin:@typescript-eslint/strict
# ▓ WARNING:
# ▓ > (👇) below :: does not work with svelte.
# ╭─────
# │ NOTE:
# │ ➤ (👇) below :: does not work with svelte.
# ╰─────
# - plugin:import/errors
# - plugin:import/warnings
# - plugin:import/typescript
# ▓ > (👇) :|: https://www.npmjs.com/package/eslint-config-google
# ╭─────
# │ NOTE:
# │ ➤ (👇) :|: https://www.npmjs.com/package/eslint-config-google
# ╰─────
# - google
# - prettier
# ▓ NOTE:
# ▓ > (👇) already contained within ../strict.
# ╭─────
# │ NOTE:
# │ ➤ (👇) already contained within ../strict.
# ╰─────
# - plugin:@typescript-eslint/recommended
# - plugin:@typescript-eslint/stylistic

Expand All @@ -44,7 +49,7 @@ overrides:
parser: '@typescript-eslint/parser'

globals:
# ▓ > 🔗 read-more :|: https://github.com/Chatie/eslint-config/issues/45#issuecomment-885507652
# 🔗 read-more :|: https://github.com/Chatie/eslint-config/issues/45#issuecomment-885507652
"NodeJS": true

ignorePatterns:
Expand All @@ -59,47 +64,61 @@ ignorePatterns:
- pnpm-lock.yaml
- package-lock.json
- yarn.lock
# ▓ NOTE:
# ▓ > gradual eslint introduction in project.
# ╭─────
# │ NOTE: |:| gradual eslint introduction in project.
# ╰─────
# - src/lib/store
# - src/routes
- src/lib/geo-js
- src/lib/graphql
- src/lib/redis
# - src/lib/store
# - src/routes
- src/routes/api
- src/lib/types
- src/params
- src/service-worker.ts

plugins:
- "@typescript-eslint"
- svelte
# ▓ WARNING:
# ▓ > (👇) all-below :: does not work with svelte.
# ╭─────
# │ WARNING:
# │ ➤ (👇) all-below :: does not work with svelte.
# ╰─────
# - import

# ▓ IMPORTANT
# ▓ > Main 'defacto' configuration, do not remove and/or alter heavily.
# ▓ > 🔗 read-more :|: https://eslint.org/docs/latest/rules/
# ╭─────
# │ IMPORTANT
# │ ➤ Main 'defacto' configuration, do not remove and/or alter heavily.
# │ ➤ 🔗 read-more :|: https://eslint.org/docs/latest/rules/
# ╰─────
rules:

# ▓ NOTE:
# ▓ > (👇) for svelte/sveltekit project only!
# ╭─────
# │ NOTE:
# │ ➤ (👇) for svelte/sveltekit project only!
# ╰─────
'svelte/valid-compile': 0
'svelte/no-at-html-tags': 0

# ▓ NOTE:
# ▓ > has been depreceted.
# ╭─────
# │ NOTE:
# │ ➤ has been depreceted.
# ╰─────
# "valid-jsdoc": [..]
no-unexpected-multiline: 0
import/no-unresolved: 0
# ▓ NOTE:
# ▓ > Ideal, but doesn't work as expected :: [ "error", "always", { "allowNewlines": true } ]
# ▓ > as it requires a space after function declaration, 'always'.

# ╭─────
# │ NOTE:
# │ ➤ Ideal, but doesn't work as expected :: [ "error", "always", { "allowNewlines": true } ]
# │ ➤ as it requires a space after function declaration, 'always'.
# ╰─────
func-call-spacing: 0

"@typescript-eslint/no-inferrable-types": 0
"@typescript-eslint/prefer-for-of": error
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": error
'@typescript-eslint/no-inferrable-types': 0
'@typescript-eslint/prefer-for-of': error
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': error

no-console:
- error
Expand Down Expand Up @@ -161,4 +180,14 @@ rules:
one-var:
- error
- initialized: "consecutive"
no-extra-semi: 0
no-extra-semi: 0
require-jsdoc:
- error
- require:
- FunctionDeclaration: true
- MethodDefinition: true
- ClassDeclaration: true
- ArrowFunctionExpression: true
- FunctionExpression: true
no-var:
- error
25 changes: 16 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# ▓ NOTE:
# ▓ > 📌 Project
# ╭─────
# │ NOTE: |:| standard project files
# ╰─────
node_modules
/build
/.svelte-kit
/package
/gif
certs/*

# ▓ CRITICAL
# ▓ > project secrets (never uncomment)
# ╭─────
# │ CRITICAL |:| project secrets (never uncomment)
# ╰─────
.env
.env*
.env.*
Expand All @@ -18,14 +20,19 @@ certs/*
!.env.vault
.flaskenv*

# ▓ NOTE:
# ▓ > miscellenous
# ╭─────
# │ NOTE: |:| miscelleaneous
# ╰─────
WEBSITE-DEV-README.md
datalog/
debug.log
debug/**/*/

# ▓ NOTE:
# ▓ > MacOS
# ╭─────
# │ NOTE:
# │ ➤ MacOS system files
# ┣─────
# │ 🔗 read-more |:| https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them
# ╰─────
.DS_Store
# ▓ @see :> https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them
._*
117 changes: 81 additions & 36 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,60 @@
{
// DOC: https://stackoverflow.com/questions/64365300/how-can-i-remove-unused-imports-declarations-from-the-entire-project-of-react-ty
// DOC: https://stackoverflow.com/questions/46722701/is-there-a-way-to-remove-unused-imports-and-declarations-from-angular-2
"editor.codeActionsOnSave": {
// ╭─────
// │ DOC:
// │ VsCode |:| workspace (folder) configuration
// ┣─────
// | 🔗 read-more |:| https://stackoverflow.com/questions/64365300/how-can-i-remove-unused-imports-declarations-from-the-entire-project-of-react-ty
// | 🔗 read-more |:| https://stackoverflow.com/questions/46722701/is-there-a-way-to-remove-unused-imports-and-declarations-from-angular-2
// | 🔗 read-more |:| https://stackoverflow.com/a/49777201/8421215
// ╰─────
"editor.codeActionsOnSave":
{
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
"source.sortMembers": "explicit"
},
// -----------
// NOTE: [BELOW] SVELTE development specific extensions (Config)
// -----------
// DOC: https://discord.com/channels/457912077277855764/1036919129782878218
// DOC: https://discord.com/channels/457912077277855764/1036369208721813554
"svelte.plugin.svelte.compilerWarnings": {
"editor.folding": true,
"editor.showFoldingControls": "always",
"editor.foldingStrategy": "indentation",
"editor.foldingImportsByDefault": true,
"files.exclude":
{
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/.git/objects/**": true,
"**/tmp": true,
"**/bower_components": true,
"**/.svelte-kit/**": true,
"**/._*": true
},
// ╭─────
// │ NOTE:
// │ EsLint |:| workspace (folder) configuration
// ╰─────
"eslint.validate":
[
"javascript",
"javascriptreact",
"svelte"
],
"eslint.enable": true,
// ╭─────
// │ NOTE:
// │ SvelteJs |:| workspace (folder) configuration
// ┣─────
// | 🔗 read-more |:| https://discord.com/channels/457912077277855764/1036919129782878218
// | 🔗 read-more |:| https://discord.com/channels/457912077277855764/1036369208721813554
// ╰─────
"svelte.plugin.svelte.compilerWarnings":
{
"a11y-click-events-have-key-events": "ignore",
"a11y-aria-attributes": "ignore",
"a11y-incorrect-aria-attribute-type": "ignore",
Expand All @@ -36,35 +79,47 @@
"a11y-mouse-events-have-key-events": "ignore",
"a11y-missing-content": "ignore",
},
// DOC: https://stackoverflow.com/a/49777201/8421215
"editor.folding": true,
"editor.showFoldingControls": "always",
"editor.foldingStrategy": "indentation",
"editor.foldingImportsByDefault": true,
// DOC: https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder
"maptz.regionfolder": {
// ╭─────
// │ NOTE:
// │ VsCode [extensions] |:| workspace (folder) configuration
// ┣─────
// | 🔗 read-more |:| https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder
// ╰─────
"maptz.regionfolder":
{
"collapseAllRegions": true,
"collapseDefaultRegionsOnOpen": true
},
// NOTE: speeding up CSS STYLE location and importing
"css.styleSheets": [
// ╭─────
// │ NOTE: |:| [extension] CSS-Peek
// ╰─────
"css.styleSheets":
[
// "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css", // example
"/static/app.css"
],
// IMPORTANTNOTE: configured in user/settings.json
"css.enabledLanguages": [
// ╭─────
// │ NOTE: |:| [extension] CSS-Peek
// │ IMPORTANT |:| configured in user/settings.json
// ╰─────
"css.enabledLanguages":
[
"html",
"svelte"
],
// NOTE: does not work for SVELTE
"cssPeek.peekFromLanguages": [
// ╭─────
// │ IMPORTANT |:| does not work for SVELTE
// ╰─────
"cssPeek.peekFromLanguages":
[
"html",
"svelte"
],
// "[css]": {
// "editor.foldingStrategy": "indentation",
// },
"material-icon-theme.folders.associations": {
// ╭─────
// │ NOTE: |:| [extension] Material-Icon
// ╰─────
"material-icon-theme.folders.associations":
{
"redis": "Database",
"player": "Layout",
"fixture": "Layout",
Expand All @@ -74,14 +129,4 @@
"tablet": "Mobile",
"loaders": "Theme"
},
// "eslint.enable": true,
// "eslint.validate": ["javascript", "javascriptreact", "svelte"]
"eslint.codeActionsOnSave": false,
"eslint.validate": [
"javascript",
"javascriptreact",
"svelte"
],
"eslint.enable": true

}
28 changes: 25 additions & 3 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prefix": [ "debug" ],
"body":
[
"// ### [🐞]",
"// [🐞]",
"dlog",
"(",
"\t`${1|🚏,🔹|} ${2|checkpoint,checkpoint [R],checkpoint [H],[var]|} ➤ ${3:debugTagOrVarName} ${$4}`,",
Expand All @@ -39,6 +39,26 @@
"description": "Betarena Scores | Script (Snippet) Debug"
},

"Betarena Scores | Script (Snippet) Debug (v2)":
{
"scope": "javascript,typescript",
"prefix": [ "debug" ],
"body":
[
"// [🐞]",
"dlogv2",
"(",
"\t'${2:methodName(..)}',",
"\t[",
"\t\t`🔹 [var] ➤ ${3:variableName} :|: ${JSON.stringify(${4:varibleTarget}}, null, 4)}`,",
"\t\t`🔹 [var] ➤ ${5:variableName} :|: ${${6:varibleTarget}}`,",
"\t],",
"\tfalse",
");"
],
"description": "Betarena Scores | Script (Snippet) Debug (v2)"
},

// ╭────────────────────────────────────────────────────────────────────────╮
// │ 🟧 CODE SNIPPETS │
// ╰────────────────────────────────────────────────────────────────────────╯
Expand Down Expand Up @@ -117,8 +137,10 @@
"body":
[
"// ╭─────",
"// │ NOTE: WARNING: IMPORTANT CRITICAL",
"// │ $0",
"// │ NOTE: WARNING: IMPORTANT CRITICAL CHECK",
"// │ ➤ $0",
"// ┣─────",
"// │ 🔗 read-more |:| https://",
"// ╰─────"
],
"description": "Information Description"
Expand Down
Loading

0 comments on commit 55ad773

Please sign in to comment.