chore: add linting rules#49
Conversation
|
Running the current code causes some errors which we might want to fix... |
|
Note: I also wonder why the CI build runs fine... I assume it should fail 🤷♂️ EDIT: It seems to run |
|
I wanted to give this a new try but we have way too many stuff to fix here :( |
| const hasBase = servers.base !== undefined ? true : false; | ||
| const isRelative = form.href && form.href.search("://") === -1 ? true : false; | ||
|
|
||
| tryProtocols.forEach((tryProtocol) => { |
Check failure
Code scanning / ESLint
Disallow the use of variables before they are defined Error
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
===========================================
+ Coverage 69.33% 87.14% +17.81%
===========================================
Files 1 6 +5
Lines 300 428 +128
Branches 79 139 +60
===========================================
+ Hits 208 373 +165
+ Misses 70 48 -22
+ Partials 22 7 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We can also try to tackle eslint rules one by one ... |
|
#75 made this obsolete. |
Note: I tried to take over the rules/options from node-wot.
However, I removed for now the following rules since they seem to require tsconfig files etc also (can be added later)
"@typescript-eslint/prefer-nullish-coalescing": "error","@typescript-eslint/strict-boolean-expressions": "error",fixes #46